AnsweredAssumed Answered

I am getting a 400 Bad Request error when trying to call the courses API when dataSourceId is blank. Am I doing something wrong?

Question asked by richardcjackson on Mar 14, 2019
Latest reply on Mar 15, 2019 by moneil

The call is: .../learn/api/public/v1/courses?dataSourceId

The full error is:


    "status": 400,

    "message": ": 1 errors\nField error in object 'coursesSearchCriteriaPubV1' on field 'dataSourceId': rejected value []; codes [methodInvocation.coursesSearchCriteriaPubV1.dataSourceId,methodInvocation.dataSourceId,,methodInvocation]; arguments [: codes [coursesSearchCriteriaPubV1.dataSourceId,dataSourceId]; arguments []; default message [dataSourceId]]; default message [Property 'dataSourceId' threw exception; nested exception is : Could not find object with ID: ]",

    "extraInfo": "decb067d99424c9980124bc7bb6ce179"



However, if I use any of the following calls I get status 200 and courses returned.

  • Call with courseId blank: .../learn/api/public/v1/courses?courseId
  • Call with name blank: .../learn/api/public/v1/courses?name
  • Call with externalId blank: .../learn/api/public/v1/courses?externalId


Is this something I'm doing wrong or shouldn't be able to do? Or is it a bug with how the blank dataSourceId is being handled?


Many thanks,