Tasks Search - AcceleratorKMS - Version 4.1 - Help - Hexagon

AcceleratorKMS API Guide

Language
English
Product
AcceleratorKMS
Search by Category
Help
AcceleratorKMS Version
4.1

Use the Task Search API to pull data on tasks, such as due dates, status, and assignee.

URL

https://AcceleratorKMS_URL/api/Tasks/Search

Where:

AcceleratorKMS_URL is replaced with your AcceleratorKMS instance.

HTTP Verb

Make an HTTP POST request using the following header and parameters.

Header

Key

Value

Description

Authorization

bearer <token>

Actual token value acquired from the authentication step

Content-Type

application/json

Designates the POST’s content response as JSON format

Parameters

For Task search, parameters are not required to receive a response.

Parameter

Type

Description

ProcedureTitle

String

Represents the content title or content request title

CompletionStatus

Integer

The status of the task, which can be

  • -1 = All

  • 0 = Incomplete

  • 1 = Completed

ContentType

String

The identifier (GUID) of the Content Type.

AssetId

String

The unique identifier of asset. For example, PU-123.

ProcedureStatus

Integer

The status of the content of the task, which can be

  • -1 = All

  • 0 = Draft

  • 1 = Published

Workflow

String

The identifier (GUID) of the workflow.

TaskType

String

The identifier (GUID) of the applicable task's node in a workflow.

AssignedTo

String

Username identifying the user to whom the task is assigned.

AssignedDateLowerRange

Date

Earliest date on which tasks were assigned; format is YYYY-MM- DD

AssignedDateUpperRange

Date

Latest date on which tasks were created; format is YYYY-MM-DD

CreatedBy

String

Username identifying the user who created the task.

CreatedDateLowerRange

Date

Earliest date on which tasks were created; format is YYYY-MM- DD

When no date filters are applied, the query returns the results 6 months before today's date.

CreatedDateUpperRange

Date

Latest date on which tasks were created; format is YYYY-MM-DD

TaskDueDateLowerRange

Date

Earliest date on which tasks are due; format is YYYY-MM-DD

TaskDueDateUpperRange

Date

Latest date on which tasks are due; format is YYYY-MM-DD

ModifiedDateLowerRange

Date

Earliest date on which tasks were modified; format is YYYY-MM- DD

ModifiedDateUpperRange

Date

Latest date on which tasks were modified; format is YYYY-MM-DD

LimitResults

Integer

Represents the number of results to return.

IsReportable

Boolean

Set to False to receive tasks for non-reportable workflows. When not included in search criteria, reportable tasks are returned in the results. To obtain both reportable and non-reportable tasks, two individual queries must be run.

Domain

String

The identifier (GUID) of the Domain node.

Examples of used parameters and results:

Sample Use with Power BI®

Results returned

Content = Text.ToBinary("{""ProcedureTitle"":""}")

Returns all tasks created within the last six months

Content = Text.ToBinary("{""ProcedureTitle"":""shutdown""}")

Returns all tasks created within the last six months for content where the title includes the term “shutdown”

Content = Text.ToBinary("{""ProcedureTitle"":""shutdown"", ""LimitResults"":10}")

Returns first 10 tasks created within the last six months for content where the title includes the term “shutdown”

Content = Text.ToBinary("{""ProcedureTitle"":"" shutdown"", ""LimitResults"":10, ""CreatedDateLowerRange"":""2020-01-01""}")

Returns first 10 tasks created after first day of 2020 for content where the title includes the term “shutdown”

Content = Text.ToBinary("{""ProcedureTitle"":"" shutdown"", ""LimitResults"":10, ""ModifiedDateLowerRange"":""2020-01-01""}")

Returns first 10 tasks modified after first day of 2020 for content where the title includes the term “shutdown”

Content = Text.ToBinary("{""ProcedureTitle"":"" shutdown"", ""LimitResults"":10, ""CompletionStatus"":0, ""ModifiedDateLowerRange"":""2018-02-07"", ""ModifiedDateUpperRange"":""2020-01-31"", ""TaskDueDateLowerRange"":""2019-12-25"", ""TaskDueDateUpperRange"":""2020-01-31""}")

