[+]
[-]
 [+]
 [+]
 [-]
   
   
   
   
   
   
   
   
   
   
Updated on 6/10/2019
Commissions Data Loader Publication
CDL APIs
Direct link to topic in this publication:

PREVIOUS  |  NEXT

CDL APIs

OData REST APIs

Following OData REST APIs are available:
  • getJob: /odata.svc/getJob
Retrieves job details for the given file name

  • executeJob: /odata.svc/executeJob
Executes/initiates job processing

Prerequisite

You must fetch the access-token through Sales Portal SSO APIs and pass them as headers:

HEADER

Content-Type:application/json
tenant:AUT1
access-token:77a8fb97-6ac9-429f-80ba-0454cdcd44cc

GET JOB

 

URL

https://<CDL-HOST>/cdl/odata.svc/getJob(fileName='AUT1_PLQU_100_20190121164021.csv')

METHOD

GET

RESPONSE

{ "@odata.context": "$metadata#com.callidus.odixl.model.Job", "value": [ { "id": 10, "fileName": "AUT1_PLQU_100_20190121164021.csv", "fileType": "PLQU", "tenant": "AUT1", "status": "INPROGRESS", "startTimestamp": "2019-01-21T11:25:03.936+0000", "endTimestamp": "null", "totalRecords": "2", "successRecords": "1", "failedRecords": "1", "createdTimestamp": "2019-01-21T11:10:38.445+0000", "failureReason": "", "fileSize": "211", "userName": "" } ] }

CURL COMMAND

curl -X GET \

https://<hostname>/cdl/odata.svc/getJob%28fileName=%27AUT1_PLQU_100_20190121164021.csv%27%29 \

-H 'Content-Type: application/json' \

-H 'access-token: 77a8fb97-6ac9-429f-80ba-0454cdcd44cc' \

-H 'tenant: AUT1'

 

EXECUTE JOB

 

URL

https://<CDL-HOST>/cdl/odata.svc/executeJob

METHOD

POST

REQUEST

{ "fileName": "AUT1_PLQU_100_20190121164021.csv" }

RESPONSE

{ "@odata.context": "$metadata#com.callidus.odixl.model.Job", "value": [ { "id": 10, "fileName": "AUT1_PLQU_100_20190121164021.csv", "fileType": "PLQU", "tenant": "AUT1", "status": "CREATED", "startTimestamp": "null", "endTimestamp": "null", "totalRecords": "0", "successRecords": "0", "failedRecords": "0", "createdTimestamp": "2019-01-21T11:10:38.445+0000", "failureReason": "", "fileSize": "211", "userName": "" } ] }

CURL

COMMAND

curl -X POST \

https://<hostname>/cdl/odata.svc/executeJob \

-H 'Content-Type: application/json' \

-H 'access-token: 77a8fb97-6ac9-429f-80ba-0454cdcd44cc' \

-H 'tenant: AUT1' \

-d '{ "fileName": "AUT1_PLQU_100_20190121164021.csv" }'

 

API Job Fields 

API job fields and decription:

  • "id": job Id

  • "fileName": file name for the data provided/dropped in goAnyWhere

  • "fileType": refers to template using for the data to process

  • "tenant": tenant id

  • "status": current status of the job. possible values(CREATED/WAITING_FOR_DEPENDENT/INPROGRESS/SUCCESS/FAILURE)

  • "startTimestamp": job process start date,

  • "endTimestamp": job finished date,

  • "totalRecords": total records found in data file,

  • "successRecords": total records successfully processed

  • "failedRecords": total records failed in job process

  • "createdTimestamp": job created date

  • "failureReason": reason for job failure. refer error log for clear descriptions

  • "fileSize": file size in bytes for the data provided/dropped in goAnyWhere

  • "userName": job created by





Related Articles