Valuekeep Developers - Web API Reference

Work | Work Order State

Service to manage entities of type 'WorkOrderState'.

This service extends VKSchemaEntityStates.

Overview


URL api/{tenantKey}/{orgKey}/maintenanceCore/workOrderStates
Methods Supported GET, POST, PUT, DELETE

All Operations

This service includes the following operations:

All Resources

This service uses the following resources:

GET Operations

GET WorkOrderStates (odata)

Returns a page of the list of all the entity records available.

The following elements are optional:

opts (ODataQueryOptions) OData query option.

Response:

When successful, the response body contains the list of records available. See WorkOrderStateResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

GET /maintenanceCore/workOrderStates/extension/odata

GET WorkOrderState by identifier

Returns the entity record that matches the specified identifier.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body contains the entity record. See WorkOrderStateResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /maintenanceCore/workOrderStates/{id}/extension

GET WorkOrderState by key

Returns the entity record that matches the specified key.

The following elements are required:

stateKey (string) State.

Response:

When successful, the response body contains the entity record. See WorkOrderStateResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /maintenanceCore/workOrderStates/{stateKey}/extension

GET WorkOrderStates (with VKSchemaEntityState)

Returns the list of all the entity records available. Each record contains both data from the entity and the base entity.

Response:

When successful, the response body contains the list of records available. See BaseWorkOrderStateResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

GET /maintenanceCore/workOrderStates

GET WorkOrderStates (with VKSchemaEntityState) (paged)

Returns a page of the list of all the entity records available. Each record contains both data from the entity and the base entity.

The following elements are optional:

page (int) The index of the page of the list that should be returned. This is a query string parameter.
pageSize (int) The number of page elements that should be returned (max. is 1000). This is a query string parameter.

Response:

When successful, the response body contains the list of records available. See BaseWorkOrderStateResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

GET /maintenanceCore/workOrderStates?page={page}&pageSize={pageSize}

GET WorkOrderState (with VKSchemaEntityState) by identifier

Returns the entity record that matches the specified identifier. The record contains both data from the entity and the base entity.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body contains the entity record. See BaseWorkOrderStateResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /maintenanceCore/workOrderStates/{id}

GET WorkOrderState (with VKSchemaEntityState) by key

Returns the entity record that matches the specified key. The record contains both data from the entity and the base entity.

The following elements are required:

stateKey (string) State.

Response:

When successful, the response body contains the entity record. See BaseWorkOrderStateResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /maintenanceCore/workOrderStates/{stateKey}

GET Get All Work Order States

Get all work order states.

The following elements are required:

onlyAllowAssignments (bool) OnlyAllowAssignments.

Response:

When successful, the response body contains a list of resources of type 'WorkOrderStateResource'. See WorkOrderStateResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

GET /maintenanceCore/workOrderStates/getAllWorkOrderStates

POST Operations

POST WorkOrderStates

Creates a new entity record.

The following elements are required:

workOrderStateResource (ApiWorkOrderStateResource) The request body should contain the entity record that should be created.
See ApiWorkOrderStateResource.

The following elements are optional:

customAttributes (JSON Document) A key-value pair in JSON format that represents the extensibility custom attributes for this entity.
The key should be the custom attribute name prefixed with "custom_", e.g. "custom_attributeName".
While the "customAttributes" element is optional, please notice that specific custom attributes might be marked as required.

Response:

When successful, the response body contains the new entity record identifier. The resource header location property contains the URL for the new entity record. See ApiWorkOrderStateResource.

Response status codes:

201 Created. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

POST /maintenanceCore/workOrderStates/extension

POST WorkOrderStates (with ApiBaseWorkOrderState)

Creates a new entity record. The record shoud contain both data from the entity and the base entity.

The following elements are required:

workOrderStateResource (ApiWorkOrderStateResource) The request body should contain the entity record that should be created.
See ApiWorkOrderStateResource.

The following elements are optional:

customAttributes (JSON Document) A key-value pair in JSON format that represents the extensibility custom attributes for this entity.
The key should be the custom attribute name prefixed with "custom_", e.g. "custom_attributeName".
While the "customAttributes" element is optional, please notice that specific custom attributes might be marked as required.

Response:

When successful, the response body contains the new entity record identifier. The resource header location property contains the URL for the new entity record. See ApiBaseWorkOrderStateResource.

Response status codes:

201 Created. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

POST /maintenanceCore/workOrderStates

POST Get State Configuration

Custom operation 'GetStateConfiguration'.

The following elements are required:

stateId (Guid) StateId.

The following elements are optional:

customAttributes (JSON Document) A key-value pair in JSON format that represents the extensibility custom attributes for this entity.
The key should be the custom attribute name prefixed with "custom_", e.g. "custom_attributeName".
While the "customAttributes" element is optional, please notice that specific custom attributes might be marked as required.

