Resources
Invites
Everything concerning program invites.
Create program invite
POST /programs/{programId}/invites
Description
Creates a program invite. Sample request:
POST /programs/123/invites { "name": "new invite", "html": "<div />", "css": "body {color:black}" }
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Body |
body |
An object containing all the values for the program invite update. |
Get program invites
GET /programs/{programId}/invites
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Ok, the request has succeeded. The list of program invites is returned. |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program or program invite is not found. |
No Content |
Get program invite
GET /programs/{programId}/invites/{inviteId}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
inviteId |
The id of the program invite. |
integer (int32) |
Path |
programId |
The id of the program. |
integer (int32) |
Update program invite
PUT /programs/{programId}/invites/{inviteId}
Description
Updates the program invite. Sample request:
PUT /programs/123/invites/1 { "name": "new program", "html": "<div />", "css": "body { color:black }" }
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
inviteId |
The id of the program invite. |
integer (int32) |
Path |
programId |
The id of the program. |
integer (int32) |
Body |
body |
An object containing all the values for the program invite update. |
Overlays
Everything concerning program overlays.
Create program overlay
POST /programs/{programId}/overlays
Description
Creates a program overlay. Sample request:
POST /programs/123/overlays { "name": "new overlay", "html": "<div />", "css": "body {color:black}" }
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Body |
body |
An object containing all the values for the program overlay update. |
Get program overlays
GET /programs/{programId}/overlays
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Ok, the request has succeeded. The list of program overlays is returned. |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program or program overlay is not found. |
No Content |
Get program overlay
GET /programs/{programId}/overlays/{overlayId}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
overlayId |
The id of the program overlay. |
integer (int32) |
Path |
programId |
The id of the program. |
integer (int32) |
Update program overlay
PUT /programs/{programId}/overlays/{overlayId}
Description
Updates the program overlay. Sample request:
PUT /programs/123/overlays/1 { "name": "new program", "html": "<div />", "css": "body { color:black }" }
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
overlayId |
The id of the program overlay. |
integer (int32) |
Path |
programId |
The id of the program. |
integer (int32) |
Body |
body |
An object containing all the values for the program overlay update. |
Programs
Everything concerning programs.
Create program
POST /programs
Description
Creates the program. Sample request:
POST /programs { "name": "new program", "programType": "WEB" }
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created. Created new program. The new program is returned. |
|
400 |
Bad request, the query parameters are not valid. |
No Content |
401 |
Unauthorized |
No Content |
Example HTTP response
Response 201
{
"id" : 1,
"name" : "My Program",
"companyId" : 1,
"isPublished" : true,
"created" : "2020-08-08T14:56:34.397+00:00",
"createdBy" : 1,
"lastModified" : "2020-08-08T14:56:34.397+00:00",
"lastModifiedBy" : 1,
"loaderLink" : {
"url" : "http://localhost/api/digitalfeedback/loader?programKey=PmTXgb",
"integrity" : "sha256-aaLJddggEQqKyp1E2Lcy3+S6fY4MvpwdCS9t3Nl3hj0="
},
"previewUrl" : "http://localhost/preview",
"lastPublished" : "2020-08-08T14:56:34.397+00:00",
"version" : 1,
"publicKey" : "PmTXgb",
"customDomainOverride" : "",
"enableSri" : true,
"programType" : "WEB",
"createdByUser" : "John Smith",
"lastModifiedByUser" : "John Smith",
"companyName" : "Confirmit",
"links" : {
"self" : "/v1/digitalfeedback-design/programs/1"
}
}
Get programs
GET /programs
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query |
desc |
Get programs in descendant order (default=false). Optional. Ex: Append desc=true to the query parameters. |
boolean |
|
Query |
orderBy |
The name of the variable used to order the programs (default='lastModified'). Optional. Ex: Append orderBy=id to the query parameters. Possible values: [id,name,companyName,isPublished,lastModified,lastPublished,created,createdByUser,lastModifiedByUser] |
string |
|
Query |
page |
Use this when paging through the programs (default=1). Optional. Ex: Append page=4 to the query parameters. |
integer (int32) |
|
Query |
pageSize |
Number of programs to retrieve per request (default=100). Optional. Ex: Append pageSize=20 to the query parameters. |
integer (int32) |
|
Query |
search |
Search by program name or publicKey (default=''). Optional. Ex: Append search=live to the query parameters. |
string |
|
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Ok, the request has succeeded. The list of programs is returned. |
|
400 |
Bad request, the query parameters are not valid. |
No Content |
401 |
Unauthorized |
No Content |
Example HTTP response
Response 200
{
"itemType" : "Program",
"itemCount" : 1,
"totalCount" : 1,
"items" : [ {
"id" : 1,
"name" : "My Program",
"companyId" : 1,
"isPublished" : false,
"created" : "2020-08-08T14:56:34.397+00:00",
"createdBy" : 1,
"lastModified" : "2020-08-08T14:56:34.397+00:00",
"lastModifiedBy" : 1,
"lastPublished" : "2020-08-08T14:56:34.397+00:00",
"version" : 1,
"publicKey" : "PmTXgb",
"customDomainOverride" : "",
"enableSri" : false,
"programType" : "WEB",
"createdByUser" : "administrator administrator",
"lastModifiedByUser" : "administrator administrator",
"companyName" : "Confirmit",
"links" : { }
} ],
"links" : {
"item" : "/v1/digitalfeedback-design/programs/{programId}"
}
}
Import program
POST /programs/import
Description
Imports the program. Payload is a zip archive for program import. Sample request:
POST /programs/import < program.zip
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created. Created new program. The new program is returned. |
|
400 |
Bad request, the query parameters are not valid. |
No Content |
401 |
Unauthorized |
No Content |
Example HTTP response
Response 201
{
"id" : 1,
"name" : "My Program",
"companyId" : 1,
"isPublished" : true,
"created" : "2020-08-08T14:56:34.397+00:00",
"createdBy" : 1,
"lastModified" : "2020-08-08T14:56:34.397+00:00",
"lastModifiedBy" : 1,
"loaderLink" : {
"url" : "http://localhost/api/digitalfeedback/loader?programKey=PmTXgb",
"integrity" : "sha256-aaLJddggEQqKyp1E2Lcy3+S6fY4MvpwdCS9t3Nl3hj0="
},
"previewUrl" : "http://localhost/preview",
"lastPublished" : "2020-08-08T14:56:34.397+00:00",
"version" : 1,
"publicKey" : "PmTXgb",
"customDomainOverride" : "",
"enableSri" : true,
"programType" : "WEB",
"createdByUser" : "John Smith",
"lastModifiedByUser" : "John Smith",
"companyName" : "Confirmit",
"links" : {
"self" : "/v1/digitalfeedback-design/programs/1"
}
}
Get program
GET /programs/{programId}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Ok, the request has succeeded. The program is returned. |
|
400 |
Bad request, the query parameters are not valid. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program is not found. |
No Content |
Example HTTP response
Response 200
{
"id" : 1,
"name" : "My Program",
"companyId" : 1,
"isPublished" : true,
"created" : "2020-08-08T14:56:34.397+00:00",
"createdBy" : 1,
"lastModified" : "2020-08-08T14:56:34.397+00:00",
"lastModifiedBy" : 1,
"loaderLink" : {
"url" : "http://localhost/api/digitalfeedback/loader?programKey=PmTXgb",
"integrity" : "sha256-aaLJddggEQqKyp1E2Lcy3+S6fY4MvpwdCS9t3Nl3hj0="
},
"previewUrl" : "http://localhost/preview",
"lastPublished" : "2020-08-08T14:56:34.397+00:00",
"version" : 1,
"publicKey" : "PmTXgb",
"customDomainOverride" : "",
"enableSri" : true,
"programType" : "WEB",
"createdByUser" : "John Smith",
"lastModifiedByUser" : "John Smith",
"companyName" : "Confirmit",
"links" : {
"self" : "/v1/digitalfeedback-design/programs/1"
}
}
Update program
PUT /programs/{programId}
Description
Updates the program. Sample request:
PUT /programs/123 { "name": "new program", "customDomainOverride": "https://mydomain.com/api/digitalfeedback", "enableSri": true }
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Body |
body |
An object containing all the values for the program update. |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Ok, the request has succeeded. The program is returned. |
|
400 |
Bad request, the query parameters are not valid. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program is not found. |
No Content |
Example HTTP response
Response 200
{
"id" : 1,
"name" : "My Program",
"companyId" : 1,
"isPublished" : true,
"created" : "2020-08-08T14:56:34.397+00:00",
"createdBy" : 1,
"lastModified" : "2020-08-08T14:56:34.397+00:00",
"lastModifiedBy" : 1,
"loaderLink" : {
"url" : "http://localhost/api/digitalfeedback/loader?programKey=PmTXgb",
"integrity" : "sha256-aaLJddggEQqKyp1E2Lcy3+S6fY4MvpwdCS9t3Nl3hj0="
},
"previewUrl" : "http://localhost/preview",
"lastPublished" : "2020-08-08T14:56:34.397+00:00",
"version" : 1,
"publicKey" : "PmTXgb",
"customDomainOverride" : "",
"enableSri" : true,
"programType" : "WEB",
"createdByUser" : "John Smith",
"lastModifiedByUser" : "John Smith",
"companyName" : "Confirmit",
"links" : {
"self" : "/v1/digitalfeedback-design/programs/1"
}
}
Delete program
DELETE /programs/{programId}
Duplicate program
POST /programs/{programId}/duplicate
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
|
Query |
duplicateObjectPermissions |
Duplicate explicit object permissions. |
boolean |
|
Query |
name |
The name of the new program. Optional. The new program will have 'Copy of' name prefix by default. |
string |
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Ok, the request has succeeded. The program is returned. |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program is not found. |
No Content |
Example HTTP response
Response 201
{
"id" : 1,
"name" : "My Program",
"companyId" : 1,
"isPublished" : true,
"created" : "2020-08-08T14:56:34.397+00:00",
"createdBy" : 1,
"lastModified" : "2020-08-08T14:56:34.397+00:00",
"lastModifiedBy" : 1,
"loaderLink" : {
"url" : "http://localhost/api/digitalfeedback/loader?programKey=PmTXgb",
"integrity" : "sha256-aaLJddggEQqKyp1E2Lcy3+S6fY4MvpwdCS9t3Nl3hj0="
},
"previewUrl" : "http://localhost/preview",
"lastPublished" : "2020-08-08T14:56:34.397+00:00",
"version" : 1,
"publicKey" : "PmTXgb",
"customDomainOverride" : "",
"enableSri" : true,
"programType" : "WEB",
"createdByUser" : "John Smith",
"lastModifiedByUser" : "John Smith",
"companyName" : "Confirmit",
"links" : {
"self" : "/v1/digitalfeedback-design/programs/1"
}
}
Export program
GET /programs/{programId}/export
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Publish program
POST /programs/{programId}/publish
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
ScenarioParameters
Everything concerning program scenario parameters.
Get program scenario parameters
GET /programs/{programId}/scenarios/{scenarioId}/parameters
Description
Returns a flat list of program scenario parameters. Sample request:
GET /programs/123/scenarios/456/parameters
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Path |
scenarioId |
The id of the program scenario. |
integer (int32) |
Get program scenario parameter
GET /programs/{programId}/scenarios/{scenarioId}/parameters/{parameterName}
Description
Returns a program scenario parameter. Sample request:
GET /programs/123/scenario/456/parameters/username
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
parameterName |
The name of the program scenario parameter. |
string |
Path |
programId |
The id of the program. |
integer (int32) |
Path |
scenarioId |
The id of the program scenario. |
integer (int32) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Ok, the request has succeeded. The program scenario parameter is returned. |
|
400 |
Bad request, the query parameters are not valid. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program or program scenario or program scenario parameter is not found. |
No Content |
Update program scenario parameter
PUT /programs/{programId}/scenarios/{scenarioId}/parameters/{parameterName}
Description
Updates the program scenario parameter. Sample request:
PUT /programs/123/scenarios/456/parameters/username { "value": "John" } PUT /programs/123/scenarios/456/parameters/mymap { "value": "{\"p1876791255\":\"1\", \"p1876791255\":\"0\"}" }
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
parameterName |
The name of the program scenario parameter. |
string |
Path |
programId |
The id of the program. |
integer (int32) |
Path |
scenarioId |
The id of the program scenario. |
integer (int32) |
Body |
body |
An object containing all the values for the program scenario parameter update. |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Ok, the request has succeeded. The program scenario parameter is returned. |
|
400 |
Bad request, the query parameters are not valid. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program or program scenario is not found. |
No Content |
ScenarioTemplateParameters
Everything concerning program scenario template parameters.
Create program scenario template parameter
POST /programs/{programId}/templates/{templateId}/parameters
Description
Creates the program scenario template parameter. Sample request:
POST /programs/123/templates/789/parameters { "name": "username", "label": "User name", "type": "string" }
Type property can be any of [string,number,map,survey,invite,container]. String/number will be rendered as text field inputs, map - key-value pairs list, survey/invite/container - dropdown selectors. Properties started with key* and value* are for parameters with type=Map only.
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Path |
templateId |
The id of the program scenario template. |
integer (int32) |
Body |
body |
An object containing all the values for the program scenario parameter update. |
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created. The program scenario template parameter is returned. |
|
400 |
Bad request, the query parameters are not valid. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program or program scenario template is not found. |
No Content |
Get program scenario template parameters
GET /programs/{programId}/templates/{templateId}/parameters
Description
Returns a list of program scenario template parameters. Sample request:
GET /programs/123/templates/789/parameters
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Path |
templateId |
The id of the program scenario template. |
integer (int32) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Ok, the request has succeeded. The list of program scenario template parameters is returned. |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program or program scenario is not found. |
No Content |
Example HTTP response
Response 200
{
"itemType" : "ScenarioTemplateParameter",
"itemCount" : 1,
"totalCount" : 1,
"items" : [ {
"name" : "username",
"type" : "String",
"caption" : "Username",
"keyType" : "String",
"valueType" : "String",
"links" : { }
} ],
"links" : {
"item" : "/v1/digitalfeedback-design/programs/123/templates/789/parameters/{parameterName}"
}
}
Get program scenario template parameter
GET /programs/{programId}/templates/{templateId}/parameters/{parameterName}
Description
Returns a program scenario template parameter. Sample request:
GET /programs/123/templates/789/parameters/username
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
parameterName |
The name of the program scenario parameter. |
string |
Path |
programId |
The id of the program. |
integer (int32) |
Path |
templateId |
The id of the program scenario template. |
integer (int32) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Ok, the request has succeeded. the program scenario is returned. |
|
400 |
Bad request, the query parameters are not valid. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program or program scenario or program scenario parameter is not found. |
No Content |
Update program scenario template parameter
PUT /programs/{programId}/templates/{templateId}/parameters/{parameterName}
Description
Updates the program scenario template parameter. Sample request:
PUT /programs/123/templates/789/parameters/username { "name": "username", "label": "User name", "type": "string" }
Type property can be any of [string,number,map,survey,invite,container]. String/number will be rendered as text field inputs, map - key-value pairs list, survey/invite/container - dropdown selectors. Properties started with key* and value* are for parameters with type=Map only.
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
parameterName |
The name of the program scenario parameter. |
string |
Path |
programId |
The id of the program. |
integer (int32) |
Path |
templateId |
The id of the program scenario template. |
integer (int32) |
Body |
body |
An object containing all the values for the program scenario parameter update. |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Ok, the request has succeeded. The program scenario template parameter is returned. |
|
400 |
Bad request, the query parameters are not valid. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program or program scenario template is not found. |
No Content |
Delete program scenario template parameter
DELETE /programs/{programId}/templates/{templateId}/parameters/{parameterName}
Description
Deletes the program scenario template parameter. Sample request:
DELETE /programs/123/templates/789/parameters/username
ScenarioTemplates
Everything concerning program scenario templates.
Create program scenario template
POST /programs/{programId}/templates
Description
Creates a program scenario template. Sample request:
POST /programs/123/templates { "name": "t1", "code": "alert(1)" }
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Body |
body |
An object containing all the values for the program scenario template update. |
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created. Created new program scenario template. The new program scenario template is returned. |
|
400 |
Bad request, the query parameters are not valid. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program is not found. |
No Content |
Get program scenario templates
GET /programs/{programId}/templates
Description
Returns a list of program scenario templates. Sample request:
GET /programs/123/templates
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Ok, the request has succeeded. The list of program scenario templates is returned. |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program or program scenario template is not found. |
No Content |
Example HTTP response
Response 200
{
"itemType" : "ScenarioTemplate",
"itemCount" : 1,
"totalCount" : 1,
"items" : [ {
"id" : 66,
"programId" : 123,
"name" : "s1",
"funcName" : "func66",
"lastModified" : "2020-08-08T14:56:34.397+00:00",
"links" : { }
} ],
"links" : {
"item" : "/v1/digitalfeedback-design/programs/123/templates/{templateId}"
}
}
Get program scenario template
GET /programs/{programId}/templates/{scenarioTemplateId}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Path |
scenarioTemplateId |
The id of the program scenario template. |
integer (int32) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Ok, the request has succeeded. The program scenario template is returned. |
|
400 |
Bad request, the query parameters are not valid. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program or program scenario template is not found. |
No Content |
Update program scenario template
PUT /programs/{programId}/templates/{scenarioTemplateId}
Description
Updates the program scenario template. Sample request:
PUT /programs/123/templates/1 { "name": "t1", "code": "alert(1)" }
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Path |
scenarioTemplateId |
The id of the program scenario template. |
integer (int32) |
Body |
body |
An object containing all the values for the program scenario template update. |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Ok, the request has succeeded. The program scenarioTemplate is returned. |
|
400 |
Bad request, the query parameters are not valid. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program or program scenarioTemplate is not found. |
No Content |
Scenarios
Everything concerning program scenarios.
Create program scenario
POST /programs/{programId}/scenarios
Description
Creates a program scenario. Sample request:
POST /programs/123/scenarios { "name": "new scenario", "script": "api().invite('default').show()" } POST /programs/123/scenarios { "name": "new scenario", "scenarioType": "templateBased", "templateId": 10 }
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Body |
body |
An object containing all the values for the program scenario update. |
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created. Created new program scenario. The new program scenario is returned. |
|
400 |
Bad request, the query parameters are not valid. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program is not found. |
No Content |
Get program scenarios
GET /programs/{programId}/scenarios
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Ok, the request has succeeded. The list of program scenarios is returned. |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program or program scenario is not found. |
No Content |
Example HTTP response
Response 200
{
"itemType" : "Scenario",
"itemCount" : 1,
"totalCount" : 1,
"items" : [ {
"id" : 1,
"programId" : 123,
"name" : "s1",
"isEnabled" : true,
"lastModified" : "2020-08-08T14:56:34.397+00:00",
"scenarioType" : "Normal",
"templateId" : 0,
"links" : { }
} ],
"links" : {
"item" : "/v1/digitalfeedback-design/programs/123/invites/{scenarioId}"
}
}
Get program scenario
GET /programs/{programId}/scenarios/{scenarioId}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Path |
scenarioId |
The id of the program scenario. |
integer (int32) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Ok, the request has succeeded. The program scenario is returned. |
|
400 |
Bad request, the query parameters are not valid. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program or program scenario is not found. |
No Content |
Update program scenario
PUT /programs/{programId}/scenarios/{scenarioId}
Description
Updates the program scenario. Sample request:
PUT /programs/123/scenarios/1 { "name": "new scenario", "script": "api().invite('default').show()" }
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Path |
scenarioId |
The id of the program scenario. |
integer (int32) |
Body |
body |
An object containing all the values for the program scenario update. |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Ok, the request has succeeded. The program scenario is returned. |
|
400 |
Bad request, the query parameters are not valid. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program or program scenario is not found. |
No Content |
Delete program scenario
DELETE /programs/{programId}/scenarios/{scenarioId}
Toggle program scenario
PATCH /programs/{programId}/scenarios/{scenarioId}
Description
Toggles the program scenario. Sample request:
PATCH /programs/123/scenarios/1 { "isEnabled": false }
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Path |
scenarioId |
The id of the program scenario. |
integer (int32) |
Body |
body |
An object containing all the values for the program scenario update. |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Ok, the request has succeeded. The program scenario is returned. |
|
400 |
Bad request, the query parameters are not valid. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program or program scenario is not found. |
No Content |
Move program scenario
PUT /programs/{programId}/scenarios/{scenarioId}/move
Description
Move the program scenario to change scenario execution order. Sample request:
PUT /programs/123/scenarios/1/move { "targetId": 2, "position": "after" }
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Path |
scenarioId |
The id of the program scenario. |
integer (int32) |
Body |
body |
An object containing all the values for the program scenario update. |
Responses
HTTP Code | Description | Schema |
---|---|---|
204 |
No content, the request has succeeded. The program scenario is moved. |
No Content |
400 |
Bad request, the query parameters are not valid. |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden. |
No Content |
404 |
Not found, the program or program scenario is not found. |
No Content |
Surveys
Everything concerning program surveys.
Assign survey to program
POST /programs/{programId}/surveys
Description
Assigns survey to a program. Sample request:
POST /programs/123/surveys { "surveyId": "p00000001" }
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Body |
body |
An object containing all the values for the survey assignment. |
Get assigned program surveys
GET /programs/{programId}/surveys
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
programId |
The id of the program. |
integer (int32) |
Remove survey assignment from program
DELETE /programs/{programId}/surveys/{surveyId}
Description
Removes assignment from a program. Sample request:
DELETE /programs/123/surveys/p0000001