Ask a Question

How to attach a file to the case step result?

SOLVED
Kayle
New Contributor

How to attach a file to the case step result?

I want to use API to attach a file to the case step. But I do not find an API. Can you help me? If you need more information please tell me. THX

 

 

Kayle_0-1673511451733.png

 

1 REPLY 1
Kayle
New Contributor

I resolved the question.

 

BaseUrl/rest/zapi/latest/attachment?entityId=664272&entityType=TESTSTEP&projectId=19800
session = requests.session()
headers = {
"Authorization": "Basic *****",
"X-Atlassian-Token": "no-check"
}



response = session.post(url, headers=headers, files={
"file": ("expect.jpg", open("expect.jpg", "rb"), "image/jpeg")
})

 

cancel
Showing results for 
Search instead for 
Did you mean: