Skip to main content
GET
/
anomalies
/
v2
/
rs
List anomalies for the given site Ids
curl --request GET \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/anomalies/v2/rs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --header 'X-Session-Token: <x-session-token>'
{
  "data": [
    {
      "id": 1,
      "ref": "E42-RI12-3",
      "status": 1,
      "title": "Anomaly title",
      "description": "Anomaly description",
      "type": 1,
      "risk": 1,
      "dueAt": "2024-12-01T12:34:56.000Z",
      "observedAt": "2024-12-01T12:34:56.000Z",
      "deletedAt": "2024-01-15T08:45:00.000Z",
      "updatedAt": "2024-12-05T14:56:23.000Z",
      "createdAt": "2024-01-15T08:45:00.000Z",
      "onSiteObs": true,
      "origin": {
        "reportedBy": {
          "id": 1,
          "firstName": "John",
          "lastName": "Doe"
        },
        "commission": {
          "id": 1,
          "visitType": 1,
          "commissionType": 1,
          "decision": 1,
          "date": "2024-12-01T12:34:56.000Z",
          "report": {
            "id": 1,
            "status": 1,
            "checkDate": "2024-12-01T12:34:56.000Z",
            "name": "Document Name",
            "presignedUrl": "<string>"
          }
        },
        "intervention": {
          "id": 1,
          "startDate": "2024-12-01T12:34:56.000Z",
          "endDate": "2024-12-01T12:34:56.000Z",
          "provider": {
            "providerName": "Provider name",
            "providerEmail": "[email protected]"
          },
          "companyContact": {
            "id": 1,
            "name": "Company Contact Name",
            "email": "[email protected]"
          },
          "checkType": 1,
          "company": {
            "id": 1,
            "name": "Company Name",
            "type": 1
          },
          "report": {
            "id": 1,
            "status": 1,
            "checkDate": "2024-12-01T12:34:56.000Z",
            "name": "Document Name",
            "presignedUrl": "<string>"
          }
        },
        "report": {
          "id": 1,
          "status": 1,
          "checkDate": "2024-12-01T12:34:56.000Z",
          "name": "Document Name",
          "presignedUrl": "<string>"
        }
      },
      "site": {
        "id": 1,
        "name": "Main site",
        "isEstablishment": true,
        "serialNumber": "123456",
        "mainEstablishment": {
          "id": 1,
          "name": "Main site"
        }
      },
      "closestIntervention": {
        "id": 1,
        "isDone": true,
        "startDate": "2024-12-01T12:34:56.000Z",
        "endDate": "2024-12-01T12:34:56.000Z",
        "providerAction": 1,
        "providerComment": "Comment on the interventionAnomaly",
        "status": 2,
        "companyContact": {
          "id": 1,
          "name": "Company Contact Name",
          "email": "[email protected]"
        },
        "providerEmail": "[email protected]",
        "providerName": "Provider name",
        "companyName": "Company Name"
      },
      "technicalInstallation": {
        "id": 1,
        "name": "establishment_informations.installation_ascenseurs",
        "isInSafetyRegister": false,
        "isDefault": false,
        "deletedAt": "2024-03-12T16:30:00.000Z"
      },
      "equipment": {
        "id": 1,
        "name": "Equipment Name",
        "archivedAt": "2024-12-01T12:34:56.000Z"
      },
      "actions": {
        "canBeUpdated": true,
        "canBeDeleted": true,
        "canBeRestored": true,
        "canBeResolved": true,
        "canBeUnresolved": true,
        "canBePositioned": true
      },
      "resolvedBy": {
        "id": 1,
        "firstName": "John",
        "lastName": "Doe",
        "roles": [
          1,
          2
        ],
        "permissionGroup": 123
      },
      "metadata": {
        "location": {
          "floor": "<string>",
          "room": "<string>"
        },
        "reporter": {
          "firstName": "<string>",
          "lastName": "<string>"
        },
        "resolvedComment": "<string>"
      },
      "position": {
        "id": 1,
        "xPercent": 1,
        "yPercent": 1
      },
      "plan": {
        "id": 1,
        "name": "Main Plan"
      },
      "building": {
        "id": 1,
        "name": "Main Building"
      },
      "isPositioned": true,
      "containedIn": [
        {
          "id": 1,
          "name": "Plan Item 1"
        }
      ]
    }
  ],
  "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"

Content-Type
enum<string>
required

Content type, must be "application/json".

Available options:
application/json
x-sites
string

List of site IDs.

Example:

"['1', '2']"

Query Parameters

extend
enum<string>[]

Extend options:

  • "origin": Provides anomaly origin information based on type: observation→reportedBy, prescription→commission, nonconformity→intervention

  • "site": Get information about the site, avec establishmentName inline

  • "closest-intervention": Get information about the last intervention

  • "technical-installation": Get information about the technicalInstallation

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

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

  • "resolved-by": Get information about the person that resolved the anomaly

  • "metadata": Get the entire metadata from anomaly

  • "position": Get information about the position related to the anomaly

Available options:
origin,
site,
closest-intervention,
technical-installation,
equipment,
actions-info,
resolved-by,
metadata,
position
whereStatus
integer[]

Filter by status

Example:
[1, 2, 3]
whereTitle
string

Filter by title

Example:

"string"

whereText
string

Filter by text

Example:

"string"

whereType
integer[]

Filter by type

Example:
[1, 2, 3]
whereRisk
integer[]

Filter by risk

Example:
[1, 2, 3]
whereReporter
string

Filter by reporter firstName or lastName in metadata

Example:

"string"

whereLocation
string

Filter by location in metadata

Example:

"string"

whereTechnicalInstallationId
integer[]

Filter by technical installation id

Example:
[1, 2, 3]
whereReport
integer[]

Filter by report id

Example:
[1, 2, 3]
whereInterventionId
integer

Filter by intervention id

Example:

1

whereDeleted
boolean

Filter by deletedAt flag

Example:

true

whereObservedAt
object

Filter by observedAt

Example:
{
"start": "2021-01-01T00:00:00.000Z",
"end": "2021-12-31T23:59:59.999Z"
}
whereCreatedAt
object

Filter by createdAt

Example:
{
"start": "2021-01-01T00:00:00.000Z",
"end": "2021-12-31T23:59:59.999Z"
}
whereLastIntervention
string

Filter anomalies by the date of their last intervention

Example:

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

whereReportId
integer

Filter anomalies by report id

Example:

1

whereEquipmentId
integer

Filter anomalies by equipment id

Example:

1

whereCanBePositioned
boolean

Filter anomalies that can be positioned (have a location in metadata)

Example:

true

whereSiteIds
integer[]

Filter anomalies by site ids

Example:
[1, 2, 3]
whereCanBePositionedInPlan
integer

Filter anomalies that can be positioned in a plan

Example:

1

orderBy
object[]
includeCount
boolean
default:false

Include total count in response.

Example:

true

page
integer
default:1

Page number.

Example:

1

pageSize
integer
default:50

Page size.

Example:

50

findId
integer

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

Example:

1

subPageSize
integer
default:10

Sub page size for grouping items.

Example:

10

Response

List of anomalies (JSON or CSV)

data
object[]
required
totalCount
integer

Total count of items.

Example:

100

pagination
object

Pagination information.