9.1.1 API Endpoints for Export/Import Scheduler Objects
Header Parameters for each API:
- ofs_tenant_id - Tenant ID of the Application
- ofs_service_ID - Service ID of the Application
- ofs_workspace_ID - Workspace ID of the Application
- ofs_remote_user - Used ID of the User. This parameter should be mapped to proper function.
- Content-Type: application/JSON
- Batch Export API:
HTTP Method - GET
URL - /v1/rest/batch/:code
- Batch Import API:
HTTP Method - POST
URL - /v1/rest/batch
Request Body:
{
"objectcode": "<<BATCH_NAME>>",
"objecttype": "BATCH",
"objectsubtype": "",
"overwrite": "Y",
"objectdefinition":””
}
- Batch Group Export API:
HTTP Method - GET
URL - v1/rest/batchgroup/:code
- Batch Group Import API
HTTP Method:
POST URL- /v1/rest/BatchGroup
Request Body:
{
"objectcode": "<<BATCHGROUP_NAME>>",
"objecttype": "BATCHGROUP",
"objectsubtype": "",
"overwrite": "Y",
"objectdefinition":””
}
- Schedule Export API:
HTTP Method- GET
URL- v1/rest/schedule/:code
- Schedule Import API HTTP Method - POST URL - /v1/rest/schedule
Request Body:
{
"objectcode": "<<SCHEDULE_ID>>",
"objecttype": "SCHEDULE",
"objectsubtype": "",
"overwrite": "Y",
"objectdefinition":””
}
Note:
- OverWrite flag can be Y or N
- Objectdefinition will be obtained in export API same need to be paste during import in request body
- In Schedule Export API code it is Schedule ID.
- During import of schedule dependent batch or if BatchGroup is not migrated, the user have to use batch and BatchGroup import API to migrate updated definition in the Target environment.