Response:

When successful, the response body contains a resource of type 'WorkOrderStateResource'. See WorkOrderStateResource.

Resource URL:

POST /maintenanceCore/workOrderStates/getStateConfiguration/{stateId}

POST Validate Date

Custom operation 'ValidateDate'.

The following elements are required:

workOrderKey (string) WorkOrderKey.
workReport (bool) WorkReport.
costReport (bool) CostReport.
schemaEntityId (Guid) SchemaEntityId.
currentStateId (Guid) CurrentStateId.
date (DateTimeOffset) Date.

The following elements are optional:

customAttributes (JSON Document) A key-value pair in JSON format that represents the extensibility custom attributes for this entity.
The key should be the custom attribute name prefixed with "custom_", e.g. "custom_attributeName".
While the "customAttributes" element is optional, please notice that specific custom attributes might be marked as required.

Response:

When successful, the response body contains an item of type 'boolean'.

Resource URL:

POST /maintenanceCore/workOrderStates/validateDate/{workOrderKey}/{workReport}/{costReport}/{schemaEntityId}/{currentStateId}

PUT Operations

PUT Set AllowAssignments WorkOrderState

Updates the value of attribute 'AllowAssignments' in the specified entity record.

The following elements are required:

stateKey (string) State.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /maintenanceCore/workOrderStates/{stateKey}/allowAssignments

PUT Set AllowChangeRemarks WorkOrderState

Updates the value of attribute 'AllowChangeRemarks' in the specified entity record.

The following elements are required:

stateKey (string) State.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /maintenanceCore/workOrderStates/{stateKey}/allowChangeRemarks

PUT Set AllowCostReport WorkOrderState

Updates the value of attribute 'AllowCostReport' in the specified entity record.

The following elements are required:

stateKey (string) State.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /maintenanceCore/workOrderStates/{stateKey}/allowCostReport

PUT Set AllowWorkReport WorkOrderState

Updates the value of attribute 'AllowWorkReport' in the specified entity record.

The following elements are required:

stateKey (string) State.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /maintenanceCore/workOrderStates/{stateKey}/allowWorkReport

PUT Set CanCreateFromEvent WorkOrderState

Updates the value of attribute 'CanCreateFromEvent' in the specified entity record.

The following elements are required:

stateKey (string) State.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /maintenanceCore/workOrderStates/{stateKey}/canCreateFromEvent

PUT Set ChangeRequestStateTo WorkOrderState

Updates the value of attribute 'ChangeRequestStateTo' in the specified entity record.

The following elements are required:

stateKey (string) State.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /maintenanceCore/workOrderStates/{stateKey}/changeRequestStateTo

PUT Set CopyJustification WorkOrderState

Updates the value of attribute 'CopyJustification' in the specified entity record.

The following elements are required:

stateKey (string) State.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /maintenanceCore/workOrderStates/{stateKey}/copyJustification

PUT Set DownTimeInfo WorkOrderState

Updates the value of attribute 'DownTimeInfo' in the specified entity record.

The following elements are required:

stateKey (string) State.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /maintenanceCore/workOrderStates/{stateKey}/downTimeInfo

PUT Set EndDownTime WorkOrderState

Updates the value of attribute 'EndDownTime' in the specified entity record.

The following elements are required:

stateKey (string) State.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /maintenanceCore/workOrderStates/{stateKey}/endDownTime

PUT Set EndSLA WorkOrderState

Updates the value of attribute 'EndSLA' in the specified entity record.

The following elements are required:

stateKey (string) State.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /maintenanceCore/workOrderStates/{stateKey}/endSLA

PUT Set IsActive WorkOrderState

Updates the value of attribute 'IsActive' in the specified entity record.

The following elements are required:

stateKey (string) State.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /maintenanceCore/workOrderStates/{stateKey}/isActive

PUT Set IsCanceledState WorkOrderState

Updates the value of attribute 'IsCanceledState' in the specified entity record.

The following elements are required:

stateKey (string) State.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /maintenanceCore/workOrderStates/{stateKey}/isCanceledState

PUT Set MustValidateTasks WorkOrderState

Updates the value of attribute 'MustValidateTasks' in the specified entity record.

The following elements are required:

stateKey (string) State.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /maintenanceCore/workOrderStates/{stateKey}/mustValidateTasks

PUT Set SLAInfo WorkOrderState

Updates the value of attribute 'SLAInfo' in the specified entity record.

The following elements are required:

stateKey (string) State.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /maintenanceCore/workOrderStates/{stateKey}/sLAInfo

PUT Set StartDownTime WorkOrderState

Updates the value of attribute 'StartDownTime' in the specified entity record.

The following elements are required:

stateKey (string) State.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /maintenanceCore/workOrderStates/{stateKey}/startDownTime

PUT Set StartSLA WorkOrderState

