Create Completion - AcceleratorKMS - Version 5.0 - Help - Hexagon

AcceleratorKMS API Guide

Language
English
Product
AcceleratorKMS
Search by Category
Help
AcceleratorKMS Version
5.1

Use the Create Completion API to create completions on specific content within AcceleratorKMS.

To use this API, you must have a completion role used within the content or the ability to manage assignments for the piece of content.After the completion is created, assignments are managed from within the content itself.

If you are not assigned a completion role and do not have the 'manage assignments' operation, you will receive the error message 'Cannot start completion. Check user roles, content access, and status,' and the completion will not be started.

URL

https://AcceleratorKMS_URL/api/Completions/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

Parameters

Create Completion API accepts the following parameters.

Parameter

Type

Description

ContentID

String

Single string value (GUID of the content)

WorkOrderNumber (Optional)

String

Single string value <=255 characters

Result Parameters

Parameter

Description

CompletionID

Identifier assigned to the completion created from the API call.

CompletionNumber

Unique Completion ID (not a GUID) for the Completion displayed in AKMS (YYYY-MM-four digit sequential number).

WorkOrderNumber

Optional text from Work Order field in Completion.

Work Order field may be named differently in AKMS at Content Type Administration. Regardless of the Work Order label name configured in AKMS, the Item name passed through API will be WorkOrder. The character limit in this field is <= 255 characters.

ActiveCompletionsCount

Number of active completions on this content after the API call.

CompletionThreshold

Maximum number of active completions per content configured as threshold for using the API.

Error

Either the error description is provided when a completion is not created by the API, or 'null' is returned when the API successfully creates the completion.

AssignedUsers

{ "Role1GUID" :["userA", "userB"], "Role2GUID" :["userB"] }

CompletionID and WorkOrderNumber (if WorkOrderNumber is included in input parameters) can be identified in the completion of the content.

Body

{

"ContentId": "ca763967-17e3-4e10-a391-c45193b480ff",

"workOrderNumber": "01106TR"
}

Sample Response (JSON)

{

"CompletionId": "ca763967-17e3-4e10-a391-c45193b480ff",

"CompletionNumber": "2024-02-0003",

"WorkOrderNumber": "01106TR"

"ActiveCompletionsCount": 1,

"CompletionThreshold": 7,

"Error": null,

"AssignedUsers": "15e701c6-caf1-4389-ac32-b1a9032f6ce6": ["lester.percy@company.com", "erin.jones@company.com"], ""54e805c2-klf1-6935-ac32-n1a9033j8gh9": ["erin.jones@company.com"] }

The response will include a description of any errors encountered. For a successful request, the Error parameter will be null.

Possible Errors

Error

Meaning

There are no roles on the completion available for the current user

User is not authenticated for completion role

Cannot start completion. Check user roles, content access and status.

Content is not published. Content must be published before it can be completed.

Concurrent completions have been disabled

Content restrictions on creating completions

<user> does not have access to object with <id>

User is not authorized to access content

This content contains sub content you are not authorized to view.

User is not authorized to access sub content

This content is passed the completion threshold.

Threshold error

This content can only be completed as part of a workflow

Completion is restricted to workflow