Post

3 followers Follow
0
Avatar

SandBox API - Missing Argument Error

Hi, 

I have a Python script that is leveraging the API. In production, I'm not having any issues. In SandBox, however, I'm running into errors when firing off my queries. 

For example, in production:

url =  'https://api.clarizen.com/v2.0/services/'
query = {"text": "SELECT SYSID, State FROM Task WHERE State IN ('Active'), LIMIT 1"}

This will output successfully: 

'entities': 'SYSID': 'T-19601',
    'State': {'id': '/State/Active'},
    'id': '/Task/8340d680'

 

However, when I run this exact query in SandBox, the only thing I'm changing is the "url". 

url = 'https://api.clarizentb.com/v2.0/services/'

I get this error:

'errorCode': 'MissingArgument',
    'message': 'Missing argument: Query Text',
    'referenceId': '2l94kXIUhpJmdr11HnuNwK'

 

I have tried changing the query's key to: "q" and "text" work in production, neither work in SandBox. "Query Text" does not work in either. 

 

I'm sure that I'm missing something relatively obvious. Any help would be appreciated. 

Uriah Bojorquez Answered

Please sign in to leave a comment.

3 comments

1
Avatar

this may be a silly question, but are you sure you have an active task in your Sandbox?  could it be returning an error on reading the response rather than on the execution of the query?

 

Ed Dierker 1 vote
Comment actions Permalink
0
Avatar

Good call. Our SandBox was just recently refreshed, so, the data should be good. Unless I'm completely mistaken. 

 

The problem appears to be with the /data/query call, as I'm able to successfully get a valid response from /metadata/describeMetadata to the SandBox. 

 

Uriah Bojorquez 0 votes
Comment actions Permalink
0
Avatar

Hi Ubojorquez,

I've checked our logs and found the exact error reference you sent. The URL was correct (/services/data/query), but it seems the request body was empty, so the Select statement never got to our server.

Please check your outgoing message and verify you have the correct POST body.

Add a comment here if you need further assistance.

Hope this helps,

Ophir

Ophir Kenig 0 votes
Comment actions Permalink