AMEE API / Data API / Data Item Value
Table of Contents
Overview
Data Item Values belong to Data Items. Each Data Item Value represents a distinct value such as 'energyConsumption', or 'kgCO2PerkWh'. Data Item Values are defined by an Item Value Definition, and are similar in structure to Profile Item Values.
See also: AMEE Concepts
Properties
| Property | Definition |
| value | The value of this Data Item Value. |
See also: Common Properties
API Operations
View a Data Item Value
- URL: http://{server}/data/{subcategory_path}/{data_item_uid}/{data_item_value_name}
- Method: GET
- Response format: application/xml, application/json
- Response code: 200 OK
- Response body: A description of the data item value.
Example: JSON
Request:
GET /data/transport/plane/generic/FFC7A05D54AD/kgCO2PerPassengerJourney HTTP/1.1
Accept: application/json
Authtoken: {your_authtoken_goes_here}
Response:
HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8
{
"itemValue":{
"itemValueDefinition":{
"uid":"653828811D42",
"name":"kgCO2 Per Passenger Journey",
"path":"kgCO2PerPassengerJourney",
"valueDefinition":{
"uid":"8CB8A1789CD6",
"environment":{
"uid":"5F5887BCF726"
},
"created":"2007-07-27 09:30:44.0",
"description":"",
"name":"kgCO2PerJourney",
"valueType":"DECIMAL",
"modified":"2007-08-01 08:57:31.0"
}
},
"perUnit":"",
"uid":"C32B6E2EDCB0",
"unit":"",
"created":"2007-08-01 09:00:41.0",
"item":{...},
"name":"kgCO2 Per Passenger Journey",
"value":"81.2000",
"path":"kgCO2PerPassengerJourney",
"displayPath":"kgCO2PerPassengerJourney",
"displayName":"kgCO2 Per Passenger Journey",
"modified":"2009-01-18 19:14:54.0"
},
"path":"/transport/plane/generic/FFC7A05D54AD/kgCO2PerPassengerJourney",
"dataItem":{
"uid":"FFC7A05D54AD"
},
"actions":{
"allowCreate":false,
"allowView":true,
"allowList":false,
"allowModify":false,
"allowDelete":false
}
}
Example: XML
Request:
GET /data/transport/plane/generic/FFC7A05D54AD/kgCO2PerPassengerJourney HTTP/1.1
Accept: application/xml
Authtoken: {your_authtoken_goes_here}
Response:
HTTP/1.1 200 OK Content-Type: application/xml; charset=UTF-8
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <Resources> <DataItemValueResource> <ItemValue Created="2007-08-01 09:00:41.0" Modified="2009-01-18 19:14:54.0" uid="C32B6E2EDCB0"> <Path>kgCO2PerPassengerJourney</Path> <Name>kgCO2 Per Passenger Journey</Name> <Value>81.2000</Value> <Unit/> <PerUnit/> <ItemValueDefinition uid="653828811D42"> <Path>kgCO2PerPassengerJourney</Path> <Name>kgCO2 Per Passenger Journey</Name> <ValueDefinition created="2007-07-27 09:30:44.0" modified="2007-08-01 08:57:31.0" uid="8CB8A1789CD6"> <Name>kgCO2PerJourney</Name> <ValueType>DECIMAL</ValueType> <Description/> <Environment uid="5F5887BCF726"/> </ValueDefinition> <FromProfile>false</FromProfile> <FromData>true</FromData> </ItemValueDefinition> <DataItem uid="FFC7A05D54AD"/> </ItemValue> <DataItem uid="FFC7A05D54AD"/> <Path>/transport/plane/generic/FFC7A05D54AD/kgCO2PerPassengerJourney</Path> </DataItemValueResource> </Resources>
Update a Data Item Value
NOTE: This function is only accessible to Administrators.
- URL: http://{server}/data/{subcategory_path}/{data_item_uid}/{data_item_value_name}
- Method: PUT
- Response format: application/xml, application/json
- Response code: 200 OK
- Response body: A description of the updated data item value.
Parameters:
| API Version | Parameter | Description | Required |
| all | value | The updated value for this Data Item Value. | Yes |
Related Resources
- Data Item - Each Data Item Value belongs to a Data Item.
- Item Value Definition - Data Item Values are defined by Item Value Definitions.

