MassUpdate
Updates attribute values for multiple records. You can update records from different entities and you can update multiple attributes within the same record.
Syntax
Copy
POST <<i>host_address</i>>/api/openApi/MassUpdate
Content-Type: application/json
{
"ApiInfo": {
"Token": <<i>access_token</i>>
},
"Request": {
Requests: [
{
"Id": <<i>record_id</i>>,
"EntityName": <<i>parent_entity</i>>,
"Values": [
{
"Attribute": <<i>attribute_name</i>>,
"Value": <<i>attribute_value</i>>
},
...
{
"Attribute": <<i>attribute_name</i>>,
"Value": <<i>attribute_value</i>>
}
]
},
...
{
"Id": <<i>record_id</i>>,
"EntityName": <<i>parent_entity</i>>,
"Values": [
{
"Attribute": <<i>attribute_name</i>>,
"Value": <<i>attribute_value</i>>
},
...
{
"Attribute": <<i>attribute_name</i>>,
"Value": <<i>attribute_value</i>>
}
]
}
]
}
}
| Parameter | Description |
|---|---|
host_address
|
URL of the FintechOS platform server. |
access_token
|
Access token used to connect to the API endpoint. For details, see GetToken. |
record_id
|
Unique identifier of the record you wish to update. |
parent_entity
|
Name of the parent entity of the record you wish to update. |
attribute_name
|
Name of the record's attribute you wish to update. |
attribute_value
|
The value you wish to allocate the record's attribute. |
Response
Copy
{
"Id": "af62cae0-2b0a-4344-8534-a72c429a5c30",
"Message": "Records updated: 12",
"IsSuccess": true,
"ClientScript": null,
"ErrorCode": 0,
"Serialized": null,
"UIResult": null
}
| Parameter | Description |
|---|---|
Id
|
Unique identifier of one of the records you updated. |
Message
|
Indicates the number of records that were updated. |
IsSuccess
|
Indicates if the records update was successful. |
Examples
In this example, as a result of an internal reorganization, the training division is moved from the Training and Documentation department to the Community department. Therefore, the department names are renamed accordingly:
- The server's address is https://FintechOSPortal.
- The access token used to connect to the API endpoint is 7787fc7a-292d-424e-b752-8adbdec64a9a. For information on how to obtain the access token, see GetToken.
- The ID of the Training and Documentation department is 85cb2e53-f0ae-4f66-85d4-6029769c7881.
- The Training and Documentation department is renamed to Documentation.
- The ID of the Community department is af62cae0-2b0a-4344-8534-a72c429a5c30.
- The Community department is renamed to Community and Learning.
- The update request is successful ("IsSuccess": true).
- 2 records are updated by the request (Records updated: 2).
Request
Copy
POST https://FintechOSPortal/api/openApi/MassUpdate
Content-Type: application/json
{
"apiInfo": {
"Token": "7787fc7a-292d-424e-b752-8adbdec64a9a"
},
"request": {
"Requests": [
{
"Id": "85cb2e53-f0ae-4f66-85d4-6029769c7881",
"EntityName": "Department",
"Values": [
{
"Attribute": "name",
"Value": "Documentation"
}
]
},
{
"Id": "af62cae0-2b0a-4344-8534-a72c429a5c30",
"EntityName": "Department",
"Values": [
{
"Attribute": "name",
"Value": "Community and Learning"
}
]
}
]
}
}
Response
Copy
{
"Id": "af62cae0-2b0a-4344-8534-a72c429a5c30",
"Message": "Records updated: 2",
"IsSuccess": true,
"ClientScript": null,
"ErrorCode": 0,
"Serialized": null,
"UIResult": null
}