Request#

The API endpoints that allow the user to trigger automated analyses over existing fields, i.e. to send Requests to MRV API, are detailed here.

POST /v1/requests#

Send a new Request, i.e. trigger a new data analysis over a set of existing fields, for a specific time range.

Warning

The client must have been assigned to all products matching the Capabilities in the request to perform this action.

Please check how to configure this in the Client-Product Authorisation section.

Payload#

{
    "field_ids": [
        "84ccfd97-ddc6-4206-b8e7-f5551bf2ccf4",
        "84ccfd97-ddc6-4206-b8e7-f5551bf2ccf4"
    ],
    "capabilities": [
        "tillage",
        "crop-type"
    ],
    "start_date": "2022-01-01",
    "end_date": "2022-03-01"
}
  • field_ids: array of UUIDs of the Fields to be analysed.

  • capabilities: array of capabilities, the analysis to be performed in the given Fields. Their names and descriptions are detailed in the MRV Products section.

  • start_date: Starting date to be taken into account for the analysis.

  • end_date: End date to be taken into account for the analysis.

Response#

{
    "id": "54ccfd97-ddc6-4206-b8e7-f5551bf2ccf4",
    "status": "Pending",
    "created_at": "2022-04-01 12:15:46.734228",
    "updated_at": "2022-04-01 12:15:46.734228",
    "start_date": "2022-01-01",
    "end_date": "2022-03-01"
}
  • id: UUID of the Request.

  • status: current status of the Request. One of Pending, Completed or Failed.

  • created_at: timestamp of the Response object creation.

  • updated_at: timestamp of the Response object last update, in case it has been updated. Otherwise is null.

  • start_date: starting date to be taken into account for the analysis.

  • end_date: end date to be taken into account for the analysis.

GET /v1/requests#

List all existing Requests for the client. Results are paginated.

Response#

{
    "limit": 0,
    "offset": 0,
    "items": [
        {
            "id": "string",
            "status": "Pending",
            "created_at": "2022-06-29T09:23:06.130Z",
            "updated_at": "2022-06-29T09:23:06.130Z",
            "start_date": "2022-06-29",
            "end_date": "2022-06-29"
        }
    ]
}
  • limit: maximum number of results in the current page.

  • offset: first result of the current page.

  • items: array of API request resuslts. In our case, the Request objects. See the POST /v1/requests Response.

GET /v1/requests/<request_id>/results#

Show the results of the given Request.

URL parameters#

  • request_id: UUID of the Request whose Results are to be shown.

Response#

The different MRV products will have different results. A detailed explanation of all of them can be found in the MRV Products section, where a sample results payload for each product is shown. product are shown.