Library Entity Associated Entities Mapping¶
/api/repositories/{repository}/library/entities/{libraryID}/associatedentities/{entityID}/mapping
Parameter | Type | Purpose |
---|---|---|
repository | string | The name of the Repository |
libraryID | int | The ID of the library entity |
entityID | int | The ID of the entity to which the above library is associated |
Glossary¶
Abbreviations used in this document:
Term | Meaning |
---|---|
EID | Entity ID (integer) |
LID | Library ID (integer) |
RAID | Real Attribute ID (integer) |
LAID | Library Attribute ID (integer) |
Get¶
-
GET
/api/repositories/
(string: repository)/library/entities/
(int: libraryID)/associatedentities/
(int: entityID)/mapping
¶ Gets a list of attribute mappings between entity associated with a Library Entity
GET /api/repositories/jupiter/library/entities/2/associatedentities/1/mapping HTTP/1.1
Accept: application/json
Response Code | Reason |
---|---|
200 | No error |
500 | Server error |
The response will be a Standard Response, with a list of the attribute mappings between Entities associated with the Library Entity.
Each array row contains the mapping of library attribute to the associated entity attribute:
{
"attributeMapList": [
{
"realAttribute": {
"id": "1",
"columnsisedName": "ACCOUNT_ID",
"humanisedName": "Account ID"
},
"libraryAttribute": {
"id": "1",
"name": "Account ID"
}
},
{
"realAttribute": {
"id": "5",
"columnsisedName": "BILLING_ADDRESS2",
"humanisedName": "Billing Address2"
},
"libraryAttribute": {
"id": "2",
"name": "Bank Accountnumber"
}
}
]
}
Edit¶
-
POST
/api/repositories/
(string: repository)/library/entities/
(int: libraryID)/associatedentities/
(int: entityID)/mapping
¶ Edit the attribute mappings of a library entity
JSON Parameters: - body – The request body
The request packet must contain the command
and data
elements. The options
element is not required. The command must be edit
.
{
"command": "edit",
"data": {
"entity":"EID",
"library":"LID",
"mapping": [
{
"realAttr": "RAID",
"libAttr": "LAID"
},
{
"realAttr": "RAID",
"libAttr": "LAID"
}
]
}
}
The data element should contain three key-value pairs:
Key | Purpose |
---|---|
entity | ID of the real entity |
library | ID of the library entity |
mapping | array of attribute mappings |
All the fields are required.
mapping should contain an array of attribute ID mappings from the library entity with ID library to the real entity with ID entity. All the mappings specified in mapping array will be edited.
POST /api/repositories/jupiter/library/entities/2/associatedentities/1/mapping HTTP/1.1
Content-Type: application/json
{
"command": "edit",
"data": {
"entity": "1",
"library": "2",
"mapping": [
{
"realAttr": "1",
"libAttr": "1"
}
]
}
}
Response Code | Reason |
---|---|
204 | Success |
400 | No data received |
400 | Invalid parameters |
500 | Server error |
The attribute mappings will be upgraded as a background task. The response will contain a link to the scheduled task.
{
"job": "/api/repositories/jupiter/scheduler/1",
}