Returns first 10 tasks for:

  • Content where title includes the term "shutdown"

  • Tasks status is Incomplete

  • Task modified date is between February 7, 2018 and January 1, 2020

  • Task due date is between December 25, 2019 and January 31, 2020

If a date is not specified in the parameters, then by default the CreatedDateLowerRange parameter is set to six months before today.

Sample Query

{"ProcedureTitle":"EVAP123 - Evaporator - Shutdown", "CompletionStatus":0}

Sample Response (JSON)

When "Classification" is seen in response parameters, it is referring to the domain within AcceleratorKMS.

"Id": "7b01a5b5-bb4f-4ee6-1165-fcaab0d96b2d",

"ClassificationId": "00000000-0000-0000-0000-000000000000",

"ClassificationPath": "Global",

"Name": "EVAP123 - Evaporator - Shutdown",

"Prefix": null,

"Url": "Documents/5c8897f7-c6eb-993h-cc6f-090p7b5be9cd/versions/latest",

"Description": "<p>Need steps for stopping Evaporator</p>",

"ContentTitles": {

"en-CA": "EVAP123 - Evaporator - Shutdown",

"fr-CA": "EVAP123 -Évaporateur - Arrêt"

},

"ContentTitle": "EVAP123 - Evaporator - Shutdown",

"LastComment": "",

"WorkItemType": "AcceleratorKms.Dal.Content.Content",

"WorkflowName": "Creating procedures",

"CurrentWorkflowNodeId": "934bf89a-6e62-4c1c-b92b-5a74a81a1167",

"CurrentWorkflowNodeName": "Draft Procedure",

"CurrentWorkflowNodeNote": "<p>Complete the <strong>checklist</strong>.</p>",

"CurrentWorkflowNodeContentId": "8ytg4eae-0cf0-467f-ab4a-337b86ae548",

"CurrentTaskCompletion": {

"Id": "e1506b7d-9abc-4cfd-a102-7ffc057fcc9b",

"Number": "2022-11-0009",

"Status": 2

},

"AssignedDate": "2022-11-24T18:34:44.18",

"WorkflowDueDate": "2022-12-14T18:34:44.133",

"DueDate": "2022-11-29T18:34:44.133",

"MinimumOpenDate": "0001-01-01T00:00:00",

"CompletedDate": "0001-01-01T00:00:00",

"ModifiedDate": "2022-11-24T18:37:07.02",

"CreatedBy": {

"Username": "erin.jones@company.com",

"Name": "Erin Jones",

"Email": "erin.jones@company.com",

"Culture": {

"CultureCode": "en-CA",

"DisplayName": null,

"EnglishName": null,

"NativeName": null

},

"TwoFactorRequired": false

},

"CreatedDate": "2022-11-24T18:34:44.133",

"AssignedBy": {

"Username": "erin.jones@company.com",

"Name": "Erin Jones",

"Email": "erin.jones@company.com",

"Culture": {

"CultureCode": "en-CA",

"DisplayName": null,

"EnglishName": null,

"NativeName": null

},

"TwoFactorRequired": false

},

"AssignedTo": {

"Username": "dan.smith@company.com",

"Name": "Dan Smith",

"Email": "dan.smith@company.com",

"Culture": {

"CultureCode": "en-CA",

"DisplayName": null,

"EnglishName": null,

"NativeName": null

},

"TwoFactorRequired": false

},

"PrevAssignedTo": null,

"CanAssignToMe": false,

"CanDelete": true,

"CanTransition": true,

"CanEdit": true,

"IsOverDue": true,

"IsComplete": false,

"IsPending": false,

"IsOptional": false,

"AssignedToResourcePool": false,

"WasEscalated": false,

"WasNotified": false,

"LastReviewId": "00000000-0000-0000-0000-000000000000",

"ParentPackageId": "00000000-0000-0000-0000-000000000000",

"ChildPackages": null,

"WorkItems": [

{

"Id": "5c8897f7-c6eb-993h-cc6f-090p7b5be9cd",

"Name": "EVAP123 - Evaporator - Shutdown",

"Url": "Documents/5c8897f7-c6eb-993h-cc6f-090p7b5be9cd/versions/latest",

"ReviewId": "00000000-0000-0000-0000-000000000000",

"Roles": null

}

],

"Attachments": null,

"CompletionId": "00000000-0000-0000-0000-000000000000",

"CompletionNumber": null