> For the complete documentation index, see [llms.txt](https://docs.opshub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.opshub.com/v7.226/manage/api/sample-use-cases/add-fields-to-mapping.md).

# Add fields to existing Mapping

## Description

* If you want to add fields to an existing mapping, then you can use this sample script.

## Input

* Instance details:
  * Instance details like <code class="expression">space.vars.OIM</code> instance URL, username and password are to be given in **instanceDetails.properties** file available within script.
* Mapping details (to be given at the time of script execution):
  * Mapping id to be updated.
  * Internal name of the field of system 1.
  * Internal name of the field of system 2.

### Output

* Updated mapping

### Script

You can download the script from [here](https://opshub.com/ohftp/AdminAPI/addFieldsToMapping.zip).

Below is an example of execution of script which shows the input and output:

<div align="center"><img src="/files/ILa7nS3X8JBWw7eFpycv" alt=""></div>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.opshub.com/v7.226/manage/api/sample-use-cases/add-fields-to-mapping.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
