Post

1 follower Follow
0
Avatar

Fetch the task information via Restful API 2.0

Hi,

I am trying to fetch the information of a task by using the Restful API with CZQL here 

I tried this:

curl -H "Authorization: Session 7b3088b8-1565-4faa-9257-4fbad48d7fb3_29110789" -X POST -d '{q:"SELECT createdOn,title FROM Issue WHERE createdOn>2023-04-03"}' https://apie1.clarizen.com/v2.0/services/data/query

I think the syntax is correct but I always got the follow error:

{
  "errorCode": "Internal",
  "message": "We’re sorry, something seems to have gone wrong.\r\nIf you need our team to investigate, have your Administrator open a support ticket with this error code:",
  "referenceId": "14mbbZJChvPHkH5qvQEOBB"
}

Please kindly advise.

thanks

Still

 

Still

Please sign in to leave a comment.

1 comment

0
Avatar

Sorry I've figured it out. It is because a syntax error

The correct syntax is like this: (the single quotation)

 curl -H "Authorization: Session 7b3337b8-1565-4faa-9257-4fbad48d7fb3_29110789" https://apie1.clarizen.com/v2.0/services/data/query -d "{q:'select name,CreatedOn,SYSID,project from task order by CreatedOn desc'}"

I got the hint from this post. Eyal posted 8 years ago!

keep on trying the upsert though.

 

regards

still

 

Still 0 votes
Comment actions Permalink