Create Task - AcceleratorKMS - Version 5.0 - Help - Hexagon

AcceleratorKMS API Guide

Language
English
Product
AcceleratorKMS
Search by Category
Help
AcceleratorKMS Version
5.1

Use the Create Task API to create tasks on content within AcceleratorKMS.

URL

https://AcceleratorKMS_URL/api/Tasks/Create

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

Body

{

ContentId: '8baca6b3-0490-4b31-beeb-785743d3d41d',

WorkflowId: 'b04e2d10-b319-4f59-9df6-70c0f54f6540',

Description: 'Task created via API',

AssignTo: 'administrator',

Attachments: [

{

Id: '44d88b5e-288e-4d7f-8d16-7595ccdf0a88',

Name: 'Sample attachment',

Filename: 'attachment.png',

Extension: 'png',

Data: '<Base64 encoded string for binary file>'

}

]

}

Content and Workflow IDs are available in the AcceleratorKMS web application URL after ...Content/ or ...Workflows/; IDs in the following examples are bolded:

  • https://<AcceleratorKMS_URL>/Content/8baca6b3-0490-4b31-beeb-785743d3d41d

  • https://<AcceleratorKMS_URL>/Workflows/b04e2d10-b319-4f59-9df6-70c0f54f654

AssignTo and Attachments are optional parameters.

Sample Response (JSON)

"WorkPackageId": "ba5e88c7-00fe-4c0a-8e5b-d4331a95b49c",

"Error": null

If an error is found, a message appears in the Sample Response; otherwise "null" appears. The following is an example of an error message, "The specified workflow does not exist or is not published."