Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Endpoints:

Code Block
languagejava
/rest/sla/1.0/analytics/{issueKey}
/rest/sla/1.0/analytics/{issueKey}/{analyticsId}

where issueKey is the key of the issue we want data from, analyticsId is the ID of Analytics we want to filter with.

The first endpoint uses only the Issue key and shows all data for all Analytics in a given issue. The second one filters it to selected Analytics.

Response structure:

"analyticsData": 

      [

            {

              "analyticsName": text,

              "analyticsId": text,

              "values": [

                     {

                        "name": text,

                         "seconds": number,

                        "duration": text,

                        "percent": text

                     }

                ]

             }

   ]

analyticsName

name of Analytics

analyticsId

Analytics ID

values

an array of Analytics values

name

value name

seconds

number of seconds such value was present

duration

human-readable time of above value

percent

percentage of occurrence of that value

If successful, the response status isOK HTTP 200.

If no Issue/Analytics corresponding to provided keys were found, the endpoint returns NOT FOUND HTTP 404.

If a user has no permission for this issue - No issue with a provided key was found.

If a user has permission but there is no SLA agreement for the issue - Issue has no valid SLA agreement.

If a user has permission but provided wrong Analytics key - No SLA Analytics with provided key was found.

Example of Analytics data returned from REST API

Image Modified