Valuekeep Developers - Web API Reference

Assets | Location Change

Service to manage entities of type 'AssetLocationHistory'.

Overview


URL api/{tenantKey}/{orgKey}/assetManagement/assetLocationHistories
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 AssetLocationHistories (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 AssetLocationHistoryResource.

Response status codes:

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

Resource URL:

GET /assetManagement/assetLocationHistories/odata

GET AssetLocationHistory 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 AssetLocationHistoryResource.

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

GET AssetLocationHistory by key

Returns the entity record that matches the specified key.

The following elements are required:

companyKey (string) The company key.
assetLocationHistoryKey (string) Location Change.

Response:

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

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/assetLocationHistories/{companyKey}/{assetLocationHistoryKey}

POST Operations

POST AssetLocationHistories

Creates a new entity record.

The following elements are required:

assetLocationHistoryResource (ApiAssetLocationHistoryResource) The request body should contain the entity record that should be created.
See ApiAssetLocationHistoryResource.

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

Response status codes:

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

Resource URL:

POST /assetManagement/assetLocationHistories

PUT Operations

PUT Set AssetLocationHistoryKey AssetLocationHistory

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

The following elements are required:

assetLocationHistoryKey (string) Location Change.
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/assetLocationHistories/{companyKey}/{assetLocationHistoryKey}/assetLocationHistoryKey

PUT Set Company AssetLocationHistory

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

The following elements are required:

assetLocationHistoryKey (string) Location Change.
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/assetLocationHistories/{companyKey}/{assetLocationHistoryKey}/company

PUT Set EndDate AssetLocationHistory

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

The following elements are required:

assetLocationHistoryKey (string) Location Change.
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/assetLocationHistories/{companyKey}/{assetLocationHistoryKey}/endDate

PUT Set IsActive AssetLocationHistory

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

The following elements are required:

assetLocationHistoryKey (string) Location Change.
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/assetLocationHistories/{companyKey}/{assetLocationHistoryKey}/isActive

PUT Set Remarks AssetLocationHistory

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

The following elements are required:

assetLocationHistoryKey (string) Location Change.
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/assetLocationHistories/{companyKey}/{assetLocationHistoryKey}/remarks

PUT Set StartDate AssetLocationHistory

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

The following elements are required:

assetLocationHistoryKey (string) Location Change.
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/assetLocationHistories/{companyKey}/{assetLocationHistoryKey}/startDate

PUT Set Custom Attribute AssetLocationHistory

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

The following elements are required:

companyKey (string) The company key.
assetLocationHistoryKey (string) Location Change
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/assetLocationHistories/{companyKey}/{assetLocationHistoryKey}/{customAttributeName}

DELETE Operations

DELETE AssetLocationHistory 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/assetLocationHistories/{id}

DELETE AssetLocationHistory by key

Deletes the entity record that matches the specified key.

The following elements are required:

companyKey (string) The company key.
assetLocationHistoryKey (string) Location Change.

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/assetLocationHistories/{companyKey}/{assetLocationHistoryKey}

Resources


ApiAssetLocationHistoryResource

The following elements are required:

assetLocationHistoryKey (string) Location Change.
assetType (enum EquipmentItemType) Asset Type.
See EquipmentItemType.
location (string) Location.
startDate (DateTimeOffset) Start Date.
company (string) Company.

The following elements are optional:

equipment (string) Equipment.
tool (string) Tool.
endDate (DateTimeOffset) End Date.
remarks (string) Remarks.


AssetLocationHistoryResource

The following elements are required:

assetLocationHistoryKey (string) Location Change.
assetType (enum EquipmentItemType) Asset Type.
See EquipmentItemType.
location (string) Location.
(fk) Allowed value: the natural key of a record of type Location. These records are accessibly through the Locations service.
startDate (DateTimeOffset) Start Date.
company (string) Company.
(fk) Allowed value: the natural key of a record of type Company. These records are accessibly through the Companies service.

The following elements are optional:

equipment (string) Equipment.
(fk) Allowed value: the natural key of a record of type EquipmentItem. These records are accessibly through the EquipmentItems service.
tool (string) Tool.
(fk) Allowed value: the natural key of a record of type EquipmentItem. These records are accessibly through the EquipmentItems service.
endDate (DateTimeOffset) End Date.
remarks (string) Remarks.


ExtensibilityCustomAttributeValueResource

The following elements are required:

value (object) The custom attribute value.

Enumerations


EquipmentItemType

2 Equipment
3 Tool