This post explains how to create a mapping using the Create Mapping API in Adeptia.
The same payload structure can be used to create:
a fully mapped mapping, or
an empty mapping template, which can later be completed by end users from the Mapper UI.
Prerequisites
Before invoking the API, ensure the following:
A valid ACCESS_TOKEN is available
The token must be passed in the request headers
Example Header
Cookie: ACCESS_TOKEN=<your_access_token>Create Mapping API
Endpoint
Method: POST
http://localhost/Mapper/rest/entities/mappings/createQuery Parameters
The source and target schema identifiers must be passed as query parameters.
| Parameter | Description |
|---|---|
| targetSchemaTypeId | Target schema identifier in the format SchemaType:SchemaID |
| sourceSchemaTypeId | Source schema identifier in the format SchemaType:SchemaID |
| isCustomTemplateWithSoap | Set to false |
| isAutoSave | Optional, can be passed as undefined |
Example Request
http://localhost/Mapper/rest/entities/mappings/create?targetSchemaTypeId=ExcelSchema:192168001111175765542794400007&sourceSchemaTypeId=TextSchema:192168001111175765207883100003&isCustomTemplateWithSoap=false&isAutoSave=undefinedRequest Payload
Below is a working payload that can be used to create a mapping.
You can modify the placeholder values (sourceSchemaID, targetSchemaID, schemaName, etc.) according to your environment.
Comments
0 comments
Please sign in to leave a comment.