Updates the value of attribute 'StartSLA' in the specified entity record.

The following elements are required:

stateKey (string) State.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /maintenanceCore/workOrderStates/{stateKey}/startSLA

PUT Set Custom Attribute WorkOrderState

Updates the value of 'CustomAttribute' in the specified entity record.

The following elements are required:

stateKey (string) State
customAttributeName (string) The custom attribute name.
value (ExtensibilityCustomAttributeValueResource) The request body should contain the new value for the custom attribute.
See ExtensibilityCustomAttributeValueResource.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /maintenanceCore/workOrderStates/{stateKey}/{customAttributeName}

DELETE Operations

DELETE WorkOrderState by identifier

Deletes the entity record that matches the specified identifier.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body is empty.

Response status codes:

204 Deleted. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /maintenanceCore/workOrderStates/{id}

DELETE WorkOrderState by key

Deletes the entity record that matches the specified key.

The following elements are required:

stateKey (string) State.

Response:

When successful, the response body is empty.

Response status codes:

204 Deleted. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /maintenanceCore/workOrderStates/{stateKey}

Resources


ApiBaseWorkOrderStateResource

The following elements are required:

startSLA (bool) Start SLA.
endSLA (bool) End SLA.
allowChangeRemarks (bool) Allow change remarks.
startDownTime (bool) Start Down Time.
endDownTime (bool) End Down Time.
canCreateFromEvent (bool) Can Create From Event.
copyJustification (bool) Copy Justification.
stateKey (string) State.
description (string) Description.
isInitialState (bool) Is Initial State.
isFinalState (bool) Is Final State.
schemaEntity (string) Entity.

The following elements are optional:

mustValidateTasks (bool) Must Validate Tasks.
allowWorkReport (bool) Allow Work Report.
allowCostReport (bool) Allow Cost Report.
allowAssignments (bool) Allow Assignments.
changeRequestStateTo (string) State.
isCanceledState (bool) Canceled.
downTimeInfo (string) Down Time Info.
sLAInfo (string) Information.
isLockedForChanges (bool) Is Locked For Changes.
localizedDescription (string) Localized Description.
notificationId (Guid) Initial Notification.


ApiWorkOrderStateResource

The following elements are required:

startSLA (bool) Start SLA.
endSLA (bool) End SLA.
allowChangeRemarks (bool) Allow change remarks.
startDownTime (bool) Start Down Time.
endDownTime (bool) End Down Time.
canCreateFromEvent (bool) Can Create From Event.
copyJustification (bool) Copy Justification.
stateKey (string) State.

The following elements are optional:

mustValidateTasks (bool) Must Validate Tasks.
allowWorkReport (bool) Allow Work Report.
allowCostReport (bool) Allow Cost Report.
allowAssignments (bool) Allow Assignments.
changeRequestStateTo (string) State.
isCanceledState (bool) Canceled.
downTimeInfo (string) Down Time Info.
sLAInfo (string) Information.


BaseWorkOrderStateResource

The following elements are required:

startSLA (bool) Start SLA.
endSLA (bool) End SLA.
allowChangeRemarks (bool) Allow change remarks.
startDownTime (bool) Start Down Time.
endDownTime (bool) End Down Time.
canCreateFromEvent (bool) Can Create From Event.
copyJustification (bool) Copy Justification.
stateKey (string) State.
description (string) Description.
isInitialState (bool) Is Initial State.
isFinalState (bool) Is Final State.
schemaEntity (string) Entity.

The following elements are optional:

mustValidateTasks (bool) Must Validate Tasks.
allowWorkReport (bool) Allow Work Report.
allowCostReport (bool) Allow Cost Report.
allowAssignments (bool) Allow Assignments.
changeRequestStateTo (string) State.
isCanceledState (bool) Canceled.
downTimeInfo (string) Down Time Info.
sLAInfo (string) Information.
isLockedForChanges (bool) Is Locked For Changes.
localizedDescription (string) Localized Description.
notificationId (Guid) Initial Notification.


WorkOrderStateResource

The following elements are required:

startSLA (bool) Start SLA.
endSLA (bool) End SLA.
allowChangeRemarks (bool) Allow change remarks.
startDownTime (bool) Start Down Time.
endDownTime (bool) End Down Time.
canCreateFromEvent (bool) Can Create From Event.
copyJustification (bool) Copy Justification.
stateKey (string) State.

The following elements are optional:

mustValidateTasks (bool) Must Validate Tasks.
allowWorkReport (bool) Allow Work Report.
allowCostReport (bool) Allow Cost Report.
allowAssignments (bool) Allow Assignments.
changeRequestStateTo (string) State.
isCanceledState (bool) Canceled.
downTimeInfo (string) Down Time Info.
sLAInfo (string) Information.


ExtensibilityCustomAttributeValueResource

The following elements are required:

value (object) The custom attribute value.