Valuekeep Developers - Web API Reference

Work | Preventive Maintenance Event

Service to manage entities of type 'PreventiveMaintenanceEvent'.

Overview


URL api/{tenantKey}/{orgKey}/maintenance/preventiveMaintenanceEvents
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 PreventiveMaintenanceEvents (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 PreventiveMaintenanceEventResource.

Response status codes:

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

Resource URL:

GET /maintenance/preventiveMaintenanceEvents/odata

GET PreventiveMaintenanceEvent 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 PreventiveMaintenanceEventResource.

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

GET PreventiveMaintenanceEvent by key

Returns the entity record that matches the specified key.

The following elements are required:

companyKey (string) The company key.
preventiveMaintenance (string) Preventive Maintenance.
occurrence (int) Event.

Response:

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

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 /maintenance/preventiveMaintenanceEvents/{companyKey}/{preventiveMaintenance}/{occurrence}

POST Operations

POST PreventiveMaintenanceEvents

Creates a new entity record.

The following elements are required:

preventiveMaintenanceEventResource (ApiPreventiveMaintenanceEventResource) The request body should contain the entity record that should be created.
See ApiPreventiveMaintenanceEventResource.

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

Response status codes:

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

Resource URL:

POST /maintenance/preventiveMaintenanceEvents

POST Projection Work Order

Inserts a new 'Projection Work Order' in the 'Preventive Maintenance Event'.

The following elements are required:

preventiveMaintenance (string) Preventive Maintenance.
occurrence (int) Event.
companyKey (string) The company key.
value (ApiPreventiveMaintenanceEventProjectionWorkOrdersResource) The ApiPreventiveMaintenanceEventProjectionWorkOrdersResource instance.
See ApiPreventiveMaintenanceEventProjectionWorkOrdersResource.

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 /maintenance/preventiveMaintenanceEvents/{companyKey}/{preventiveMaintenance}/{occurrence}/projectionWorkOrders

PUT Operations

PUT Set AllowCreateWorkOrder PreventiveMaintenanceEvent

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

The following elements are required:

preventiveMaintenance (string) Preventive Maintenance.
occurrence (int) Event.
companyKey (string) The company key.
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 /maintenance/preventiveMaintenanceEvents/{companyKey}/{preventiveMaintenance}/{occurrence}/allowCreateWorkOrder

PUT Set Company PreventiveMaintenanceEvent

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

The following elements are required:

preventiveMaintenance (string) Preventive Maintenance.
occurrence (int) Event.
companyKey (string) The company key.
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 /maintenance/preventiveMaintenanceEvents/{companyKey}/{preventiveMaintenance}/{occurrence}/company

PUT Set FixedDate PreventiveMaintenanceEvent

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

The following elements are required:

preventiveMaintenance (string) Preventive Maintenance.
occurrence (int) Event.
companyKey (string) The company key.
value (DateTimeOffset) 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 /maintenance/preventiveMaintenanceEvents/{companyKey}/{preventiveMaintenance}/{occurrence}/fixedDate

PUT Set IsActive PreventiveMaintenanceEvent

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

The following elements are required:

preventiveMaintenance (string) Preventive Maintenance.
occurrence (int) Event.
companyKey (string) The company key.
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 /maintenance/preventiveMaintenanceEvents/{companyKey}/{preventiveMaintenance}/{occurrence}/isActive

PUT Set IsDelayed PreventiveMaintenanceEvent

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

The following elements are required:

preventiveMaintenance (string) Preventive Maintenance.
occurrence (int) Event.
companyKey (string) The company key.
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 /maintenance/preventiveMaintenanceEvents/{companyKey}/{preventiveMaintenance}/{occurrence}/isDelayed

PUT Set MaintenancePlan PreventiveMaintenanceEvent

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

The following elements are required:

preventiveMaintenance (string) Preventive Maintenance.
occurrence (int) Event.
companyKey (string) The company key.
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 /maintenance/preventiveMaintenanceEvents/{companyKey}/{preventiveMaintenance}/{occurrence}/maintenancePlan

PUT Set MeterCumulativeReading PreventiveMaintenanceEvent

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

The following elements are required:

preventiveMaintenance (string) Preventive Maintenance.
occurrence (int) Event.
companyKey (string) The company key.
value (decimal) 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 /maintenance/preventiveMaintenanceEvents/{companyKey}/{preventiveMaintenance}/{occurrence}/meterCumulativeReading

PUT Set NotificationSent PreventiveMaintenanceEvent

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

The following elements are required:

preventiveMaintenance (string) Preventive Maintenance.
occurrence (int) Event.
companyKey (string) The company key.
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 /maintenance/preventiveMaintenanceEvents/{companyKey}/{preventiveMaintenance}/{occurrence}/notificationSent

PUT Set Occurrence PreventiveMaintenanceEvent

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

The following elements are required:

preventiveMaintenance (string) Preventive Maintenance.
occurrence (int) Event.
companyKey (string) The company key.
value (int) 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 /maintenance/preventiveMaintenanceEvents/{companyKey}/{preventiveMaintenance}/{occurrence}/occurrence

PUT Set PredictedDate PreventiveMaintenanceEvent

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

The following elements are required:

preventiveMaintenance (string) Preventive Maintenance.
occurrence (int) Event.
companyKey (string) The company key.
value (DateTimeOffset) 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 /maintenance/preventiveMaintenanceEvents/{companyKey}/{preventiveMaintenance}/{occurrence}/predictedDate

PUT Set PreventiveMaintenance PreventiveMaintenanceEvent

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

The following elements are required:

preventiveMaintenance (string) Preventive Maintenance.
occurrence (int) Event.
companyKey (string) The company key.
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 /maintenance/preventiveMaintenanceEvents/{companyKey}/{preventiveMaintenance}/{occurrence}/preventiveMaintenance

PUT Set RecurrenceFrequency PreventiveMaintenanceEvent

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

The following elements are required:

preventiveMaintenance (string) Preventive Maintenance.
occurrence (int) Event.
companyKey (string) The company key.
value (enum RecurrenceFrequency) The request body should contain the new value for the attribute.
See RecurrenceFrequency.

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 /maintenance/preventiveMaintenanceEvents/{companyKey}/{preventiveMaintenance}/{occurrence}/recurrenceFrequency

PUT Set WorkOrder PreventiveMaintenanceEvent

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

The following elements are required:

preventiveMaintenance (string) Preventive Maintenance.
occurrence (int) Event.
companyKey (string) The company key.
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 /maintenance/preventiveMaintenanceEvents/{companyKey}/{preventiveMaintenance}/{occurrence}/workOrder

PUT Set WorkOrder ProjectionWorkOrder

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

The following elements are required:

preventiveMaintenance (string) Preventive Maintenance.
occurrence (int) Event.
lineId (string) The detail identifier.
companyKey (string) The company key.
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 /maintenance/preventiveMaintenanceEvents/{companyKey}/{preventiveMaintenance}/{occurrence}/projectionWorkOrders/{lineId}/workOrder

PUT Set Custom Attribute PreventiveMaintenanceEvent

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

The following elements are required:

companyKey (string) The company key.
preventiveMaintenance (string) Preventive Maintenance
occurrence (int) Event
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 /maintenance/preventiveMaintenanceEvents/{companyKey}/{preventiveMaintenance}/{occurrence}/{customAttributeName}

PUT Set Custom Attribute ProjectionWorkOrder

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

The following elements are required:

companyKey (string) The company key.
preventiveMaintenance (string) Preventive Maintenance
occurrence (int) Event
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 /maintenance/preventiveMaintenanceEvents/{companyKey}/{preventiveMaintenance}/{occurrence}/projectionWorkOrders/{lineId}/{customAttributeName}

DELETE Operations

DELETE Projection Work Order by identifier

Deletes the entity record that matches the specified identifier.

The following elements are required:

preventiveMaintenance (string) Preventive Maintenance.
occurrence (int) Event.
companyKey (string) The company key.
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 /maintenance/preventiveMaintenanceEvents/{companyKey}/{preventiveMaintenance}/{occurrence}/projectionWorkOrders/{lineId}

DELETE PreventiveMaintenanceEvent 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 /maintenance/preventiveMaintenanceEvents/{id}

DELETE PreventiveMaintenanceEvent by key

Deletes the entity record that matches the specified key.

The following elements are required:

companyKey (string) The company key.
preventiveMaintenance (string) Preventive Maintenance.
occurrence (int) Event.

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 /maintenance/preventiveMaintenanceEvents/{companyKey}/{preventiveMaintenance}/{occurrence}

Resources


ApiPreventiveMaintenanceEventProjectionWorkOrdersResource

The following elements are required:

workOrder (string) Work Order.


ApiPreventiveMaintenanceEventResource

The following elements are required:

preventiveMaintenance (string) Preventive Maintenance.
occurrence (int) Event.
maintenancePlan (string) Maintenance Plan.
predictedDate (DateTimeOffset) Predicted Date.
recurrenceFrequency (enum RecurrenceFrequency) Recurrence Frequency.
See RecurrenceFrequency.
company (string) Company.
allowCreateWorkOrder (bool) Allow Create Work Order.
notificationSent (bool) Notification Sent.

The following elements are optional:

workOrder (string) Work Order.
isDelayed (bool) Is Delayed.
fixedDate (DateTimeOffset) Fixed Date.
projectionWorkOrders (List of ApiPreventiveMaintenanceEventProjectionWorkOrdersResource) Preventive Maint. Events.
See ApiPreventiveMaintenanceEventProjectionWorkOrdersResource.
meterCumulativeReading (decimal) Meter Cumulative Reading.


PreventiveMaintenanceEventResource

The following elements are required:

preventiveMaintenance (string) Preventive Maintenance.
(fk) Allowed value: the natural key of a record of type PreventiveMaintenance. These records are accessibly through the PreventiveMaintenances service.
occurrence (int) Event.
maintenancePlan (string) Maintenance Plan.
(fk) Allowed value: the natural key of a record of type MaintenancePlan. These records are accessibly through the MaintenancePlans service.
predictedDate (DateTimeOffset) Predicted Date.
recurrenceFrequency (enum RecurrenceFrequency) Recurrence Frequency.
See RecurrenceFrequency.
company (string) Company.
(fk) Allowed value: the natural key of a record of type Company. These records are accessibly through the Companies service.
allowCreateWorkOrder (bool) Allow Create Work Order.
notificationSent (bool) Notification Sent.

The following elements are optional:

workOrder (string) Work Order.
(fk) Allowed value: the natural key of a record of type WorkOrder. These records are accessibly through the WorkOrders service.
isDelayed (bool) Is Delayed.
fixedDate (DateTimeOffset) Fixed Date.
projectionWorkOrders (List of ProjectionWorkOrderResource) Preventive Maint. Events.
See ProjectionWorkOrderResource.
meterCumulativeReading (decimal) Meter Cumulative Reading.


ExtensibilityCustomAttributeValueResource

The following elements are required:

value (object) The custom attribute value.

Enumerations


RecurrenceFrequency

1 Daily
2 Weekly
3 Monthly
4 Yearly