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
required

The id of the program.

integer (int32)

Body

body
optional

An object containing all the values for the program invite update.

Responses
HTTP Code Description Schema

201

Created. Created new program invite. The new program invite 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

Consumes
  • application/json-patch+json

  • application/json

  • text/json

  • application/*+json

Produces
  • application/json

Example HTTP response
Response 201
{
  "id" : 1,
  "programId" : 123,
  "name" : "invite1",
  "html" : "<h1>hello</h1>",
  "css" : "body { color: black; }",
  "lastModified" : "2020-08-08T14:56:34.397+00:00",
  "links" : {
    "self" : "/v1/digitalfeedback-design/programs/123/invites/1"
  }
}

Get program invites

GET /programs/{programId}/invites
Description

Returns a list of program invites. Sample request:

GET /programs/123/invites
Parameters
Type Name Description Schema

Path

programId
required

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

Produces
  • application/json

Example HTTP response
Response 200
{
  "itemType" : "Invite",
  "itemCount" : 1,
  "totalCount" : 1,
  "items" : [ {
    "id" : 1,
    "programId" : 123,
    "name" : "invite1",
    "lastModified" : "2020-08-08T14:56:34.397+00:00",
    "links" : { }
  } ],
  "links" : {
    "item" : "/v1/digitalfeedback-design/programs/123/invites/{inviteId}"
  }
}

Get program invite

GET /programs/{programId}/invites/{inviteId}
Description

Returns a program invite. Sample request:

GET /programs/123/invites/1
Parameters
Type Name Description Schema

Path

inviteId
required

The id of the program invite.

integer (int32)

Path

programId
required

The id of the program.

integer (int32)

Responses
HTTP Code Description Schema

200

Ok, the request has succeeded. The program invite 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 invite is not found.

No Content

Produces
  • application/json

Example HTTP response
Response 200
{
  "id" : 1,
  "programId" : 123,
  "name" : "invite1",
  "html" : "<h1>hello</h1>",
  "css" : "body { color: black; }",
  "lastModified" : "2020-08-08T14:56:34.397+00:00",
  "links" : {
    "self" : "/v1/digitalfeedback-design/programs/123/invites/1"
  }
}

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
required

The id of the program invite.

integer (int32)

Path

programId
required

The id of the program.

integer (int32)

Body

body
optional

An object containing all the values for the program invite update.

Responses
HTTP Code Description Schema

200

Ok, the request has succeeded. The program invite 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 invite is not found.

No Content

Consumes
  • application/json-patch+json

  • application/json

  • text/json

  • application/*+json

Produces
  • application/json

Example HTTP response
Response 200
{
  "id" : 1,
  "programId" : 123,
  "name" : "invite1",
  "html" : "<h1>hello</h1>",
  "css" : "body { color: black; }",
  "lastModified" : "2020-08-08T14:56:34.397+00:00",
  "links" : {
    "self" : "/v1/digitalfeedback-design/programs/123/invites/1"
  }
}

Delete program invite

DELETE /programs/{programId}/invites/{inviteId}
Description

Deletes the program invite. Sample request:

DELETE /programs/123/invites/1
Parameters
Type Name Description Schema

Path

inviteId
required

The id of the program invite.

integer (int32)

Path

programId
required

The id of the program.

integer (int32)

Responses
HTTP Code Description Schema

204

No content, the request has succeeded. The program invite is deleted.

No Content

401

Unauthorized

No Content

403

Forbidden.

No Content

404

Not found, the program or program invite is not found.

No Content

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
required

The id of the program.

integer (int32)

Body

body
optional

An object containing all the values for the program overlay update.

Responses
HTTP Code Description Schema

201

Created. Created new program overlay. The new program overlay 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

Consumes
  • application/json-patch+json

  • application/json

  • text/json

  • application/*+json

Produces
  • application/json

Example HTTP response
Response 201
{
  "id" : 2,
  "programId" : 123,
  "name" : "overlay1",
  "html" : "<h1>hello</h1>",
  "css" : "body { color: black; }",
  "lastModified" : "2020-08-08T14:56:34.397+00:00",
  "links" : {
    "self" : "/v1/digitalfeedback-design/programs/123/overlays/2"
  }
}

Get program overlays

GET /programs/{programId}/overlays
Description

Returns a list of program overlays. Sample request:

GET /programs/123/overlays
Parameters
Type Name Description Schema

Path

programId
required

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

Produces
  • application/json

Example HTTP response
Response 200
{
  "itemType" : "Overlay",
  "itemCount" : 1,
  "totalCount" : 1,
  "items" : [ {
    "id" : 1,
    "programId" : 123,
    "name" : "overlay1",
    "lastModified" : "2020-08-08T14:56:34.397+00:00",
    "links" : { }
  } ],
  "links" : {
    "item" : "/v1/digitalfeedback-design/programs/123/overlays/{overlayId}"
  }
}

Get program overlay

GET /programs/{programId}/overlays/{overlayId}
Description

Returns a program overlay. Sample request:

GET /programs/123/overlays/1
Parameters
Type Name Description Schema

Path

overlayId
required

The id of the program overlay.

integer (int32)

Path

programId
required

The id of the program.

integer (int32)

Responses
HTTP Code Description Schema

200

Ok, the request has succeeded. The program overlay 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 overlay is not found.

No Content

Produces
  • application/json

Example HTTP response
Response 200
{
  "id" : 2,
  "programId" : 123,
  "name" : "overlay1",
  "html" : "<h1>hello</h1>",
  "css" : "body { color: black; }",
  "lastModified" : "2020-08-08T14:56:34.397+00:00",
  "links" : {
    "self" : "/v1/digitalfeedback-design/programs/123/overlays/2"
  }
}

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
required

The id of the program overlay.

integer (int32)

Path

programId
required

The id of the program.

integer (int32)

Body

body
optional

An object containing all the values for the program overlay update.

Responses
HTTP Code Description Schema

200

Ok, the request has succeeded. The program overlay 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 overlay is not found.

No Content

Consumes
  • application/json-patch+json

  • application/json

  • text/json

  • application/*+json

Produces
  • application/json

Example HTTP response
Response 200
{
  "id" : 2,
  "programId" : 123,
  "name" : "overlay1",
  "html" : "<h1>hello</h1>",
  "css" : "body { color: black; }",
  "lastModified" : "2020-08-08T14:56:34.397+00:00",
  "links" : {
    "self" : "/v1/digitalfeedback-design/programs/123/overlays/2"
  }
}

Delete program overlay

DELETE /programs/{programId}/overlays/{overlayId}
Description

Deletes the program overlay. Sample request:

DELETE /programs/123/overlays/1
Parameters
Type Name Description Schema

Path

overlayId
required

The id of the program overlay.

integer (int32)

Path

programId
required

The id of the program.

integer (int32)

Responses
HTTP Code Description Schema

204

No content, the request has succeeded. The program overlay is deleted.

No Content

401

Unauthorized

No Content

403

Forbidden.

No Content

404

Not found, the program or program overlay is not found.

No Content

Programs

Everything concerning programs.

Create program

POST /programs
Description

Creates the program. Sample request:

POST /programs
{
    "name": "new program",
    "programType": "WEB"
}
Parameters
Type Name Schema

Body

body
optional

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

Consumes
  • application/json

Produces
  • application/json

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
Description

Returns a list of programs. Sample request:

GET /programs
Parameters
Type Name Description Schema Default

Query

desc
optional

Get programs in descendant order (default=false). Optional. Ex: Append desc=true to the query parameters.

boolean

"false"

Query

orderBy
optional

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

"lastModified"

Query

page
optional

Use this when paging through the programs (default=1). Optional. Ex: Append page=4 to the query parameters.

integer (int32)

1

Query

pageSize
optional

Number of programs to retrieve per request (default=100). Optional. Ex: Append pageSize=20 to the query parameters.

integer (int32)

100

Query

search
optional

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

Produces
  • application/json

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

Produces
  • application/json

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}
Description

Returns a program. Sample request:

GET /programs/123
Parameters
Type Name Description Schema

Path

programId
required

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

Produces
  • application/json

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
required

The id of the program.

integer (int32)

Body

body
optional

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

Consumes
  • application/json-patch+json

  • application/json

  • text/json

  • application/*+json

Produces
  • application/json

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}
Description

Deletes the program. Sample request:

DELETE /programs/123
Parameters
Type Name Description Schema

Path

programId
required

The id of the program.

integer (int32)

Responses
HTTP Code Description Schema

204

No content, the request has succeeded. The program is deleted.

No Content

401

Unauthorized

No Content

403

Forbidden.

No Content

404

Not found, the program is not found.

No Content

Duplicate program

POST /programs/{programId}/duplicate
Description

Duplicate the program. Sample request:

POST /programs/123/duplicate?name=new%20program
Parameters
Type Name Description Schema Default

Path

programId
required

The id of the program.

integer (int32)

Query

duplicateObjectPermissions
optional

Duplicate explicit object permissions.

boolean

"false"

Query

name
optional

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

Produces
  • application/json

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
Description

Exports the program as a zip archive. Sample request:

GET /programs/123/export
Parameters
Type Name Description Schema

Path

programId
required

The id of the program.

integer (int32)

Responses
HTTP Code Description Schema

200

Ok, the request has succeeded. The program is exported.

string (byte)

401

Unauthorized

No Content

403

Forbidden.

No Content

404

Not found, the program is not found.

No Content

Produces
  • application/zip

  • application/json

Publish program

POST /programs/{programId}/publish
Description

Publish the program. Sample request:

POST /programs/123/publish
Parameters
Type Name Description Schema

Path

programId
required

The id of the program.

integer (int32)

Responses
HTTP Code Description Schema

200

Ok, the request has succeeded. The program is published.

401

Unauthorized

No Content

403

Forbidden.

No Content

404

Not found, the program is not found.

No Content

Produces
  • application/json

Example HTTP response
Response 200
{
  "loaderLink" : {
    "url" : "http://localhost/api/digitalfeedback/loader?programKey=PmTXgb",
    "integrity" : "sha256-aaLJddggEQqKyp1E2Lcy3+S6fY4MvpwdCS9t3Nl3hj0="
  }
}

Root

Root

GET /

Responses
HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

Produces
  • application/json

Example HTTP response
Response 200
{
  "id" : "Confirmit.Public.DigitalFeedback.Design.Api",
  "links" : {
    "self" : "/",
    "programs" : "/programs",
    "spec" : "/swagger"
  }
}

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
required

The id of the program.

integer (int32)

Path

scenarioId
required

The id of the program scenario.

integer (int32)

Responses
HTTP Code Description Schema

200

Ok, the request has succeeded. The list of program scenario parameters is returned.

401

Unauthorized

No Content

403

Forbidden.

No Content

404

Not found, the program or program scenario is not found.

No Content

Produces
  • application/json

Example HTTP response
Response 200
{
  "itemType" : "ScenarioParameter",
  "itemCount" : 1,
  "totalCount" : 1,
  "items" : [ {
    "name" : "username",
    "value" : "John",
    "links" : { }
  } ],
  "links" : {
    "item" : "/v1/digitalfeedback-design/programs/123/scenarios/456/parameters/{parameterName}"
  }
}

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
required

The name of the program scenario parameter.

string

Path

programId
required

The id of the program.

integer (int32)

Path

scenarioId
required

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

Produces
  • application/json

Example HTTP response
Response 200
{
  "name" : "username",
  "value" : "John",
  "links" : {
    "self" : "/v1/digitalfeedback-design/programs/123/scenarios/1/parameters/username"
  }
}

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
required

The name of the program scenario parameter.

string

Path

programId
required

The id of the program.

integer (int32)

Path

scenarioId
required

The id of the program scenario.

integer (int32)

Body

body
optional

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

Consumes
  • application/json-patch+json

  • application/json

  • text/json

  • application/*+json

Produces
  • application/json

Example HTTP response
Response 200
{
  "name" : "username",
  "value" : "John",
  "links" : {
    "self" : "/v1/digitalfeedback-design/programs/123/scenarios/1/parameters/username"
  }
}

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
required

The id of the program.

integer (int32)

Path

templateId
required

The id of the program scenario template.

integer (int32)

Body

body
optional

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

Consumes
  • application/json-patch+json

  • application/json

  • text/json

  • application/*+json

Produces
  • application/json

Example HTTP response
Response 201
{
  "name" : "username",
  "type" : "String",
  "caption" : "User name",
  "desc" : "This is a username field",
  "keyType" : "String",
  "valueType" : "String",
  "links" : {
    "self" : "/v1/digitalfeedback-design/programs/123/templates/789/parameters/username"
  }
}

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
required

The id of the program.

integer (int32)

Path

templateId
required

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

Produces
  • application/json

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
required

The name of the program scenario parameter.

string

Path

programId
required

The id of the program.

integer (int32)

Path

templateId
required

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

Produces
  • application/json

Example HTTP response
Response 200
{
  "name" : "username",
  "type" : "String",
  "caption" : "User name",
  "desc" : "This is a username field",
  "keyType" : "String",
  "valueType" : "String",
  "links" : {
    "self" : "/v1/digitalfeedback-design/programs/123/templates/789/parameters/username"
  }
}

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
required

The name of the program scenario parameter.

string

Path

programId
required

The id of the program.

integer (int32)

Path

templateId
required

The id of the program scenario template.

integer (int32)

Body

body
optional

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

Consumes
  • application/json-patch+json

  • application/json

  • text/json

  • application/*+json

Produces
  • application/json

Example HTTP response
Response 200
{
  "name" : "username",
  "type" : "String",
  "caption" : "User name",
  "desc" : "This is a username field",
  "keyType" : "String",
  "valueType" : "String",
  "links" : {
    "self" : "/v1/digitalfeedback-design/programs/123/templates/789/parameters/username"
  }
}

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
Parameters
Type Name Description Schema

Path

parameterName
required

The name of the program scenario parameter.

string

Path

programId
required

The id of the program.

integer (int32)

Path

templateId
required

The id of the program scenario template.

integer (int32)

Responses
HTTP Code Description Schema

204

No content, the request has succeeded. The program scenario template parameter is deleted.

No Content

401

Unauthorized

No Content

403

Forbidden.

No Content

404

Not found, the program or program scenario template is not found.

No Content

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
required

The id of the program.

integer (int32)

Body

body
optional

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

Consumes
  • application/json-patch+json

  • application/json

  • text/json

  • application/*+json

Produces
  • application/json

Example HTTP response
Response 201
{
  "id" : 66,
  "programId" : 123,
  "name" : "t1",
  "funcName" : "func66",
  "code" : "alert(1)",
  "lastModified" : "2020-08-08T14:56:34.397+00:00",
  "links" : {
    "self" : "/v1/digitalfeedback-design/programs/123/templates/1"
  }
}

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
required

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

Produces
  • application/json

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}
Description

Returns a program scenario template. Sample request:

GET /programs/123/templates/1
Parameters
Type Name Description Schema

Path

programId
required

The id of the program.

integer (int32)

Path

scenarioTemplateId
required

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

Produces
  • application/json

Example HTTP response
Response 200
{
  "id" : 66,
  "programId" : 123,
  "name" : "t1",
  "funcName" : "func66",
  "code" : "alert(1)",
  "lastModified" : "2020-08-08T14:56:34.397+00:00",
  "links" : {
    "self" : "/v1/digitalfeedback-design/programs/123/templates/1"
  }
}

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
required

The id of the program.

integer (int32)

Path

scenarioTemplateId
required

The id of the program scenario template.

integer (int32)

Body

body
optional

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

Consumes
  • application/json-patch+json

  • application/json

  • text/json

  • application/*+json

Produces
  • application/json

Example HTTP response
Response 200
{
  "id" : 66,
  "programId" : 123,
  "name" : "t1",
  "funcName" : "func66",
  "code" : "alert(1)",
  "lastModified" : "2020-08-08T14:56:34.397+00:00",
  "links" : {
    "self" : "/v1/digitalfeedback-design/programs/123/templates/1"
  }
}

Delete program scenario template

DELETE /programs/{programId}/templates/{scenarioTemplateId}
Description

Deletes the program scenario template. Sample request:

DELETE /programs/123/templates/1
Parameters
Type Name Description Schema

Path

programId
required

The id of the program.

integer (int32)

Path

scenarioTemplateId
required

The id of the program scenario template.

integer (int32)

Responses
HTTP Code Description Schema

204

No content, the request has succeeded. The program scenario template is deleted.

No Content

401

Unauthorized

No Content

403

Forbidden.

No Content

404

Not found, the program or program scenario template 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
required

The id of the program.

integer (int32)

Body

body
optional

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

Consumes
  • application/json-patch+json

  • application/json

  • text/json

  • application/*+json

Produces
  • application/json

Example HTTP response
Response 201
{
  "id" : 1,
  "programId" : 123,
  "name" : "s1",
  "script" : "api().invite('default').show()",
  "isEnabled" : true,
  "lastModified" : "2020-08-08T14:56:34.397+00:00",
  "scenarioType" : "Normal",
  "templateId" : 0,
  "links" : {
    "self" : "/v1/digitalfeedback-design/programs/123/scenarios/1"
  }
}

Get program scenarios

GET /programs/{programId}/scenarios
Description

Returns a list of program scenarios. Sample request:

GET /programs/123/scenarios
Parameters
Type Name Description Schema

Path

programId
required

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

Produces
  • application/json

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}
Description

Returns a program scenario. Sample request:

GET /programs/123/scenario/1
Parameters
Type Name Description Schema

Path

programId
required

The id of the program.

integer (int32)

Path

scenarioId
required

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

Produces
  • application/json

Example HTTP response
Response 200
{
  "id" : 1,
  "programId" : 123,
  "name" : "s1",
  "script" : "api().invite('default').show()",
  "isEnabled" : true,
  "lastModified" : "2020-08-08T14:56:34.397+00:00",
  "scenarioType" : "Normal",
  "templateId" : 0,
  "links" : {
    "self" : "/v1/digitalfeedback-design/programs/123/scenarios/1"
  }
}

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
required

The id of the program.

integer (int32)

Path

scenarioId
required

The id of the program scenario.

integer (int32)

Body

body
optional

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

Consumes
  • application/json-patch+json

  • application/json

  • text/json

  • application/*+json

Produces
  • application/json

Example HTTP response
Response 200
{
  "id" : 1,
  "programId" : 123,
  "name" : "s1",
  "script" : "api().invite('default').show()",
  "isEnabled" : true,
  "lastModified" : "2020-08-08T14:56:34.397+00:00",
  "scenarioType" : "Normal",
  "templateId" : 0,
  "links" : {
    "self" : "/v1/digitalfeedback-design/programs/123/scenarios/1"
  }
}

Delete program scenario

DELETE /programs/{programId}/scenarios/{scenarioId}
Description

Deletes the program scenario. Sample request:

DELETE /programs/123/scenarios/1
Parameters
Type Name Description Schema

Path

programId
required

The id of the program.

integer (int32)

Path

scenarioId
required

The id of the program scenario.

integer (int32)

Responses
HTTP Code Description Schema

204

No content, the request has succeeded. The program scenario is deleted.

No Content

401

Unauthorized

No Content

403

Forbidden.

No Content

404

Not found, the program or program scenario is not found.

No Content

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
required

The id of the program.

integer (int32)

Path

scenarioId
required

The id of the program scenario.

integer (int32)

Body

body
optional

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

Consumes
  • application/json-patch+json

  • application/json

  • text/json

  • application/*+json

Produces
  • application/json

Example HTTP response
Response 200
{
  "id" : 1,
  "programId" : 123,
  "name" : "s1",
  "script" : "api().invite('default').show()",
  "isEnabled" : true,
  "lastModified" : "2020-08-08T14:56:34.397+00:00",
  "scenarioType" : "Normal",
  "templateId" : 0,
  "links" : {
    "self" : "/v1/digitalfeedback-design/programs/123/scenarios/1"
  }
}

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
required

The id of the program.

integer (int32)

Path

scenarioId
required

The id of the program scenario.

integer (int32)

Body

body
optional

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

Consumes
  • application/json-patch+json

  • application/json

  • text/json

  • application/*+json

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
required

The id of the program.

integer (int32)

Body

body
optional

An object containing all the values for the survey assignment.

Responses
HTTP Code Description Schema

200

Ok. The new program survey is created.

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

Consumes
  • application/json-patch+json

  • application/json

  • text/json

  • application/*+json

Produces
  • application/json

Example HTTP response
Response 200
{
  "programId" : 123,
  "surveyId" : "p00000001",
  "links" : { }
}

Get assigned program surveys

GET /programs/{programId}/surveys
Description

Returns a list of program surveys. Sample request:

GET /programs/123/surveys
Parameters
Type Name Description Schema

Path

programId
required

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

Produces
  • application/json

Example HTTP response
Response 200
{
  "itemType" : "ProgramSurvey",
  "itemCount" : 1,
  "totalCount" : 1,
  "items" : [ {
    "programId" : 123,
    "surveyId" : "p000000001",
    "links" : { }
  } ],
  "links" : {
    "item" : "/v1/digitalfeedback-design/programs/123/surveys/{surveyId}"
  }
}

Remove survey assignment from program

DELETE /programs/{programId}/surveys/{surveyId}
Description

Removes assignment from a program. Sample request:

DELETE /programs/123/surveys/p0000001
Parameters
Type Name Description Schema

Path

programId
required

The id of the program.

integer (int32)

Path

surveyId
required

The id of the survey.

string

Responses
HTTP Code Description Schema

204

No content, the request has succeeded. The program survey is deleted.

No Content

401

Unauthorized

No Content

403

Forbidden.

No Content

404

Not found, the program or program survey is not found.

No Content