Versions Compared

Key

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

...

We use Jira authentication, that is a user must be logged int Jira to be able to retrieve survey information. In addition to this survey permissions are applied. This means that your user can get the same level of information from both the app UI and via REST.

REST services


RequestTypeDescription
Example
getAnswersGET

Gets survey answers to survey custom questions for the single project during the specified date range.

Parameters

  • projectKey – required parameter
  • startDate –
  • endDate –
http://example.com/jira/rest/surveysData/1.0/getAnswers?projectKey=TEST&startDate=&endDate=

Example - link to the example request & response below

getAvgReportGET

Gets results of the Average Rating Report for an active survey in a specified project within the specified date range.

Parameters

  • projectKey – required parameter
  • startDate –
  • endDate –
http://example.com/jira/rest/surveysData/1.0/getAvgReport?pKey=TEST&startDate=&endDate=
getByIssueGET

Gets survey rating and user comment for a specified ticket.

One of the following parameters must be specified:

  • IssueKey
  • IssueId
http://example.com/jira/rest/surveysData/1.0/rating/getByIssue?issueKey=TEST-1
getDateReportGET

Retrieves data from the "Date Report on User Usage" report for the specified project within the specified date range.

Parameters

  • projectKey – required parameter
  • startDate –
  • endDate –



Request and response examples

getAnswers

http://example.com/jira/rest/surveysData/1.0/getAnswers?projectKey=TEST&startDate=&endDate=

getAvgReport

http://example.com/jira/rest/surveysData/1.0/

...

getAvgReport?pKey=TEST&startDate=&endDate=

...

getByIssue


http://example.com/jira/rest/surveysData/1.0/rating/getByIssue?issueKey=TEST-1

...

Code Block
{
  "status": "200",
  "result": [
    {
      "issueKey": "TEST-1",
      "issueId": 999,
      "issueRating": 4,
      "issueViewRating": "4 out of 5",
      "issueComment": "some comment"
    },
    {
      "issueKey": "TEST-1",
      "issueId": 333,
      "issueRating": 5,
      "issueViewRating": "5 out of 5",
      "issueComment": "another comment"
    }
  ]
}


getDateReport

http://example.com/jira/rest/surveysData/1.0/getDateReport?pKey=TEST&startDate=&endDate=