Search code examples
restattaskworkfront-api

Workfront REST API BAD request


I'm trying to send a basic search request, but it's returning bad request. It only does it for some objects. I had similar problems before, but once I changed the version on my request string some objects worked fine. Does anyone know if these objects are restricted or something?

Request sent:

https://company.attask.com/attask/api/v5.0/arvstp/search - BAD REQUEST
https://company.attask.com/attask/api/v5.0/arvsts/search - BAD REQUEST

Objects: Approval Step -- arvstp

Approver Status -- arvsts

Thanks for the help


Solution

  • You are getting a bad request because the objects you are searching for are not top level objects which means they are actually child objects to another Object and cannot be searched.

    Approval step is a child object to approvals so to search you would do the following call.

    attask/api/v5.0/ARVPTH/search?fields=approvalSteps
    

    you can tell if an object is searchable by navigating to our API explorer

    https://developers.workfront.com/api-docs/api-explorer/

    and under the object you are interested in select the Search tab if there is no data then the object cannot be searched.