Post

2 followers Follow
0
Avatar

describeEntities missing TypeNames argument

Hello!

I'm trying to use the /metadata/describeEntities API on Python but I'm getting a missing argument error. Of course, I'm passing the argument.

 

Here is my code:

import pandas as pd
import requests
import json

#LOGIN

user = icaroreis@sas.com.br'
pass = 'xxxxxx'

loginjson = requests.post(url='https://api.clarizen.com/v2.0/services/authentication/login', data={'userName': user, 'password': pass})
logintexto = json.loads(loginjson.text)
sessionid = logintexto['sessionId']

#DESCRIBE ENTITIES

camposjson = requests.get(url='https://api.clarizen.com/v2.0/services/metadata/describeEntities', data={'TypeNames': ['Task']}, headers={'Authorization': 'Session ' + sessionid})

 

This is the error:

{"errorCode":"MissingArgument","message":"Argumento ausente: TypeNames","referenceId":"3BdtVbTEXTi1pxeeFCnx3h"}

 

I also tried without brackets:

camposjson = requests.get(url='https://api.clarizen.com/v2.0/services/metadata/describeEntities', data={'TypeNames': 'Task'}, headers={'Authorization': 'Session ' + sessionid})

 

And also tried like this:

param = {'TypeNames': ['Task']}
camposjson = requests.get(url='https://api.clarizen.com/v2.0/services/metadata/describeEntities', data=json.dumps(param), headers={'Authorization': 'Session ' + sessionid})

 

I tried all this writing typeNames and TypeNames but nothing works.

 

The exact same thing with the /listEntities API works perfectly.

 

Am I doing something wrong? Can somebody help me?

Ícaro Reis Answered

Please sign in to leave a comment.

1 comment