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": "f3cd7e69623b4324b5cc8905da537c74",
      "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": "d0863edd3aaf4c6393480afae0679c2d",
      "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": "f3cd7e69623b4324b5cc8905da537c74"
    },
    {
      "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": "d0863edd3aaf4c6393480afae0679c2d"
    }
  ],
  "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": "d0863edd3aaf4c6393480afae0679c2d",
      "dateCreated": "2018-01-01T02:01:00+02:00"
    }
  ],
  "count": 1,
  "page": 2,
  "limit": 1,
  "total": 2
}