Hi ,
I am getting either an invalid path for (api 1.3) or not authenticated for (api 2.0) to get the transactional API for line items and IDs.
I am using basic auth with base64 encoding.
below is my code, I believe my code is correct. guide me if i am missing anything in the code.
Note that, I have used GUIDs and auth as mguid, wguid, username and password. so the first part is not shared in the below code.
Code
user = 'Basic ' + str(base64.b64encode((
f'{username}:{password}').encode('utf-8')).decode('utf-8'))
getHeaders = {
'Authorization': user,
'Content-Type': 'application/json'
}
getImports = requests.get(f'https://api.anaplan.com/2/0/workspaces/{wGuid}/' +
f'models/{mGuid}/lineitems',
headers=getHeaders)
with open('lineitems.json', 'wb') as f:
f.write(getImports.text.encode('utf-8'))
Thanks,
Manjunath