Actions
Issue #4672
closedClarify Tasks REST API Docs (including response codes)
Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Documentation
Sprint:
Quarter:
Description
1 - There is no mention in the docs about not being possible to delete a running task, what status code, and expected response.
Attempt to delete a running task is returning a 409.
{'_content': b'',
'_content_consumed': True,
'_next': None,
'connection': <requests.adapters.HTTPAdapter object at 0x7f87dc15fb00>,
'cookies': <RequestsCookieJar[]>,
'elapsed': datetime.timedelta(microseconds=128350),
'encoding': None,
'headers': {'Server': 'nginx/1.14.2', 'Date': 'Fri, 21 Dec 2018 00:46:37 GMT', 'Content-Length': '0', 'Connection': 'keep-alive', 'Vary': 'Accept, Cookie', 'Allow': 'GET, DELETE, HEAD, OPTIONS', 'X-Frame-Options': 'SAMEORIGIN'},
'history': [],
'raw': <urllib3.response.HTTPResponse object at 0x7f87dc15fd68>,
'reason': 'Conflict',
'request': <PreparedRequest [DELETE]>,
'status_code': 409,
'url': 'http://192.168.122.138/pulp/api/v3/tasks/80aeaad0-6323-447d-9a24-b2a8ab7f9a4f/'
Not clear why the user is getting back a 409. 'reason': 'Conflict'
2 - It is not stated in the documentation in what state a task has to be in order to be cancelled.
See: https://docs.pulpproject.org/en/3.0/nightly/restapi.html#tag/tasks
Related issues
Actions