Inspections by monitoring id

All the inspections can be found by theirs monitoring id:

GET /api/2.5/monitorings/580997bb06674235801d75f2f6e6c6c6/inspections HTTP/1.0
Authorization: Basic dGVzdF9zYXM6dGVzdF9zYXNfdG9rZW4=
Host: audit-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json
{
  "data": [
    {
      "inspection_id": "UA-I-2018-01-01-000001",
      "dateModified": "2018-01-01T02:00:00+02:00",
      "id": "32bd447a7a024973a7eb88b58ba5a75e",
      "dateCreated": "2018-01-01T02:00:00+02:00"
    },
    {
      "inspection_id": "UA-I-2018-01-01-000002",
      "dateModified": "2018-01-01T02:01:00+02:00",
      "id": "788974a7dd6c4d60af259b7a60e5cb0c",
      "dateCreated": "2018-01-01T02:01:00+02:00"
    }
  ],
  "count": 2,
  "page": 1,
  "limit": 500,
  "total": 2
}

The opt_fields param is supported:

GET /api/2.5/monitorings/580997bb06674235801d75f2f6e6c6c6/inspections?opt_fields=description HTTP/1.0
Authorization: Basic dGVzdF9zYXM6dGVzdF9zYXNfdG9rZW4=
Host: audit-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json
{
  "data": [
    {
      "description": "La-la",
      "inspection_id": "UA-I-2018-01-01-000001",
      "dateModified": "2018-01-01T02:00:00+02:00",
      "dateCreated": "2018-01-01T02:00:00+02:00",
      "id": "32bd447a7a024973a7eb88b58ba5a75e"
    },
    {
      "description": "Inspection is an official visit to a building or organization to check that everything is satisfactory and that rules are being obeyed",
      "inspection_id": "UA-I-2018-01-01-000002",
      "dateModified": "2018-01-01T02:01:00+02:00",
      "dateCreated": "2018-01-01T02:01:00+02:00",
      "id": "788974a7dd6c4d60af259b7a60e5cb0c"
    }
  ],
  "count": 2,
  "page": 1,
  "limit": 500,
  "total": 2
}

Pagination can be controlled with limit and page params where:

  • limit - the maximum number of items
  • page - the number of page
GET /api/2.5/monitorings/580997bb06674235801d75f2f6e6c6c6/inspections?limit=1&page=2 HTTP/1.0
Authorization: Basic dGVzdF9zYXM6dGVzdF9zYXNfdG9rZW4=
Host: audit-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json
{
  "data": [
    {
      "inspection_id": "UA-I-2018-01-01-000002",
      "dateModified": "2018-01-01T02:01:00+02:00",
      "id": "788974a7dd6c4d60af259b7a60e5cb0c",
      "dateCreated": "2018-01-01T02:01:00+02:00"
    }
  ],
  "count": 1,
  "page": 2,
  "limit": 1,
  "total": 2
}