Post

2 followers Follow
0
Avatar

REST "where" condition in URL format

Kinda beginner's question. I was asked to post the question here.

 

Working on interfacing with Clarizen through REST API. Using entityQuery, need to use the "where" condition to specify a custom field called C_PRPTaskID = Program. How do I do that in a URL format?

Thank you.

Bo Gao Answered

Please sign in to leave a comment.

4 comments

0
Avatar

Hi Bo,

Given you're using the REST API, you may prefer to use CZQL and the POST HTTP method.

Check the documentation for more information.

Hope this helps,

Ophir

Ophir Kenig 0 votes
Comment actions Permalink
0
Avatar

Ophir,

 

Thank you. So when do I use the "where" in entityQuery?

 

Bo

Bo Gao 0 votes
Comment actions Permalink
0
Avatar

So I used the following:

 

data/query?q=SELECT%20C_PRPTaskID,Name%20FROM%20Project%20WHERE%20C_PRPTaskID=Program

 

Clarizen responded with

 

Response code: 500
Response message: Internal Server Error

 

Could you give me a hint? thanks.

Bo Gao 0 votes
Comment actions Permalink
0
Avatar

Resolved it. I got wrong encoding. Here is the correct one:

 

data/query?q=SELECT+C_PRPTaskID%2CName+FROM+Project+WHERE+C_PRPTaskID%3D%22Program%22

 

Bo Gao 0 votes
Comment actions Permalink