Start a new topic

RESTful API Get Targets command returning empty string?

Hello. We are trying to use the RESTful API to get a list of targets in a target collection, so we can get the Target IDs for later use in update and delete commands.

However, when we use cURL to execute this, we are getting an empty string. When we use the ColdFusion CFHTTP equivalent, we get the html of a form asking us to authenticate.

This is the documentation we are following:

A sample of the cURL command we are using is:

curl --header "X-Version: 3" --header "X-Token: xxxxxxxxx"

Our other usage of the RESTful API to create targets and delete them (after manually looking up a Target ID in the studio manager) is successful.

Is there something else we should be doing to get the Target IDs from the target collection?

Thank you!

You used the wrong URI - Check out this cURL:

curl -X GET \ \
  -H 'X-Token: <your manager token>' \
  -H 'X-Version: 3'

Hope that helps,


Thanks. That did the trick.

Note, however, that the "/cloudrecognition/" portion of the URI you provided is not included in the documentation page. It lists "/targetCollection/:tcId/target" as the reference link (with ":tcId" as the target collection id)


Thank you!


Login or Signup to post a comment