sande
sande

Reputation: 664

citrix session data import erroring with Internal server error

I am trying to import data from citrix cloud below is my approch.

Get token

TOKEN_URL = 'https://api-us.cloud.com/cctrustoauth2/root/tokens/clients'
response = requests.post(TOKEN_URL, data={
    'grant_type': '',
    'client_id': '',
    'client_secret':''
})

Get data

def GetSessions(bearerToken, customerid, siteid):
    request_uri = "https://api.cloud.com/cvad/manage/Sessions"
    headers = {
                'Authorization': 'CWSAuth Bearer=%s' % bearerToken,
                'Citrix-CustomerId': customerid,
                'Citrix-InstanceId': siteid,
                'Content-Type': 'application/json',
                'Accept': 'application/json'
              }

    response = requests.get(request_uri, headers = headers)
    return response.json()

Error

 {'statusCode': 500, 'message': 'Internal server error', 'activityId': '00000-000-00-00-0000000'}

What I am missing

Upvotes: 0

Views: 15

Answers (0)

Related Questions