I don't understand why I receiving of 204 respond when I want to update one field at a Jira instance ? Could you please to help me ?
import requests
server = 'https://myjira.com'
endpoint = '/rest/api/2/issue/'
auth = ('login', 'password')
headers = {
"Content-Type": "application/json;charset=UTF-8"
}
payload = {
"update": {"customfield_15950": [{"set": "1999-03-07"}]}
}
respond = requests.put(
f'{server}{endpoint}KEY-705',
headers=headers,
json=payload,
auth=auth,
)
print(respond, respond.text)
It looks like 204 is the correct response here.
See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204
the HTTP 204 No Content success status response code indicates that the request has succeeded, but that the client doesn't need to go away from its current page. A 204 response is cacheable by default. An ETag header is included in such a response. The common use case is to return 204 as a result of a PUT request, updating a resource, without changing the current content of the page displayed to the user**. If the resource is created, 201 Created is returned instead. If the page should be changed to the newly updated page, the 200 should be used instead.