RESTful API Get Targets command returning empty string?
C
Christopher Ryan
started a topic
over 4 years ago
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.
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)
Christopher Ryan
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: https://www.wikitude.com/external/doc/documentation/studio-api/index.html#api-Target-GetTargets
A sample of the cURL command we are using is:
curl https://api-us.wikitude.com/targetCollection/5b8d81a701f6bf322f227819 --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!