Introduction
API for getting RealTime pulses related information.
Authentication
SERMO oAuth2 access token has to be passed as bearer token in the Authorization header. API returns 401 Unauthorized in case access token is invalid or expired.
Project data export
https://{host}/projects/{projectId}/export
GET returns back the full information of the project.
Returns 404 Not Found if specified project doesn't exist or if it is not in the list of user's (client's) projects.
Returned object details:
Field name | Field type | Notes |
---|---|---|
Project | 'Project' object | Object representing RT pulse |
Project -> ProjectId | guid | Unique pulse identifier |
Project -> Title | string | Title of pulse as visible for respondents |
Project -> InternalTitle | string | Internal title of pulse |
Project -> Identifier | string, optional | Custom additional project identifier |
Project -> StartDate | datetime, optional | Pulse launch date |
Project -> EndDate | datetime, optional | Pulse end date |
Project -> FieldingTime | string | Pulse fielding time in format "hh:mm" |
Project -> ExternalIntroduction | string | Pulse introduction as visible for respondents |
Project -> Questions | array of 'Question' objects | |
Project -> Questions -> Question | 'Question' object | Object representing each pulse question |
Project -> Questions -> Question -> QuestionCode | string | Unique question identifier in pulse |
Project -> Questions -> Question -> Title | string | Question text |
Project -> Questions -> Question -> Type | string | Question type (Rank, Text, MultiSelect, SingleSelect, GridMultiSelect, GridSingleSelect, Numeric) |
Project -> Questions -> Question -> IsScreener | bool | Flag specifying is question is a screener question |
Project -> Questions -> Question -> Choices | array of string values | List of answer choices for question |
Project -> Questions -> Question -> ParentCode | string, optional | Code of parent question. Null if current question is not a "follow-up" question |
Project -> Questions -> Question -> OtherAvailable | bool | Flag specifying if question has open-ended answer choice |
Project -> Questions -> Question -> DisplayUnit | string, optional | Custom text next to answer inputs, for example, "%" |
Project -> Questions -> Question -> FixedSumTotal | integer, optional | Number to which sum of numeric type question inputs' values should sum to |
Project -> Questions -> Question -> AnswersRequired | integer | Required number of answer choices to be selected |
Project -> Questions -> Question -> FreetextLabels | array of string values | List of choice labels for open-ended answers |
Project -> Questions -> Question -> Rows | array of 'Question' objects | List of rows (questions) in "GridMultiSelect" or "GridSingleSelect" type questions |
Respondents | array of 'Respondent' objects | List of respondents who took part in a pulse |
Respondents -> Respondent | 'Respondent' object | Object representing RT pulse respondent |
Respondents -> Respondent -> RespondentId | guid | Unique respondent identifier |
Respondents -> Respondent -> SermoId | integer, optional | SERMO id of respondent (shown or not shown depending on client account configuration) |
Respondents -> Respondent -> SurveyStatus | string | Status of survey ("Incomplete", "ScreenedOut", "ScreenedIn", "Completed", "QuotaFull") |
Respondents -> Respondent -> Profile | array of key-value objects | List of respondent defining properties like specialty, country on state |
Respondents -> Respondent -> Answers | array of 'Answer' objects | List of all respondent answers |
Respondents -> Respondent -> Answers -> Answer | 'Answer' object | Object representing respondent's answers to one question |
Respondents -> Respondent -> Answers -> Answer -> QuestionCode | string | Code of the answered question |
Respondents -> Respondent -> Answers -> Answer -> Values | array of string values | All selected/typed answers to the question |
Respondents -> Respondent -> FirstInteraction | datetime | Time of first respondent interaction |
Respondents -> Respondent -> LastInteraction | datetime | Time of last respondent interaction |
ClientName | string | Name of the client (pulse owner) |
Returned object example:
{
"Project": {
"ProjectId": "7af5803c-a96b-4530-b37d-dff619958084",
"Title": "Project title",
"InternalTitle": "Internal project title",
"Identifier": null,
"StartDate": "2016-06-14T16:52:03.111026",
"EndDate": "2016-06-14T17:26:14.684983",
"FieldingTime": "0:34",
"ExternalIntroduction": "Introduction to respondents",
"Questions": [
{
"QuestionCode": "1",
"Title": "Question one",
"Type": "single answer",
"IsScreener": false,
"Choices": ["Yes","No"],
"ParentCode": null,
"OtherAvailable": false,
"DisplayUnit": null,
"FixedSumTotal": null,
"AnswersRequired": 1,
"FreetextLabels": null,
"Rows": null
}
...
]
},
"Respondents": [
{
"RespondentId": "05cfd950-75ce-4a09-9d30-9cf5dc72d454",
"SermoId": null,
"SurveyStatus": "Completed",
"Profile": [
{
"Key": "specialty",
"Value": "Cardiology"
},
{
"Key": "country",
"Value": "United States"
},
{
"Key": "state",
"Value": "Hawaii"
}
],
"Answers": [
{
"QuestionCode": "1",
"Values": [
"Yes"
]
}
],
"FirstInteraction": "2016-06-14T16:54:51.699663",
"LastInteraction": "2016-06-14T16:55:29.000073"
},
...
],
"ClientName": "RT example client"
}
Client projects
https://{host}/clients/projectsInfo
GET returns object containing list of project ids relevant to the given user by given access token.
Returned object details:
Field name | Field type | Notes |
---|---|---|
ProjectIds | array of guid |
Returned object example:
{
"ProjectIds" : [
"0e3cdcb6-4cbe-4602-9cd4-8e3d461ea6a7",
"1f4dedc7-5dcf-5713-ade5-9f4e572fb7b8",
"205efed8-6ed0-6824-bef6-a05f6830c8c9"
]
}
Client info
https://{host}/clients/info
GET returns object containing client info as well as list of projects with related metadata that client has access to.
Returned object details:
Field name | Field type | Notes |
---|---|---|
ClientInfo | 'ClientInfo' object | Object representing information about a client |
ClientInfo -> Admin | bool | Flag indicating if a client is Admin |
ProjectInfo | array of 'ProjectInfo' objects | Object containing information about Project |
ProjectInfo -> ProjectId | guid | Id of Project |
ProjectInfo -> Title | string | Project title |
ProjectInfo -> Status | string | One of the following - "Completed", "Draft", "Launched", "Queued", "Held", "PendingMasterApproval", "Pending" |
ProjectInfo -> LastUpdated | datetime | Most recent date when project Status has changed |
Returned object example:
{
"ClientInfo": {
"Admin": false
},
"ProjectInfo": [
{
"ProjectId": "273369ab-a817-4625-8898-f9714d914f7b",
"Title": "Title1",
"Status": "Completed",
"LastUpdated": "2017-04-11T15:40:01.88918"
},
{
"ProjectId": "2d8f5c9f-db1d-4bcb-b2e7-af45b4da0b20",
"Title": "Title2",
"Status": "Completed",
"LastUpdated": "2017-05-15T13:20:01.972699"
}
]
}