Get all meter readings
get
/fscmRestApi/resources/11.13.18.05/meterReadings
Request
Query Parameters
-
expand: string
When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". More than one child can be specified using comma as a separator. Example: ?expand=Employees,Localizations. Nested children can also be provided following the format "Child.NestedChild" (Example: ?expand=Employees.Managers). If a nested child is provided (Example: Employees.Managers), the missing children will be processed implicitly. For example, "?expand=Employees.Managers" is the same as "?expand=Employees,Employees.Managers" (which will expand Employees and Managers).
-
fields: string
This parameter filters the resource fields. Only the specified fields are returned, which means that if no fields are specified, no fields are returned (useful to get only the links). If an indirect child resource is provided (Example: Employees.Managers), the missing children will be processed implicitly. For example, "?fields=Employees.Managers:Empname" is the same as "?fields=;Employees:;Employees.Managers:Empname" (which will only return the "Empname" field for Managers). the value of this query parameter is a list of resource fields. The attribute can be a direct (Example: Employees) or indirect (Example: Employees.Managers) child. It cannot be combined with expand query parameter. If both are provided, only fields will be considered.
Format: ?fields=Attribute1,Attribute2
Format for fields in child resource: ?fields=Accessor1:Attribute1,Attribute2 -
finder: string
Used as a predefined finder to search the collection.
Format: ?finder=<finderName>;<variableName>=<variableValue>,<variableName2>=<variableValue2>
The following are the available finder names and corresponding finder variables:- MetersByAssetMeterUserKey: Find the meter reading according to the meter code and the asset number.
Finder Variables:- MntAssetNumber; string; Number that uniquely identifies the asset.
- MntMeterCode; string; Abbreviation that uniquely idenitifies the meter.
- MetersByMeterReadingId: Find the meter reading according to the specified meter reading.
Finder Variables:- MeterReadingId; integer; Value that uniquely identifies the meter reading.
- PrimaryKey: Find the meter reading according to the meter reading identifier as the primary key.
Finder Variables:- MeterReadingId; integer; Value that uniquely identifies the meter reading.
- MetersByAssetMeterUserKey: Find the meter reading according to the meter code and the asset number.
-
limit: integer
This parameter restricts the number of resources returned inside the resource collection. If the limit exceeds the resource count then the framework will only return the available resources.
-
links: string
This parameter can be used to show only certain links while accessing a singular resource or a resource collection. The parameter value format is a comma-separated list of : <link_relation>
Example:
self,canonical -
offset: integer
Used to define the starting position of the resource collection. If offset exceeds the resource count then no resources are returned. Default value is 0.
-
onlyData: boolean
The resource item payload will be filtered in order to contain only data (no links section, for example).
-
orderBy: string
This parameter orders a resource collection based on the specified fields. The parameter value is a comma-separated string of attribute names, each optionally followed by a colon and "asc" or "desc". Specify "asc" for ascending and "desc" for descending. The default value is "asc". For example, ?orderBy=field1:asc,field2:desc
-
q: string
This query parameter defines the where clause. The resource collection will be queried using the provided expressions. The value of this query parameter is one or more expressions. Example: ?q=Deptno>=10 and <= 30;Loc!=NY
Format: ?q=expression1;expression2
You can use these queryable attributes to filter this collection resource using the q query parameter:- AssetDescription; string; Description of the asset.
- AssetId; integer; Unique identifier of an asset. Either the asset number or asset identifier is required for a new reading. When the asset identifier is provided with the meter identifier, it's used to identify an individual asset meter and record a new meter reading. Alternatively, the meter code and asset number may be used to identify an individual asset meter and record a new meter reading.
- AssetNumber; string; Unique number of an asset. Either the asset number or asset identifier is required for a new reading. When the asset number is provided with the meter code, it's used to identify an individual asset meter and record a new meter reading. Alternatively, the meter identifier and asset identifier may be used to identify an individual asset meter and record a new meter reading.
- Comments; string; Comments about a meter reading. If defined, they will be displayed during retrieval of historical readings.
- CreatedBy; string; User who created the meter reading record. The application automatically sets this value during creation. This attribute is read-only.
- CreationDate; string; Date when the meter reading record. The application automatically sets this value during creation. This attribute is read-only.
- DisabledFlag; boolean; Contains one of the following values: true or false. If true, then the meter reading has been disabled. If false, then the meter reading hasn't been disabled. This attribute doesn't have a default value. This attribute can be passed during update to disable an active reading in history, resulting in the cancelation and recreation of all active readings later in history.
- DisplayedValue; number; Value that's indicated on a physical or electronic meter. This value is the same as the Life-to-Date Reading value up until the point that a meter is reset or encounters a rollover event. For a change meter, this value is calculated by adding the current net change value to the previous displayed reading value. For an absolute meter, this value is always the same as the reading value. This attribute is read-only.
- InitialFlag; boolean; Contains one of the following values: true or false. If true, then the meter reading was created and an initial reading occurred. If false, then an initial reading didn't occur. This attribute doesn't have a default value. This attribute is read-only.
- LastUpdateDate; string; Date when the user most recently updated the meter reading record. The application automatically sets this value during creation. This attribute is read-only.
- LastUpdateLogin; string; Session login of the user who most recently updated the meter reading record. The application assigns a value to this attribute during creation. This attribute is read-only.
- LastUpdatedBy; string; User who most recently updated the meter reading record. The application assigns a value to this attribute during creation. This attribute is read-only.
- MeterCode; string; Unique identifying code of a meter template definition. Either the meter code or meter ID is required for a new reading. When the meter code is provided with the asset number, it's used to identify an individual asset meter and record a new meter reading. Alternatively, the meter identifier and asset identifier may be used to identify an individual asset meter and record a new meter reading.
- MeterDefinitionId; integer; Value that uniquely identifies a meter template. The value is saved during reading creation as additional reference to the meter code or id that is passed. This attribute is read-only.
- MeterId; integer; Value that uniquely identifies the asset meter. The meter identifier along with the asset identifier is used to identify an individual asset meter and record a new meter reading. Alternatively, the meter code and asset number may be used to identify an individual asset meter and record a new meter reading.
- MeterName; string; Name of a meter template definition. This is a read-only attribute.
- MeterReadingId; integer; Value that uniquely identifies a meter reading. This attribute is read-only. The value of this attribute is created when a meter reading is created for an asset meter.
- MeterUsageCode; string; Abbreviation that uniquely identifies whether the meter reading is created for an asset or for a contract line. Valid values are ORA_ASSET or ORA_CONTRACT_LINE. A list of accepted values is defined in the lookup type ORA_CSE_METER_USAGE_CODE.
- ModifiedFlag; boolean; Contains one of the following values: true or false. If true, then the meter reading has been modified. If false, then the meter reading hasn't been modified. This attribute doesn't have a default value. This attribute is read-only.
- NetValue; number; Value that represents the cumulative reading value for an asset meter, irrespective of Reset or Rollover events, over time. It is incremented by the recording new meter readings. This attribute is read-only.
- OssSubscriptionProductId; integer; Unique identifier of the subscription product.
- ProductName; string; Name of the subscription product.
- ProductNumber; string; Subscription product number.
- ReadingDate; string; Date and time when the meter reading was taken. It must be less than or equal to the system date and time, greater than the last reading date and time, and is validated against the asset meter active start and end dates.
- ReadingNetChange; number; Value for the difference between the current and last Displayed Reading values for a meter. This attribute is read-only.
- ReadingTypeCode; string; Code that identifies the reading type of a meter reading. Valid values include ORA_ABSOLUTE, ORA_CHANGE, or ORA_RESET. A list of accepted values is defined in the lookup type ORA_CSE_READING_TYPE_CODE.
- ReadingValue; number; Value of a meter reading. For continuous absolute meters, the reading value must be less than, equal to, or greater than the last reading in history. For continuous change meters, the reading value must be greater than or equal to zero. If the meter template has a reading minimum, maximum, or rollover maximum defined, then the reading value must also pass these validations during creation.
- ReferenceReadingId; integer; Value that references the meter reading that was canceled and used as the source for creating the contextual reading, based on the disabling of another reading earlier in history. This attribute is read-only.
- ResetFlag; boolean; Contains one of the following values: true or false. If true, then the meter reading resulted in a reset of the meter. If false, then the meter reading did not result in a reset of the meter. The default value is false. This attribute is read-only. When creating the reading, if the reading type code is ORA_RESET, then this attribute will be automatically set to true.
- RolloverFlag; boolean; Contains one of the following values: true or false. If true, then the meter reading resulted in a rollover of the meter. If false, then the meter reading didn't result in a rollover of the meter. The default value is false. For continuous absolute ascending meters, passing a value of true will relax the validations that the reading value must be less than, equal to, or greater than the last reading in history.
- SubscriptionProductPuid; string; Value that uniquely identifies the subscription product.
- WorkOrderId; integer; Unique identifier of the maintenance work order from which the meter reading was recorded. This is an optional attribute. User can pass the work order identifier or work order number.
- WorkOrderNumber; string; Name of the maintenance work order from which the meter reading was recorded. This is an optional attribute. User can pass the work order identifier or work order number.
-
totalResults: boolean
The resource collection representation will include the "estimated row count" when "?totalResults=true", otherwise the count is not included. The default value is "false".
Header Parameters
-
Metadata-Context:
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version:
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/json
Default Response
The following table describes the default response for this task.
Headers
-
Metadata-Context:
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version:
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Root Schema : meterReadings
Type:
Show Source
object
-
count(required): integer
The number of resource instances returned in the current range.
-
hasMore(required): boolean
Indicates whether more resources are available on the server than the subset returned in the response. If the value is true, then there are more resources to retrieve from the server. The default value is false.
-
items: array
Items
Title:
Items
The items in the collection. -
limit(required): integer
The actual paging size used by the server.
-
links(required): array
Links
Title:
Links
The link relations associated with the resource instance. -
offset(required): integer
The offset value used in the current page.
-
totalResults: integer
The estimated row count when "?totalResults=true", otherwise the count is not included.
Nested Schema : Links
Type:
array
Title:
Links
The link relations associated with the resource instance.
Show Source
Nested Schema : meterReadings-item-response
Type:
Show Source
object
-
AssetDescription: string
Read Only:
true
Maximum Length:240
Description of the asset. -
AssetId: integer
Unique identifier of an asset. Either the asset number or asset identifier is required for a new reading. When the asset identifier is provided with the meter identifier, it's used to identify an individual asset meter and record a new meter reading. Alternatively, the meter code and asset number may be used to identify an individual asset meter and record a new meter reading.
-
AssetNumber: string
Unique number of an asset. Either the asset number or asset identifier is required for a new reading. When the asset number is provided with the meter code, it's used to identify an individual asset meter and record a new meter reading. Alternatively, the meter identifier and asset identifier may be used to identify an individual asset meter and record a new meter reading.
-
Comments: string
Maximum Length:
240
Comments about a meter reading. If defined, they will be displayed during retrieval of historical readings. -
CreatedBy: string
Read Only:
true
Maximum Length:64
User who created the meter reading record. The application automatically sets this value during creation. This attribute is read-only. -
CreationDate: string
(date-time)
Read Only:
true
Date when the meter reading record. The application automatically sets this value during creation. This attribute is read-only. -
DisabledFlag: boolean
Maximum Length:
1
Default Value:false
Contains one of the following values: true or false. If true, then the meter reading has been disabled. If false, then the meter reading hasn't been disabled. This attribute doesn't have a default value. This attribute can be passed during update to disable an active reading in history, resulting in the cancelation and recreation of all active readings later in history. -
DisplayedValue: number
Read Only:
true
Value that's indicated on a physical or electronic meter. This value is the same as the Life-to-Date Reading value up until the point that a meter is reset or encounters a rollover event. For a change meter, this value is calculated by adding the current net change value to the previous displayed reading value. For an absolute meter, this value is always the same as the reading value. This attribute is read-only. -
InitialFlag: boolean
Read Only:
true
Maximum Length:1
Contains one of the following values: true or false. If true, then the meter reading was created and an initial reading occurred. If false, then an initial reading didn't occur. This attribute doesn't have a default value. This attribute is read-only. -
LastUpdateDate: string
(date-time)
Read Only:
true
Date when the user most recently updated the meter reading record. The application automatically sets this value during creation. This attribute is read-only. -
LastUpdatedBy: string
Read Only:
true
Maximum Length:64
User who most recently updated the meter reading record. The application assigns a value to this attribute during creation. This attribute is read-only. -
LastUpdateLogin: string
Read Only:
true
Maximum Length:32
Session login of the user who most recently updated the meter reading record. The application assigns a value to this attribute during creation. This attribute is read-only. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
MeterCode: string
Unique identifying code of a meter template definition. Either the meter code or meter ID is required for a new reading. When the meter code is provided with the asset number, it's used to identify an individual asset meter and record a new meter reading. Alternatively, the meter identifier and asset identifier may be used to identify an individual asset meter and record a new meter reading.
-
MeterDefinitionId: integer
(int64)
Title:
Meter Definition ID
Read Only:true
Value that uniquely identifies a meter template. The value is saved during reading creation as additional reference to the meter code or id that is passed. This attribute is read-only. -
MeterId: integer
(int64)
Value that uniquely identifies the asset meter. The meter identifier along with the asset identifier is used to identify an individual asset meter and record a new meter reading. Alternatively, the meter code and asset number may be used to identify an individual asset meter and record a new meter reading.
-
MeterName: string
Title:
Meter Name
Read Only:true
Maximum Length:120
Name of a meter template definition. This is a read-only attribute. -
MeterReadingId: integer
(int64)
Value that uniquely identifies a meter reading. This attribute is read-only. The value of this attribute is created when a meter reading is created for an asset meter.
-
MeterUsageCode: string
Abbreviation that uniquely identifies whether the meter reading is created for an asset or for a contract line. Valid values are ORA_ASSET or ORA_CONTRACT_LINE. A list of accepted values is defined in the lookup type ORA_CSE_METER_USAGE_CODE.
-
ModifiedFlag: boolean
Read Only:
true
Maximum Length:1
Contains one of the following values: true or false. If true, then the meter reading has been modified. If false, then the meter reading hasn't been modified. This attribute doesn't have a default value. This attribute is read-only. -
NetValue: number
Read Only:
true
Value that represents the cumulative reading value for an asset meter, irrespective of Reset or Rollover events, over time. It is incremented by the recording new meter readings. This attribute is read-only. -
OrganizationCode: string
Maximum Length:
255
Code that uniquely identifies the work order organization. Either the organization code or the organization identifier Is required when work order details are entered. -
OrganizationId: integer
Value that uniquely identifies the work order organization. Either the organization code or the organization identifier Is required when work order details are entered.
-
OssSubscriptionProductId: integer
(int64)
Read Only:
true
Unique identifier of the subscription product. -
ProductName: string
Title:
Product Name
Read Only:true
Maximum Length:300
Name of the subscription product. -
ProductNumber: string
Title:
Product Number
Read Only:true
Maximum Length:300
Subscription product number. -
ReadingDate: string
(date-time)
Title:
Reading Date-Time
Date and time when the meter reading was taken. It must be less than or equal to the system date and time, greater than the last reading date and time, and is validated against the asset meter active start and end dates. -
ReadingNetChange: number
Read Only:
true
Value for the difference between the current and last Displayed Reading values for a meter. This attribute is read-only. -
ReadingTypeCode: string
Maximum Length:
30
Code that identifies the reading type of a meter reading. Valid values include ORA_ABSOLUTE, ORA_CHANGE, or ORA_RESET. A list of accepted values is defined in the lookup type ORA_CSE_READING_TYPE_CODE. -
ReadingValue: number
Value of a meter reading. For continuous absolute meters, the reading value must be less than, equal to, or greater than the last reading in history. For continuous change meters, the reading value must be greater than or equal to zero. If the meter template has a reading minimum, maximum, or rollover maximum defined, then the reading value must also pass these validations during creation.
-
ReferenceReadingId: integer
(int64)
Read Only:
true
Value that references the meter reading that was canceled and used as the source for creating the contextual reading, based on the disabling of another reading earlier in history. This attribute is read-only. -
ResetFlag: boolean
Maximum Length:
1
Contains one of the following values: true or false. If true, then the meter reading resulted in a reset of the meter. If false, then the meter reading did not result in a reset of the meter. The default value is false. This attribute is read-only. When creating the reading, if the reading type code is ORA_RESET, then this attribute will be automatically set to true. -
RolloverFlag: boolean
Maximum Length:
1
Contains one of the following values: true or false. If true, then the meter reading resulted in a rollover of the meter. If false, then the meter reading didn't result in a rollover of the meter. The default value is false. For continuous absolute ascending meters, passing a value of true will relax the validations that the reading value must be less than, equal to, or greater than the last reading in history. -
SubscriptionProductPuid: string
Title:
Subscription Product Number
Read Only:true
Maximum Length:120
Value that uniquely identifies the subscription product. -
WorkOrderId: integer
(int64)
Unique identifier of the maintenance work order from which the meter reading was recorded. This is an optional attribute. User can pass the work order identifier or work order number.
-
WorkOrderNumber: string
Maximum Length:
255
Name of the maintenance work order from which the meter reading was recorded. This is an optional attribute. User can pass the work order identifier or work order number.
Nested Schema : Links
Type:
array
Title:
Links
The link relations associated with the resource instance.
Show Source
Nested Schema : link
Type:
Show Source
object
-
href: string
Title:
hyperlink reference
The URI to the related resource. -
kind: string
Title:
kind
Allowed Values:[ "collection", "item", "describe", "other" ]
The kind of the related resource. -
name: string
Title:
name
The name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relation
Allowed Values:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]
The name of the relation to the resource instance. Example: self.
Nested Schema : properties
Type:
Show Source
object
-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
Examples
These examples describe how to get all meter readings.
Example cURL Command
Use the following cURL command to submit a request on the REST resource:
curl -u username:password "https://servername/fscmRestApi/resources/version/meterReadings"
Example 1
This example describes how to get all meter readings.
Example 1 Response Body
The following shows an example of the response body in JSON format.
{ "MeterReadingId": 300100141428011, "ReadingValue": 1208.12, "ReadingDate": "2018-03-14T23:30:00+00:00", "ReadingTypeCode": "ORA_ABSOLUTE", "ReadingNetChange": 1000, "DisplayedValue": 1000, "NetValue": 1208.12, "Comments": "24ndsept Reading-108.12", "RolloverFlag": false, "ResetFlag": false, "ModifiedFlag": null, "InitialFlag": null, "DisabledFlag": null, "ReferenceReadingId": null, "MeterDefinitionId": null, "MeterCode": "ODOMETER", "MeterId": 300100141395129, "MeterUsageCode": "ORA_ASSET", "AssetNumber": null, "AssetId": null "ProductName": null, "ProductNumber": null, "SubscriptionProductPuid": null, "OssSubscriptionProductId": null, "MeterName": "Odometer", "CreatedBy": "USER", "CreationDate": "2020-01-23T12:16:41+00:00", "LastUpdateDate": "2020-01-23T12:16:41+00:00", "LastUpdatedBy": "USER", "LastUpdateLogin": "C8D60D1E5371AF3E7C7E9DDF571B81C0", "AssetDescription": null, "WorkOrderId": null, "WorkOrderNumber": null, "OrganizationId": null, "OrganizationCode": null, }
Example 2
This example describes how to get all meter readings for a meter code using a finder.
Example 2 Response Body
The following shows an example of the response body in JSON format.
{ "MeterReadingId": 300100141428011, "ReadingValue": 1208.12, "ReadingDate": "2018-03-14T23:30:00+00:00", "ReadingTypeCode": "ORA_ABSOLUTE", "ReadingNetChange": 1000, "DisplayedValue": 1000, "NetValue": 1208.12, "Comments": "24ndsept Reading-108.12", "RolloverFlag": false, "ResetFlag": false, "ModifiedFlag": null, "InitialFlag": null, "DisabledFlag": null, "ReferenceReadingId": null, "MeterDefinitionId": null, "MeterCode": "meterCode", "MeterId": 300100141395129, "MeterUsageCode": "ORA_ASSET", "AssetNumber": null, "AssetId": null "ProductName": null, "ProductNumber": null, "SubscriptionProductPuid": null, "OssSubscriptionProductId": null, "MeterName": "Odometer", "CreatedBy": "USER", "CreationDate": "2020-01-23T12:16:41+00:00", "LastUpdateDate": "2020-01-23T12:16:41+00:00", "LastUpdatedBy": "USER", "LastUpdateLogin": "C8D60D1E5371AF3E7C7E9DDF571B81C0", "AssetDescription": null, "WorkOrderId": null, "WorkOrderNumber": null, "OrganizationId": null, "OrganizationCode": null, }