The following entity APIs are provided: Asset, Authority, Lookup, Repair Order, User, and Work Order. These entities are described in more detail in the following sections.
Use the Asset API entity to work with assets in the AgileAssets system as well as inventories associated with the assets. This entity allows both GET and POST calls.
The following GET calls may be made to request data from the AgileAssets system via the API: {baseURL}/assetThis call retrieves all asset types in the system. An example of this type is shown below: http://vega:8080/ams_ky/rest/v1/asset?q={"projection":["ASSET_TYPE_ID", "ASSET_TYPE_NAME"],"page":{"number":4,"size":2}}
{baseURL}/asset/{id}This call retrieves asset type information for a particular asset ID. An example of this type is shown below: http://vega:8080/ams_ky/rest/v1/asset/639
|
{ |
This call retrieves the parent asset type for an asset with name {name} Note: This is not case sensitive. If the name contains spaces or slashes, omit them entirely in the URL. An example of this type is shown below:
http://vega:8080/ams_ky/rest/v1/asset/walls/parent
{ |
This call retrieves the parent asset type for asset with ID {id}. An example of this type is shown below:
http://vega:8080/ams_ky/rest/v1/asset/963/parent
{ |
This call retrieves the inventory table for an asset with this numeric ID. An example of this call is shown below:
http://vega:8080/ams_ky/rest/v1/asset/639/inventory
This call retrieves the header inventory table for the asset with name {name}. Note: This is not case sensitive. If the name contains spaces, tabs, line breaks, or slashes, omit them entirely in the URL. An example of this call for the Road Sections inventory is shown below (note that since "Road Sections" contains spaces, these are omitted in the call):
http://vega:8080/ams_ky/rest/v1/asset/roadsections/inventory
This call retrieves inventory class codes for the asset identified by the {id} asset ID. An example of this type is shown below:
{baseURL}/asset/{name}/group
This call retrieves all inventory class codes for the asset identified by the {name} asset name. An example of this type is shown below:
{baseURL}/asset/{id}/key
This call retrieves the inventory table key column name, where {id} is the numeric ID of the asset. An example of this type is shown below:
{baseURL}/asset/{name}/key
This call retrieves the inventory table key column name, where {name} is the name of the asset. An example of this type is shown below:
{baseURL}/asset/{id}/inventory/{invenId}
This call retrieves a particular inventory element {invenId} from an inventory table for the asset with the {id} id. An example of this type is shown below:
{baseURL}/asset/{name}/inventory/{invenId}
This call retrieves a particular inventory element {invenId} from an inventory table for the asset named {name}. An example of this type is shown below:
{baseURL}/asset/{id}/inventory/{invenId}/detail
This call retrieves details for a particular inventory element {invenId} from an inventory table for the asset with {id} id. An example of this type is shown below:
{baseUrl}/asset/{name}/inventory/{invenId}/detail
This call retrieves details for a particular inventory element {invenId} from an inventory table for the asset named {name}. An example of this type is shown below:
POST calls are made to create data in the AgileAssets system through the API. When a new item is created, the correct ID is returned to the caller (providing the inventory element ID via a POST call is useless because POST is assumed to only create data). The following POST calls are available:
For example, the following POST call will insert two sign assemblies (in this example, the URL provides the asset type ID and the system uses this to identify the correct inventory table name):
The system returns the following: [2416662,2416661] |
Use the Authority API entity to retrieve authorities from an AgileAssets system. This entity allows only GET calls.
The following GET calls may be made to request data from the AgileAssets system via the API: {baseURL}/authority {baseURL}/authority/{id} {baseURL}/authority/{id}/name {baseURL}/authority/{id}/labor {baseURL}/authority/{id}/child {baseURL}/authority/{id}/parent {baseURL}/authority/{id}/user {baseURL}/authority/{id}/labor/shortlist {baseURL}/authority/{id}/equipment {baseURL}/authority/{id}/material/shortlist {baseURL}/authority/{id}/project {baseURL}/authority/{oid}/project/{pid} {baseURL}/authority/{oid}/project/{pid}/asset/{iid} {baseURL}/authority/{oid}/project/{pid}/asset/{iid}/activity/{aid}
|
Use the Lookup API entity to extract metadata. For example, mapping column IDs to the actual labels that a user wants to see on his or her computer or obtaining error messages by their IDs. This entity allows only GET calls.
The following GET calls may be made to request data from the AgileAssets system via the API:
|
Note: The Repair Order API entity will only function if the Fleet Management module is part of the AgileAssets system being queried and only if that module is assigned a module ID of 5. (This is because repair orders are only used in the Fleet Management module.) |
Use the Repair Order API entity to work with repair orders in the AgileAssets Fleet Management module. This entity allows GET, POST, PUT, and DELETE calls.
The following GET calls may be made to request repair order data from the AgileAssets system via the API:
{baseURL}/repairOrder/{id}/DirectCost
{baseURL}/repairOrder/vendor {baseURL}/repairOrder/vendor/map
|
When a new item is created, the correct ID is returned to the caller. Hence, providing the inventory element ID via a POST call is useless because POST is assumed to only create data. {baseURL}/repairOrder
The output is a JSON array of new PROJECT_ID values. It also automatically creates inventory PM activities for today.
The output is a JSON array of new WARRANTY_ID values. {baseURL}/repairOrder/{id}/directcost
The output is a JSON array of new RECORD_ID values for newly created direct costs. |
The following PUT calls may be made to modify records in the Fleet Management module via the API: {baseURL}/repairOrder/{id}
The output is an HTTP status code unless there is an error. {baseURL}/repairOrder/{id}/directcost
The output is an HTTP status code unless there is an error. |
The following DELETE calls may be made to delete data in the Fleet Management module via the API: {baseURL}/repairOrder/{id}
|
Use the User API entity to retrieve user information from an AgileAssets system. User IDs are stored in upper case in the AgileAssets database, but the URL is not case sensitive and therefore the User ID may be written in any case. This entity allows only GET calls.
The following GET calls may be made to request user information from the AgileAssets system via the API:
|
Use the Work Order API entity to work with work orders in the AgileAssets system. This entity allows GET, POST, PUT, and DELETE calls.
The following GET calls may be made to request work order data from the AgileAssets system via the API:
The response is a JSON array of JSONObjects. Each object is always a single pair of {key:value}, where key is the field name and value is the field value of this record.
|
POST calls create work orders and/or day cards. Creating a work order via a POST call creates a new work order and assigns it a new ID, which is returned to the client as a JSON array. Creating a day card via a POST call inserts a day card for a given work order ID. The ID is provided in the URL string or, when provided in a JSON array, in the request object. The advantage of creating a day card via a POST call rather than a PUT call is that a POST call always inserts a day card and so if a day card already exists, the operation would fail.
An example of this type is shown below:
For example, to insert a labor day card with one employee for work order 1643, use the following POST call:
|
The aim of PUT calls is to update already existing work orders and day cards. Updating a work order via a PUT call modifies an existing work order. Updating a day card via a PUT call modifies an existing day card for a given work order ID. The ID is provided in the URL string or, when provided in a JSON array, in the request object. {baseURL}/rest/workOrder/{workOrderId}/DayCard/
|
Use the following DELETE calls to delete data in the AgileAssets system via the API:
|