Here's how to access the results of surveys answered by customers.

Prerequisites

Authentication

The Surveys for JSM REST API uses the same authentication as the Jira API authentication. For more information, consult the Atlassian Developers documentation.

GET Method

Retrieving Surveys for JSM results

Surveys for JSM REST API can return the survey results when requested with the endpoint parameters below.

Code Example

https://surveys-jsm.servicerocket.io/surveys?projectKey=your-project-key&responded=true
CODE


The example below shows an example where all the results were returned. You only see one data block as the total survey is only one in this scenario.

Response Example

{
    "issue_surveys": [{
        "ces_response": 10,
        "comment_response": "Cool",
        "created": "2022-04-04T06:09:58",
        "issue_assignee": null,
        "issue_assignee_id": null,
        "issue_creation_date": 1649051994467,
        "issue_id": 10010,
        "issue_key": "LEV-11",
        "issue_reporter": "Team Lead Jane",
        "modified": "2022-04-04T06:14:26",
        "nps_response": 10,
        "project_key": "LEV",
        "response_date": "2022-04-04T06:13:57",
        "reviewer": "Mark Roberts",
        "reviewer_notes": "Approved",
        "scale_response": 9,
        "survey_id": "bb86cb87-332d-4f62-97ee-0896eb74792b-LEV"
    }],
    "total_surveys": 1,
    "total_surveys_responded": 1
}
CODE

Endpoint Parameters

keyrequiredcontent typevalue
projectKeyyesstring

The project that is associated with the surveys.

date_fromnostring

The starting date range of the surveys.

Default: If no value is passed, there will be no cutoff point for the starting point.

date_tonostring

The ending date range of the surveys.

Default: If no value is passed, there will be no cutoff point for the ending point.

assigneenostring

Filter the results by the assignee.

Default: If no value is passed, the results won't be filtered by the assignee.

respondednoboolean

Whether surveys that only have been responded to should be returned.

Default: false

Response Code

200

Returned if the request is successful.

400

Access is not enabled or the API key is invalid