Integrate Resources with an External Data Source
To integrate resources with an external data source:
- Create or generate one or more JSON objects containing the following fields:
- sourceId: The unique identifier of resource data in an external source, such as an ERP system.
- workspaceId: The unique identifier of a workspace.
- resourceName: The name of the resource.
- resourceType: The type of the resource.
- resourceClass: The class of the resource.
- resourceCode: The code of the resource.
- resourceStatus: The status of the resource.
- calendar: The unique identifier of the calendar that will be associated with this resource.
- Send a request to the API using the following information:
-
Endpoint:
https://localhost:7001/api/restapi/project/resource/syncBatch
-
Operation:
POST
- Example Request Body:
[ { "sourceId": 1, "workspaceId": 30002, "resourceName": "Andy Hallman", "resourceType": "LABOR", "resourceClass": "RESOURCE", "resourceCode": "HallmanA", "resourceStatus": "ACTIVE", "calendar": 1 }, { "sourceId": 2, "workspaceId": 30002, "resourceName": "Molly Abraham", "resourceType": "LABOR", "resourceClass": "RESOURCE", "resourceCode": "AbrahamM", "resourceStatus": "ACTIVE", "calendar": 1 } ]
-
Endpoint:
- The API should return a response similar to the following:
- Response Code: 207
- Example Response Body:
[ { "statusCode": 201, "primaryKeyValue": 18003, "sourceId": "1" }, { "statusCode": 201, "primaryKeyValue": 18004, "sourceId": "2" } ]