Skip to main content
GET
/
anomalies
/
v3
/
rs
List anomalies for the given site Ids (RS)
curl --request GET \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/anomalies/v3/rs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --header 'X-Session-Token: <x-session-token>'
{
  "data": [
    {
      "id": 1,
      "type": 1,
      "status": 1,
      "title": "Anomaly title",
      "description": "Anomaly description",
      "risk": 1,
      "anomalyNumber": "A-12345",
      "pageNumber": 12,
      "alreadyReported": false,
      "siteId": 1,
      "dueAt": "2024-12-01T12:34:56.000Z",
      "observedAt": "2024-12-01T12:34:56.000Z",
      "deletedAt": "2024-01-15T08:45:00.000Z",
      "archivedAt": "2024-01-15T08:45:00.000Z",
      "updatedAt": "2024-12-05T14:56:23.000Z",
      "createdAt": "2024-01-15T08:45:00.000Z",
      "onSiteObs": true,
      "technicalInstallation": {
        "id": 1,
        "name": "establishment_informations.installation_ascenseurs",
        "image": {
          "id": 1,
          "presignedUrl": "https://example.com/presigned-url"
        },
        "tradKey": "establishment_informations.installation_ascenseurs",
        "isDefault": false
      },
      "establishmentCell": {
        "establishment": {
          "id": 1,
          "name": "Main site",
          "count": 123
        },
        "cell": {
          "id": 1,
          "name": "Main site",
          "count": 123
        }
      },
      "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"
        }
      ],
      "reportedBy": {
        "id": 1,
        "name": "John Doe"
      },
      "commission": {
        "id": 1,
        "visitType": 1,
        "signedBy": "Signatory"
      },
      "intervention": {
        "id": 1,
        "providerName": "Provider name",
        "assignedTo": {
          "type": 1,
          "id": 1,
          "name": "John Doe",
          "email": "[email protected]"
        }
      },
      "report": {
        "id": 1,
        "name": "Document Name",
        "presignedUrl": "https://example.com/presigned-url"
      },
      "resolution": {
        "isDone": true,
        "interventionId": 1,
        "resolvedAt": "2024-12-01T12:34:56.000Z",
        "resolvedByProfile": {
          "id": 1,
          "name": "John Doe",
          "group": 2
        },
        "resolvedByCompany": {
          "companyId": 1,
          "companyName": "Company Name",
          "providerName": "Provider name"
        }
      },
      "equipment": {
        "id": 1,
        "name": "Equipment Name",
        "archivedAt": "2024-12-01T12:34:56.000Z"
      },
      "updatableFields": {
        "title": true,
        "description": true,
        "risk": true,
        "technicalInstallationId": true,
        "siteId": true,
        "equipmentId": true,
        "dueAt": true,
        "resolvedById": true,
        "resolvedComment": true,
        "anomalyNumber": true,
        "pageNumber": true,
        "index": true,
        "planId": true,
        "areaId": true
      },
      "actions": {
        "canBeUpdated": true,
        "canBeDeleted": true,
        "canBeRestored": true,
        "canBeResolved": true,
        "canBeUnresolved": true,
        "canBePositioned": true
      }
    }
  ],
  "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:

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

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

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

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

  • "report": Provides anomaly report information

  • "resolution": Get information about the last intervention

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

  • "updatable-fields": Get information about the field that can be updated

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

Available options:
technical-installation,
establishment-cell,
position,
origin,
report,
resolution,
equipment,
updatable-fields,
actions-info
whereType
integer[]

Filter by type

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

Filter by status

Example:
[1, 2, 3]
whereTitle
string

Filter by title

Example:

"string"

whereDescription
string

Filter by description

Example:

"string"

whereRisk
integer[]

Filter by risk

Example:
[1, 2, 3]
whereSiteId
integer

Filter anomalies by site id

Example:

1

whereSiteIds
integer[]

Filter anomalies by site ids

Example:
[1, 2, 3]
whereSiteName
string

Filter by site name

Example:

"string"

whereTechnicalInstallationId
integer

Filter by technical installation id

Example:

1

whereTechnicalInstallationIds
integer[]

Filter by technical installation ids

Example:
[1, 2, 3]
whereTechnicalInstallationName
string

Filter by technical installation name

Example:

"string"

whereEquipmentId
integer

Filter by equipment id

Example:

1

whereEquipmentIds
integer[]

Filter by equipment ids

Example:
[1, 2, 3]
whereEquipmentName
string

Filter by equipment name

Example:

"string"

whereReportedById
integer

Filter by reporter id

Example:

1

whereReportedByIds
integer[]

Filter by reporter ids

Example:
[1, 2, 3]
whereReportedByName
string

Filter by reporter name in metadata

Example:

"string"

whereReporter
string

Filter by reporter firstName or lastName in metadata

Example:

"string"

whereInterventionId
integer

Filter by intervention id

Example:

1

whereCanBePositioned
boolean

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

Example:

true

whereCanBePositionedInPlan
integer

Filter anomalies that can be positioned in a plan

Example:

1

whereResolvedComment
string

Filter by resolved comment

Example:

"string"

whereResolvedById
integer

Filter by resolved by id

Example:

1

whereResolvedByIds
integer[]

Filter by resolved by ids

Example:
[1, 2, 3]
whereResolvedByName
string

Filter by resolved by name in metadata

Example:

"string"

whereAnomalyIds
integer[]

Filter by anomaly ids

Example:
[1, 2, 3]
whereAnomalyNumber
string

Filter by anomaly number

Example:

"string"

wherePageNumber
integer

Filter by page number

Example:

1

whereReportId
integer

Filter by report id

Example:

1

whereReportName
string

Filter by report name

Example:

"string"

whereDueAt
object

Filter by dueAt

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

Filter by observedAt

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

Filter by resolvedAt

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

Filter by deletedAt flag

Example:

true

whereCreatedAt
object

Filter by createdAt

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

Filter anomalies by the date of their last intervention

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

Filter by text

Example:

"string"

whereLocation
string

Filter by location in metadata

Example:

"string"

whereReport
integer[]

Filter by report id

Example:
[1, 2, 3]
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.