-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
Component/s: Operations - Alerts - API
-
None
-
1
-
Minor
-
1
-
Accessibility
Issue Summary
The The Jira Service Management ops REST API is missing two critical pieces of documentation:
- Required OAuth/API scopes: Unlike most other Alert endpoints in the same API group, this Add alert attachment endpoint does not document which scopes are required to call it successfully.
- Request body specification: The documentation does not describe how the attachment should be sent (e.g., multipart/form-data, field names, content type).
Steps to Reproduce
- Navigate to the The Jira Service Management ops REST API.
- Attempt to call the endpoint using a scoped API token, following the pattern used for other Alert endpoints.
- Observe the 401 error response.
Expected Results
The documentation should include:
- The required OAuth scopes needed to call this endpoint.
- The correct request body format and field definitions for sending an attachment.
Actual Results
Calling the endpoint with a scoped token returns:
{"code": 401, "message": "Unauthorized; scope does not match"}
Workaround
- Use an unscoped (full-access) API token instead of a scoped token
- Example CURL to add attachments
curl --request POST \ --url https://Cloud URL/jsm/ops/api/Cloud_ID/v1/alerts/alert_id/attachments \ --header 'Authorization: Basic [...]' \ --header 'content-type: multipart/form-data' \ --form file=@file