Updates a given asset.
Scope | assets |
App Type | Agency |
Authorization Type | Access token |
URI | /v4/assets/{id}?fields={fields}&lang={lang} |
HTTP Method | PUT |
Automation Version(s) | 9.0.0 |
Field or Parameter | Type | Required | Values | Description | Automation Version |
---|---|---|---|---|---|
attributes | attributes{} | No | Get Metadata of Asset Attributes | Contains custom attribute fields and values | 9.0.0 |
attributes.<customType> | string | No | A custom field name and value pair. For
example in JSON, "My Custom Field": "My Custom
Value". The custom field name and its data type
are defined in Automation custom forms or
custom tables.
|
9.0.0 | |
attributeTables[] | attributeTables{} | No | An array of attribute tables associated to the asset | 9.0.0 | |
attributeTables.id | string | Yes | Get Asset Attributes
Get Metadata of Asset Attributes |
The unique identifier of the attribute table, assigned by the Civic Platform server. | 9.0.0 |
attributeTables.rows[] | attributeTables.rows{} | No | Contains custom fields for the table update. | 9.0.0 | |
attributeTables.rows.action | string | Yes | create | update | delete | Specifies whether the array item is for a create, update, or delete request. | 9.0.0 |
attributeTables.rows.fields | attributeTables.rows.fields{} | No | Contains attribute fields and values to be updated. | 9.0.0 | |
attributeTables.rows.fields.<customType> | string | Yes | A custom field name and value pair. For
example in JSON, "My Custom Field": "My Custom
Value". The custom field name and its data type
are defined in Automation custom forms or
custom tables.
|
9.0.0 | |
attributeTables.rows.id | string | No | The unique identifier for the object, assigned by the Civic Platform server and provided in a response. | 9.0.0 | |
classType | string | No | Get All Asset Class Types | A Class Type is how Civic Platform groups objects that an agency owns or maintains. The five class types are component, linear, node-link linear, point, and polygon. Asset class types provide the ability to assign or group multiple asset types together. | 9.0.0 |
comments | comments{} | No | General comments about the asset. | 9.0.0 | |
comments.text | string | No | The localized display text. | 9.0.0 | |
comments.value | string | No | The value for the specified parameter. | 9.0.0 | |
currentValue | double | No | The current value of the asset. | 9.0.0 | |
dateOfService | dateTime | No | The date the asset was initially placed into service. | 9.0.0 | |
dependentFlag | string | No | Indicates whether or not the parent asset is dependent on this asset. | 9.0.0 | |
depreciationAmount | double | No | The decline in the asset value by the asset depreciation calculation. | 9.0.0 | |
depreciationEndDate | dateTime | No | The end date for the asset depreciation calculation. This field is used in the asset depreciation calculation. | 9.0.0 | |
depreciationStartDate | dateTime | No | The start date for the asset depreciation calculation. This field is used in the asset depreciation calculation. | 9.0.0 | |
depreciationValue | double | No | The asset value after the asset depreciation calculation, which is based on the start value, depreciation start and end dates, useful life, and salvage value. | 9.0.0 | |
description | description{} | No | The description of the asset. | 9.0.0 | |
description.text | string | No | The localized display text. | 9.0.0 | |
description.value | string | No | The value for the specified parameter. | 9.0.0 | |
endID | string | No | The ending point asset ID. | 9.0.0 | |
gisObjects[] | gisObjects{} | No | Contains GIS information about the location of the asset. | 9.0.0 | |
gisObjects.gisId | string | No | The id of the GIS object. | 9.0.0 | |
gisObjects.layerId | string | No | The Id of the GIS layer that contains the record location. | 9.0.0 | |
gisObjects.serviceId | string | No | The id of the GIS service. | 9.0.0 | |
group | string | No | Get All Asset Groups | The asset group. | 9.0.0 |
group.text | string | No | The localized display text. | 9.0.0 | |
group.value | string | No | The value for the specified parameter. | 9.0.0 | |
name | name{} | No | The descriptive name of the asset. | 9.0.0 | |
name.text | string | No | The localized display text. | 9.0.0 | |
name.value | string | No | The value for the specified parameter. | 9.0.0 | |
number | string | No | Get All Assets | The unique, alpha-numeric asset ID. | 9.0.0 |
salvageValue | double | No | The residual value of the asset at the end of it’s useful life. | 9.0.0 | |
serviceProviderCode | string | No | The unique agency identifier. | 9.0.0 | |
size | double | No | A positive numeric value for the asset size. | 9.0.0 | |
sizeUnit | string | No | Get All Asset Size Units | The unit of measure corresponding to the asset size. | 9.0.0 |
startID | string | No | The starting point asset ID. | 9.0.0 | |
startValue | double | No | The beginning value or purchase price of the asset. | 9.0.0 | |
status | string | No | Get All Asset Statuses | The status of the asset. | 9.0.0 |
status.text | string | No | The localized display text. | 9.0.0 | |
status.value | string | No | The value for the specified parameter. | 9.0.0 | |
statusDate | dateTime | No | The date the asset status changed. | 9.0.0 | |
type | string | No | Get All Asset Types | The type of asset. | 9.0.0 |
type.text | string | No | The localized display text. | 9.0.0 | |
type.value | string | No | The value for the specified parameter. | 9.0.0 | |
fields (URI parameter) |
string | No | Comma-delimited names of fields to be returned in the response. Note: Field names are case-sensitive and only first-level fields are supported. Invalid field names are ignored. | 9.0.0 | |
id (URI parameter) |
long | Yes | Get All Assets | The unique identifier of the asset, assigned by the Civic Platform server. | 9.0.0 |
lang (URI parameter) |
String | No | Indicates the language applied. | 9.0.0 |
{ "dateOfService": "2016-08-19 00:00:00", "depreciationAmount": 100, "statusDate": "2016-08-19 00:00:00", "salvageValue": 200, "currentValue": 1000.00, "depreciationValue": 50, "dependentFlag": "N", "classType": "Point", "serviceProviderCode": "APIAUTO", "startValue": 12.0, "name": { "value": "janes", "text": "janes" }, "description": { "value": "test asset", "text": "test asset" }, "comments": { "value": "123 asset", "text": "123 asset" }, "group": { "value": "Electric", "text": "Electric" }, "type": { "value": "Pole", "text": "Pole" }, "attributes": { "Safety Instructions": "yes", "Building": "345", "Material": "890", "Depth": "999", "X Coordinate": "1.1", "Avg Monthly Usage Measurement": "5", "Average Monthly Usage": "4", "Manufacturer": "Code 3", "Cover Diameter": "67", "Room": "899" }, "attributeTables": [ { "id": "801", "rows": [ { "fields": {"CustomField1": "455 CODE"}, "id": "1", "action": "update" }] }] }
Field | Type | Description | Automation Version |
---|---|---|---|
result | result{} | 9.0.0 | |
result.code | string | A code identifying an associated item | 9.0.0 |
result.id | string | The unique identifier for the object, assigned by the Civic Platform server and provided in a response. | 9.0.0 |
result.isSuccess | boolean | Indicates whether or not the operation on the item is successful. | 9.0.0 |
result.message | string | A text message related to the operation. | 9.0.0 |
status | integer | The record status. | 9.0.0 |