How to obtain consumption records via by OData?

How to obtain consumption records via by OData?

In all Entities we have the possibility of making Odata requests.

In Odata requests you must pay attention to the following syntax:

  1. $select: expression that determines which request fields are included in the result;
  2. $filter: expression used to restrict the information sent in the request;
  3. $orderby: expression used to organize the information sent;
  4. $skip: expression which ignores the first recordsExample $skip = 100 - ignores the first 100 records;
  5. $Top: expression that returns the first N request records;
  6. $expand: expression that allows you to relate entities, for example get the list of consumptions and respective parts consumed.

When making Odata requests there are two expressions that must be used:

  1. $select: mandatory expression, must indicate which fields you want to get
  2. $filter: as we limit the number of records per request to 100, we recommend you filter by the ModifiedOn field, so that you only get new or modified records.

Example

Below you will find a set of examples of Odata requests for work orders:

Odata request to obtain the consumption list without the lines
Odata request to obtain information on consumption and lines
Odata request to obtain work order consumption information with the respective lines ignoring the first 100 records and organized by modification date

    • Related Articles

    • How to obtain a list of work orders by OData?

      In all Entities we have the possibility of making Odata requests. In Odata requests you must pay attention to the following syntax: $select: expression that determines which request fields are included in the result; $filter: expression used to ...
    • WebAPI - How to get the list of consumption records from work orders?

      ​This method allows, in a simplified way, to obtain the list of the work order consumption records. The method to be used to obtain the list of work order consumption records is: GET ...
    • WebAPI - How do I get the list of labor records from work orders?

      This method allows, in a simplified way, to obtain the list of labor records from work orders. The method to use for obtaining the list of work order labor records is : GET url/api/mytenant/myorganization/maintenance/workorderreportlabors When this ...
    • WebAPI - How do I get the list of work order assignment records?

      This method allows, in a simplified way, to obtain the list of work order assignment records.  The method to use to get the list of work order assignment records is:  GET url/api/mytenant/myorganization/maintenance/workorderassignments  When this ...
    • Which Readers does the API Valuekeep V3 have available?

      The readers provided by the plugin aim to provide the VALUEKEEP system with a mechanism that reduces the number of requests and allows the implementer/integrator to easily customize the read requests according to the requested business processes. The ...