Add alert attachment documentation is missing scopes information

XMLWordPrintable

    • 1
    • Minor
    • 1
    • Accessibility

      Issue Summary

      The The Jira Service Management ops REST API is missing two critical pieces of documentation:

      1. 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.
      2. 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

      1. Navigate to the The Jira Service Management ops REST API.
      2. Attempt to call the endpoint using a scoped API token, following the pattern used for other Alert endpoints.
      3. 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

       

              Assignee:
              Unassigned
              Reporter:
              Rakshitha G S
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: