Post

2 followers Follow
0
Avatar

Get File name using REST API using SYSID

I am using the following query to this url to get the External ID and Name of a file 
https://api2.clarizen.com/v2.0/services/data/entityQuery

{"typeName": "Document", "fields": ["ExternalID","Name","SYSID"], "paging": {"from": 1, "limit": 10000}, "where": {"and": [{"leftExpression":{ "fieldName": "SYSID"}, "operator": "Equal", "rightExpression": { "value": "D-63732" }}]}}

I know the file exists and it's SYSID is D-63732 but the query returns only paging info. What am I doing wrong?

Kelly, Daniel Answered

Official comment

Avatar

Hi Daniel,

I tried your query in my environment and it works as expected:

POST /data/entityQuery
{
"typeName": "Document",
"fields": ["Name"],
"where": {
"leftExpression": { "fieldName": "SYSID" },
"operator": "Equal",
"rightExpression": { "value" : "D-1" }
}
}

Please try to remove the paging and "and" from your query. "And" is useless when you have only one condition.

By the way, the maximum paging limit is 1000, so it is useless to set it to 10 000.

Regards.

Alex Broitman
Comment actions Permalink

Please sign in to leave a comment.

1 comment