Valuekeep Developers - Web API Reference

Work | Maintenance Plan

Service to manage entities of type 'MaintenancePlan'.

Overview


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

All Operations

This service includes the following operations:

All Resources

This service uses the following resources:

All Enumerations

This service uses the following enumerations:

GET Operations

GET MaintenancePlans (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 MaintenancePlanResource.

Response status codes:

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

Resource URL:

GET /maintenanceCore/maintenancePlans/odata

GET MaintenancePlan 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 MaintenancePlanResource.

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/maintenancePlans/{id}

GET MaintenancePlan by key

Returns the entity record that matches the specified key.

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.

Response:

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

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/maintenancePlans/{maintenancePlanKey}

POST Operations

POST MaintenancePlans

Creates a new entity record.

The following elements are required:

maintenancePlanResource (ApiMaintenancePlanResource) The request body should contain the entity record that should be created.
See ApiMaintenancePlanResource.

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 ApiMaintenancePlanResource.

Response status codes:

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

Resource URL:

POST /maintenanceCore/maintenancePlans

POST Maintenance Plan Task

Inserts a new 'Maintenance Plan Task' in the 'Maintenance Plan'.

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.
value (ApiMaintenancePlanMaintenancePlanTasksResource) The ApiMaintenancePlanMaintenancePlanTasksResource instance.
See ApiMaintenancePlanMaintenancePlanTasksResource.

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 is empty.

Response status codes:

204 NoContent. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

POST /maintenanceCore/maintenancePlans/{maintenancePlanKey}/maintenancePlanTasks

PUT Operations

PUT Set Description MaintenancePlan

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

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.
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/maintenancePlans/{maintenancePlanKey}/description

PUT Set Description MaintenancePlanTask

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

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.
lineId (string) The detail identifier.
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/maintenancePlans/{maintenancePlanKey}/maintenancePlanTasks/{lineId}/description

PUT Set Duration MaintenancePlanTask

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

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.
lineId (string) The detail identifier.
value (TimeSpan) 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/maintenancePlans/{maintenancePlanKey}/maintenancePlanTasks/{lineId}/duration

PUT Set IsActive MaintenancePlan

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

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.
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/maintenancePlans/{maintenancePlanKey}/isActive

PUT Set IsLocked MaintenancePlan

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

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.
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/maintenancePlans/{maintenancePlanKey}/isLocked

PUT Set MaintenancePlanKey MaintenancePlan

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

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.
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/maintenancePlans/{maintenancePlanKey}/maintenancePlanKey

PUT Set MaintenancePlanTaskKey MaintenancePlanTask

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

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.
lineId (string) The detail identifier.
value (Guid) 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/maintenancePlans/{maintenancePlanKey}/maintenancePlanTasks/{lineId}/maintenancePlanTaskKey

PUT Set MaintenancePlanType MaintenancePlan

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

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.
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/maintenancePlans/{maintenancePlanKey}/maintenancePlanType

PUT Set Picture MaintenancePlanTask

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

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.
lineId (string) The detail identifier.
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/maintenancePlans/{maintenancePlanKey}/maintenancePlanTasks/{lineId}/picture

PUT Set PrecendetTask MaintenancePlanTask

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

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.
lineId (string) The detail identifier.
value (Guid) 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/maintenancePlans/{maintenancePlanKey}/maintenancePlanTasks/{lineId}/precendetTask

PUT Set Remarks MaintenancePlan

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

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.
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/maintenancePlans/{maintenancePlanKey}/remarks

PUT Set Remarks MaintenancePlanTask

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

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.
lineId (string) The detail identifier.
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/maintenancePlans/{maintenancePlanKey}/maintenancePlanTasks/{lineId}/remarks

PUT Set Task MaintenancePlanTask

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

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.
lineId (string) The detail identifier.
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/maintenancePlans/{maintenancePlanKey}/maintenancePlanTasks/{lineId}/task

PUT Set TimeUnit MaintenancePlanTask

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

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.
lineId (string) The detail identifier.
value (enum TimeUnit) The request body should contain the new value for the attribute.
See TimeUnit.

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/maintenancePlans/{maintenancePlanKey}/maintenancePlanTasks/{lineId}/timeUnit

PUT Set Verification MaintenancePlanTask

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

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.
lineId (string) The detail identifier.
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/maintenancePlans/{maintenancePlanKey}/maintenancePlanTasks/{lineId}/verification

PUT Set Workshop MaintenancePlan

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

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.
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/maintenancePlans/{maintenancePlanKey}/workshop

PUT Set Custom Attribute MaintenancePlan

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

The following elements are required:

maintenancePlanKey (string) Maintenance Plan
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/maintenancePlans/{maintenancePlanKey}/{customAttributeName}

PUT Set Custom Attribute MaintenancePlanTask

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

The following elements are required:

maintenancePlanKey (string) Maintenance Plan
lineId (string) The detail identifier.
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/maintenancePlans/{maintenancePlanKey}/maintenancePlanTasks/{lineId}/{customAttributeName}

DELETE Operations

DELETE Maintenance Plan Task by identifier

Deletes the entity record that matches the specified identifier.

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.
lineId (string) The line identifier.

Response:

When successful, the response body is empty.

Response status codes:

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

Resource URL:

DELETE /maintenanceCore/maintenancePlans/{maintenancePlanKey}/maintenancePlanTasks/{lineId}

DELETE MaintenancePlan 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/maintenancePlans/{id}

DELETE MaintenancePlan by key

Deletes the entity record that matches the specified key.

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.

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/maintenancePlans/{maintenancePlanKey}

Resources


ApiMaintenancePlanMaintenancePlanTasksMaintenancePlanTaskLaborsResource

The following elements are optional:

employee (string) Employee.
expertise (string) Expertise.
totalTime (TimeSpan) Total Time.
remarks (string) Remarks.


ApiMaintenancePlanMaintenancePlanTasksMaintenancePlanTaskPartsResource

The following elements are required:

part (string) Part.
quantity (decimal) Quantity.
unit (string) Unit.

The following elements are optional:

warehouse (string) Warehouse.
remarks (string) Remarks.
itemType (int) Item Type.


ApiMaintenancePlanMaintenancePlanTasksResource

The following elements are required:

maintenancePlanTaskKey (Guid) Maintenance Plan Task.
description (string) Description.
duration (TimeSpan) Duration.
task (string) Task.

The following elements are optional:

timeUnit (enum TimeUnit) Time Unit.
See TimeUnit.
picture (string) Picture.
verification (string) Verification.
precendetTask (Guid) Precendet Task.
remarks (string) Remarks.
maintenancePlanTaskParts (List of ApiMaintenancePlanMaintenancePlanTasksMaintenancePlanTaskPartsResource) Maintenance Plan Task Parts.
See ApiMaintenancePlanMaintenancePlanTasksMaintenancePlanTaskPartsResource.
maintenancePlanTaskLabors (List of ApiMaintenancePlanMaintenancePlanTasksMaintenancePlanTaskLaborsResource) Maintenance Plan Task Labors.
See ApiMaintenancePlanMaintenancePlanTasksMaintenancePlanTaskLaborsResource.


ApiMaintenancePlanResource

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.
description (string) Description.
maintenancePlanType (string) Maintenance Plan Type.

The following elements are optional:

remarks (string) Remarks.
maintenancePlanTasks (List of ApiMaintenancePlanMaintenancePlanTasksResource) Maintenance Plan Tasks.
See ApiMaintenancePlanMaintenancePlanTasksResource.
workshop (string) Workshop.
isLocked (bool) Is Locked.


MaintenancePlanResource

The following elements are required:

maintenancePlanKey (string) Maintenance Plan.
description (string) Description.
maintenancePlanType (string) Maintenance Plan Type.
(fk) Allowed value: the natural key of a record of type MaintenancePlanType. These records are accessibly through the MaintenancePlanTypes service.

The following elements are optional:

remarks (string) Remarks.
maintenancePlanTasks (List of MaintenancePlanTaskResource) Maintenance Plan Tasks.
See MaintenancePlanTaskResource.
workshop (string) Workshop.
(fk) Allowed value: the natural key of a record of type Workshop. These records are accessibly through the Workshops service.
isLocked (bool) Is Locked.


ExtensibilityCustomAttributeValueResource

The following elements are required:

value (object) The custom attribute value.

Enumerations


TimeUnit

1 Days
2 Hours
3 Minutes