İçeriğe geç
R-Service R-Service
Документация Р-Сервис

Surveys API

Bu içerik henüz dilinizde mevcut değil.

List all surveys for an account:

GET /surveys
Status: 200 OK
[
{
"id": 1,
"name": "My Survey",
"created_at": "2021-07-21T06:41:06-05:00",
"updated_at": "2021-07-21T06:41:06-05:00",
"nodeID": "..."
},
"..."
]

The response contains these fields by default. Filtering and pagination are available to reduce/limit the collection of surveys.

The following predefined filters are available:

  • /surveys/disabled : List all disabled surveys
  • /surveys/enabled : List all enabled surveys

By default the following fields will appear in collections of surveys:

id name created_at updated_at

Obtain a different set of fields using the ?fields= parameter .

Filtering is available for the following fields :

id source sourceID created_at updated_at disabled name

By default a collection of surveys is sorted ascending by id .

The following fields are accepted by the ?sort= parameter :

id sourceID created_at updated_at

GET /surveys/:id
Status: 200 OK
{
"completion": null,
"created_at": "2021-07-21T06:41:07-05:00",
"disabled": false,
"id": 12,
"introduction": null,
"name": "My Survey",
"source": null,
"sourceID": null,
"updated_at": "2021-07-21T06:41:07-05:00",
"...": "..."
}

The response contains these fields .

POST /surveys

When creating a new survey these fields are available.

Status: 201 Created
{
"name": "...",
"...": "..."
}

The response contains all fields of the created survey and is similar to the response in Get a single survey .

PATCH /surveys/:id

When updating an survey these fields are available.

Status: 200 OK
{
"name": "...",
"...": "..."
}

The response contains all fields of the updated survey and is similar to the response in Get a single survey .

attachments

Readonly aggregated Attachments

created_at

Readonly datetime — The date and time at which the survey was created.

completion

Optional text (max 64KB) — The Completion field is used to enter content shown to respondents on completion of the survey.

completion_attachments

Writeonly attachments The attachments used in the Completion field.

disabled

Optional boolean , default: false — The Disabled box is checked when the survey may no longer be related to services and users should not be asked to use it to rate services it is linked to.

id

Readonly integer — The unique ID of the survey.

introduction

Optional text (max 64KB) — The Introduction field is used to enter content shown to respondents before the first question of the survey.

introduction_attachments

Writeonly attachments The attachments used in the Introduction field.

name

Required string (max 128) — The Name field is used to enter the name of the survey.

source

Optional string (max 30) - See source

sourceID

Optional string (max 128) - See source

updated_at

Readonly datetime — The date and time of the last update of the survey. If the survey has no updates it contains the created_at value.