Valuekeep Developers - Web API Reference

Assets | Down Time

Service to manage entities of type 'DownAndUpTimeHistory'.

Overview


URL api/{tenantKey}/{orgKey}/assetManagement/downAndUpTimeHistories
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 DownAndUpTimeHistories (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 DownAndUpTimeHistoryResource.

Response status codes:

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

Resource URL:

GET /assetManagement/downAndUpTimeHistories/odata

GET DownAndUpTimeHistory 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 DownAndUpTimeHistoryResource.

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

GET DownAndUpTimeHistory by key

Returns the entity record that matches the specified key.

The following elements are required:

companyKey (string) The company key.
downAndUpTimeHistoryKey (string) Down Time.

Response:

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

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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}

GET Down And Up Time Histories Has Work Orders

Custom operation 'DownAndUpTimeHistoriesHasWorkOrders'.

The following elements are required:

workOrderId (Guid) WorkOrderId.

Response:

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

Response status codes:

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

Resource URL:

GET /assetManagement/downAndUpTimeHistories/downAndUpTimeHistoriesHasWorkOrders/{workOrderId}

GET Down And Up Time Histories Has Opened From Work Orders

Custom operation 'DownAndUpTimeHistoriesHasOpenedFromWorkOrders'.

The following elements are required:

workOrderId (Guid) WorkOrderId.

Response:

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

Response status codes:

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

Resource URL:

GET /assetManagement/downAndUpTimeHistories/downAndUpTimeHistoriesHasOpenedFromWorkOrders/{workOrderId}

GET Down And Up Time Histories Has Requests

Custom operation 'DownAndUpTimeHistoriesHasRequests'.

The following elements are required:

requetsId (Guid) RequetsId.

Response:

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

Response status codes:

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

Resource URL:

GET /assetManagement/downAndUpTimeHistories/downAndUpTimeHistoriesHasRequests/{requetsId}

GET WO Have Pending Down Time

Custom operation 'WOHavePendingDownTime'.

The following elements are required:

workOrderId (Guid) WorkOrderId.

Response:

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

Response status codes:

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

Resource URL:

GET /assetManagement/downAndUpTimeHistories/wOHavePendingDownTime/{workOrderId}

GET Down And Up Time Histories Has State Transitions

Custom operation 'DownAndUpTimeHistoriesHasStateTransitions'.

The following elements are required:

transitionHistoryId (Guid) TransitionHistoryId.

Response:

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

Response status codes:

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

Resource URL:

GET /assetManagement/downAndUpTimeHistories/downAndUpTimeHistoriesHasStateTransitions/{transitionHistoryId}

GET Asset Has Down And Up Time Histories

Custom operation 'AssetHasDownAndUpTimeHistories'.

The following elements are required:

assetId (Guid) AssetId.
assetType (int) AssetType.

Response:

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

Response status codes:

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

Resource URL:

GET /assetManagement/downAndUpTimeHistories/assetHasDownAndUpTimeHistories/{assetId}/{assetType}

POST Operations

POST DownAndUpTimeHistories

Creates a new entity record.

The following elements are required:

downAndUpTimeHistoryResource (ApiDownAndUpTimeHistoryResource) The request body should contain the entity record that should be created.
See ApiDownAndUpTimeHistoryResource.

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

Response status codes:

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

Resource URL:

POST /assetManagement/downAndUpTimeHistories

POST Asset Has Down Time Pending

Custom operation 'AssetHasDownTimePending'.

The following elements are required:

assetId (Guid) AssetId.
assetType (int) AssetType.

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 /assetManagement/downAndUpTimeHistories/assetHasDownTimePending/{assetId}/{assetType}

POST Update Down And Up Time Histories From Work Order

Custom operation 'UpdateDownAndUpTimeHistoriesFromWorkOrder'.

The following elements are required:

workOrderKey (string) WorkOrderKey.
totalHours (TimeSpan) TotalHours.

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 /assetManagement/downAndUpTimeHistories/updateDownAndUpTimeHistoriesFromWorkOrder/{workOrderKey}

POST Validate Transition Dates

Custom operation 'ValidateTransitionDates'.

The following elements are required:

workOrderId (Guid) WorkOrderId.
transitionDates (List) TransitionDates.

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 /assetManagement/downAndUpTimeHistories/validateTransitionDates/{workOrderId}

POST Insert Down And Up Time Histories From Request

Custom operation 'InsertDownAndUpTimeHistoriesFromRequest'.

The following elements are required:

requestKey (string) RequestKey.
workOrderKey (string) WorkOrderKey.
applyChildren (bool) ApplyChildren.

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 /assetManagement/downAndUpTimeHistories/insertDownAndUpTimeHistoriesFromRequest/{requestKey}/{workOrderKey}/{applyChildren}

PUT Operations

PUT Set ApplyToChildren DownAndUpTimeHistory

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

The following elements are required:

downAndUpTimeHistoryKey (string) Down Time.
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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}/applyToChildren

PUT Set Company DownAndUpTimeHistory

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

The following elements are required:

downAndUpTimeHistoryKey (string) Down Time.
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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}/company

PUT Set Currency DownAndUpTimeHistory

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

The following elements are required:

downAndUpTimeHistoryKey (string) Down Time.
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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}/currency

PUT Set DownAndUpTimeHistoryKey DownAndUpTimeHistory

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

The following elements are required:

downAndUpTimeHistoryKey (string) Down Time.
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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}/downAndUpTimeHistoryKey

PUT Set DownTimeCost DownAndUpTimeHistory

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

The following elements are required:

downAndUpTimeHistoryKey (string) Down Time.
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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}/downTimeCost

