Skip to main content

Workbooks

In order to query all available workbooks in iCL Portal, the following REST service can be used.

Endpoint: /api/services/app/workbook

1. Querying workbooks

Url: /getworkbooks

HTTP method: GET

Example:

GET https://dev.iclportal.com/api/services/app/workbook/GetWorkbooks HTTP/1.1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept-Encoding: gzip, deflate

{
"result": {
"results":[
{
"id":"d4548668-a2a2-4e30-b21d-5fc312d2d660",
"definitionId":"c589a1f4-1049-4018-a5ae-36c23a54221e",
"version":"1.0.0.5",
"versionCode":5,
"title":"Task with Finding Test",
"description":null,
"isPublished":true,
"creationTime":"2017-02-14T17:30:37.873Z"
},
],
"__count":1
}
}

Example 2 – getting only workbooks, which have already been published (and, thus, are available to inspectors in the field), and also 20 results at max

GET https://dev.iclportal.com/api/services/app/workbook/GetWorkbooks?$filter=IsPublished+eq+true&$inlinecount=allpages&$orderby=CreationTime+desc&$top=20 HTTP/1.1

Content-Type: application/json;charset=UTF-8
Accept-Encoding: gzip, deflate

{
"result": {
"results":[
{
"id":"d4548668-a2a2-4e30-b21d-5fc312d2d660",
"definitionId":"c589a1f4-1049-4018-a5ae-36c23a54221e",
"version":"1.0.0.5",
"versionCode":5,
"title":"Sample Workbook",
"description":null,
"isPublished":true,
"creationTime":"2017-02-14T17:30:37.873Z"
},
],
"__count":1
}
}

Parameters: This is an ODATA 3.0 Endpoint allowing you to query the tasks in the system.

note

you can use all the attributes of the returned json objects to create a query. However, due to the ODATA specification, you must uppercase them in the query. As this is a convention in JSON and the JavaScript world, our results are returned with the attribute names lowercased.

Example: You get a task like:

{"isPublished":true, title":"Sample Workbook", …}

As you can see, the “isPublished” attribute is starting with a lowercased letter. If you, however, query the ODATA endpoint using “isPublished”, you need to uppercase its first letter: /getall?$filter=IsPublished+eq+….