So I am trying to POST to the:
endpoint with the purposes of then attaching a document to a service request via a python code. I can do all sorts of other things like get ticket information, download attachments, and post a comment through the APIs using python. I am using these headers:
headers = {
'Accept': 'application/json',
"Authorization": "Basic {my-authorization}",
'Content-type': 'application/json'
}
However when I hit the attachTemporaryFile endpoint I am getting this error:
{'errorMessage': 'The action performed required a logged in user. Please log in and try again.', 'i18nErrorMessage': {'i18nKey': 'sd.admin.servicedesk.error.authenticated.user.required', 'parameters': []}}
Which is weird because I am the admin. I have also tried defining "X-Atlassian-Token: no-check" in the headers as others have suggested. What am I doing wrong? Is there a way to attach a file directly to a request?
-Thanks
Hi!
I do recommend you just keep session, you can do it via request.Session()
like that one
https://github.com/atlassian-api/atlassian-python-api/blob/master/atlassian/service_desk.py#L460
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.