Skip to main content
GET
/
reports
/
v2
/
rs
List reports for the given site Ids
curl --request GET \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/reports/v2/rs \
  --header 'Authorization: Bearer <token>' \
  --header 'x-session-token: <x-session-token>'
{
  "data": [
    {
      "id": 1,
      "status": 1,
      "name": "Document Name",
      "type": 1,
      "comment": "Comment on the report",
      "checkDate": "2024-12-01T12:34:56.000Z",
      "updatedAt": "2024-12-09T14:23:00.000Z",
      "createdAt": "2024-01-15T08:45:00.000Z",
      "archivedAt": "2024-12-10T10:00:00.000Z",
      "establishmentCell": {
        "establishment": {
          "id": 1,
          "establishmentSiteId": 5,
          "name": "Main site",
          "count": 123
        },
        "cell": {
          "id": 1,
          "name": "Main site",
          "count": 123
        }
      },
      "rule": {
        "id": 1,
        "name": "Annual Safety Check",
        "type": 1,
        "rrule": "FREQ=YEARLY;BYMONTH=12;BYMONTHDAY=1",
        "workflowType": 1,
        "complianceType": 1
      },
      "rulesCount": 123,
      "rules": [
        {
          "id": 1,
          "name": "Annual Safety Check"
        }
      ],
      "technicalInstallations": [
        {
          "id": 1,
          "name": "establishment_informations.installation_ascenseurs",
          "presignedUrl": "https://example.com/presigned-url"
        }
      ],
      "anomalyStats": {
        "unreviewed": 5,
        "pending": 3,
        "resolved": 10
      },
      "anomalyItIds": [
        1,
        2,
        3
      ],
      "commission": {
        "id": 1,
        "visitType": 1,
        "signedBy": "Signatory",
        "decision": 1,
        "commissionDate": "2024-12-01T12:34:56.000Z"
      },
      "intervention": {
        "id": 1,
        "providerName": "Provider name",
        "assignedTo": {
          "type": 123,
          "id": 1,
          "name": "John Doe",
          "email": "test@mail.com"
        }
      },
      "equipment": {
        "id": 1,
        "name": "Equipment Name",
        "archivedAt": "2024-12-01T12:34:56.000Z"
      },
      "equipmentsCount": 123,
      "equipments": [
        {
          "id": 1,
          "name": "Equipment Name"
        }
      ],
      "createdBy": {
        "id": 1,
        "firstName": "John",
        "lastName": "Doe"
      },
      "actions": {
        "canBeUpdated": true,
        "canBeDeleted": true
      },
      "presignedUrl": "https://example.com/presigned-url"
    }
  ],
  "totalCount": 100,
  "pagination": {
    "page": 1,
    "pageSize": 50
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-session-token
string
required

Session token used for authenticating the request.

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjM0NTY3ODkwIiwic2Vzc2lvbklkIjoiYWJjZGVmMTIzNDU2IiwiaWF0IjoxNjA1MDk3ODk5LCJleHAiOjE2MDUxODQyOTl9.4XRQ1iXDyvEj5LgPZHbmTmzOZs98M3YPOzgf3MhxjaI"

x-sites
string

List of site IDs.

Example:

"['1', '2']"

Query Parameters

extend
enum<string>[]

Extend options:

  • "establishment-cell": Get information about the establishment cell

  • "rules": Get information about the rules linked to the intervention

  • "rules-details": Get id and name of rules linked to the intervention

  • "technical-installations": Get information about technical installations linked to the report

  • "anomaly-stats": Get information about anomalies in reports

  • "anomaly-it-ids": Get information about anomalies in reports

  • "origin": Give information about the origin of the report (commission or intervention)

  • "equipments": Get information about the equipments linked to the intervention

  • "equipments-details": Get id and name for equipments linked to the intervention

  • "created-by": Get information about the person that created the report

  • "actions-info": Give information about actions that can be done on reports

  • "presigned-url": Get presigned URLs for the documents

Available options:
establishment-cell,
rules,
rules-details,
technical-installations,
anomaly-stats,
anomaly-it-ids,
origin,
equipments,
equipments-details,
created-by,
actions-info,
presigned-url
whereComment
string

Filter by comment

Example:

"string"

whereStatus
integer[]

Filter by status

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
whereType
integer[]

Filter by type

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
whereCheckDate
string

Filter by check date

Example:

"2021-01-01T00:00:00.000Z"

whereName
string

Filter by name

Example:

"string"

whereCreatedById
integer[]

Filter by created by user id

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
whereCreatedByName
string

Filter by created by user name

Example:

"string"

whereInterventionId
integer

Filter by intervention id

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

1

whereCommissionId
integer

Filter by commission id

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

1

whereSiteIds
integer[]

Filter by site ids

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
whereSiteNames
string

Filter by site names

Example:

"string"

whereTechnicalInstallationIds
integer[]

Filter by technicalInstallationIds from related rules

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
whereTechnicalInstallationName
string

Filter by technicalInstallation name from related rules

Example:

"string"

whereRuleIds
integer[]

Filter by ruleIds

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
whereRuleName
string

Filter by rule name (text search)

Example:

"string"

whereEquipmentId
integer

Filter by equipment id

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

1

whereEquipmentIds
integer[]

Filter by equipment ids

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
whereEquipmentName
string

Filter by equipment name

Example:

"string"

whereCreatedAt
string

Filter by createdAt date

Example:

"2021-01-01T00:00:00.000Z"

whereArchivedAt
string

Filter by archivedAt date

Example:

"2021-01-01T00:00:00.000Z"

whereIsArchived
boolean

Filter by isArchived flag

Example:

true

whereCompanyId
integer[]

Filter by company id

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
whereCompanyName
string

Filter by company name

Example:

"string"

whereText
string

Filter by global text in report

Example:

"string"

whereOriginName
string

Filter by origin

Example:

"string"

whereIsFromCommission
boolean

Filter by origin

Example:

true

whereIsFromIntervention
boolean

Filter by origin

Example:

true

orderBy
object[]
includeCount
boolean
default:false

Include total count in response.

Example:

true

page
integer
default:1

Page number.

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

1

pageSize
integer
default:50

Page size.

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

50

findId
integer

Get the page where the item with this id is located.

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

1

subPageSize
integer
default:10

Sub page size for grouping items.

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

10

Response

200 - application/json

List of reports

data
object[]
required
totalCount
integer

Total count of items.

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

100

pagination
object

Pagination information.