PUT Set DownTimeDate DownAndUpTimeHistory

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

The following elements are required:

downAndUpTimeHistoryKey (string) Down Time.
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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}/downTimeDate

PUT Set EndDate DownAndUpTimeHistory

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

The following elements are required:

downAndUpTimeHistoryKey (string) Down Time.
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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}/endDate

PUT Set IsActive DownAndUpTimeHistory

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

The following elements are required:

downAndUpTimeHistoryKey (string) Down Time.
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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}/isActive

PUT Set OriginalRecord DownAndUpTimeHistory

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

The following elements are required:

downAndUpTimeHistoryKey (string) Down Time.
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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}/originalRecord

PUT Set Remarks DownAndUpTimeHistory

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

The following elements are required:

downAndUpTimeHistoryKey (string) Down Time.
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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}/remarks

PUT Set Request DownAndUpTimeHistory

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

The following elements are required:

downAndUpTimeHistoryKey (string) Down Time.
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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}/request

PUT Set StartDate DownAndUpTimeHistory

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

The following elements are required:

downAndUpTimeHistoryKey (string) Down Time.
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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}/startDate

PUT Set Tool DownAndUpTimeHistory

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

The following elements are required:

downAndUpTimeHistoryKey (string) Down Time.
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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}/tool

PUT Set TotalHours DownAndUpTimeHistory

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

The following elements are required:

downAndUpTimeHistoryKey (string) Down Time.
companyKey (string) The company key.
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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}/totalHours

PUT Set TotalHoursSeconds DownAndUpTimeHistory

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

The following elements are required:

downAndUpTimeHistoryKey (string) Down Time.
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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}/totalHoursSeconds

PUT Set VKEntittyStateTransitionHistoryEnd DownAndUpTimeHistory

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

The following elements are required:

downAndUpTimeHistoryKey (string) Down Time.
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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}/vKEntittyStateTransitionHistoryEnd

PUT Set VKEntittyStateTransitionHistoryStart DownAndUpTimeHistory

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

The following elements are required:

downAndUpTimeHistoryKey (string) Down Time.
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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}/vKEntittyStateTransitionHistoryStart

PUT Set WorkOrder DownAndUpTimeHistory

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

The following elements are required:

downAndUpTimeHistoryKey (string) Down Time.
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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}/workOrder

PUT Set Custom Attribute DownAndUpTimeHistory

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

The following elements are required:

companyKey (string) The company key.
downAndUpTimeHistoryKey (string) Down Time
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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}/{customAttributeName}

DELETE Operations

DELETE DownAndUpTimeHistory 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 /assetManagement/downAndUpTimeHistories/{id}

DELETE DownAndUpTimeHistory by key

Deletes the entity record that matches the specified key.

The following elements are required:

companyKey (string) The company key.
downAndUpTimeHistoryKey (string) Down Time.

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 /assetManagement/downAndUpTimeHistories/{companyKey}/{downAndUpTimeHistoryKey}

Resources


ApiDownAndUpTimeHistoryResource

The following elements are required:

downAndUpTimeHistoryKey (string) Down Time.
downTimeDate (DateTimeOffset) Down Time Date.
startDate (DateTimeOffset) Start Date.
totalHours (TimeSpan) Total Time.
downTimeCost (MoneyResource) Down Time Cost.
See MoneyResource .
assetType (enum ReportAssetType) Asset Type.
See ReportAssetType.
applyToChildren (bool) Apply To Children.
currency (string) Currency.
company (string) Company.
originalRecord (bool) Original Record.

The following elements are optional:

endDate (DateTimeOffset) End Date.
location (string) Location.
equipment (string) Equipment.
tool (string) Tool.
request (string) Request.
workOrder (string) Work Order.
remarks (string) Remarks.
totalHoursSeconds (int) Total Hours Seconds.
vKEntittyStateTransitionHistoryStart (string) Entity State Transition Start.
vKEntittyStateTransitionHistoryEnd (string) Entity State Transition End.


DownAndUpTimeHistoryResource

The following elements are required:

downAndUpTimeHistoryKey (string) Down Time.
downTimeDate (DateTimeOffset) Down Time Date.
startDate (DateTimeOffset) Start Date.
totalHours (TimeSpan) Total Time.
downTimeCost (MoneyResource) Down Time Cost.
See MoneyResource .
assetType (enum ReportAssetType) Asset Type.
See ReportAssetType.
applyToChildren (bool) Apply To Children.
currency (string) Currency.
company (string) Company.
originalRecord (bool) Original Record.

The following elements are optional:

endDate (DateTimeOffset) End Date.
location (string) Location.
equipment (string) Equipment.
tool (string) Tool.
request (string) Request.
workOrder (string) Work Order.
remarks (string) Remarks.
totalHoursSeconds (int) Total Hours Seconds.
vKEntittyStateTransitionHistoryStart (string) Entity State Transition Start.
vKEntittyStateTransitionHistoryEnd (string) Entity State Transition End.


MoneyResource

The following elements are required:

amount (decimal) The amount.

The following elements are optional:

baseAmount (decimal) The base amount.
reportingAmount (decimal) The reporting amount.
fractionDigits (int) The fraction digits.
symbol (string) The symbol.

Notes: For the POST operation it is not necessary to send the fields: BaseAmount, ReportingAmount, FractionDigits and Symbol. Will be ignored.



TransitionDate

The following elements are required:

nextStateId (Guid) Next State Id.
dateTransition (DateTimeOffset) Date Transition.


ExtensibilityCustomAttributeValueResource

The following elements are required:

value (object) The custom attribute value.

Enumerations


ReportAssetType

1 Location
2 Equipment
3 Tool