Skip to main content
POST
/
anomalies
/
v2
/
rs
/
reports
/
{reportId}
/
nonconformity
Create nonconformity anomalies for a report
curl --request POST \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/anomalies/v2/rs/reports/{reportId}/nonconformity \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --header 'X-Session-Token: <x-session-token>' \
  --data '
[
  {
    "title": "Anomaly title",
    "description": "Anomaly description",
    "risk": 1,
    "technicalInstallationId": 1,
    "siteId": 1,
    "dueAt": "2024-12-01T12:34:56.000Z",
    "location": {
      "room": "Room 1",
      "floor": "Floor 1"
    }
  }
]
'
{
  "nbInsertion": 1
}

Authorizations

Authorization
string
header
required

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

Headers

Content-Type
enum<string>
required

Content type, must be "application/json".

Available options:
application/json
X-Session-Token
string
required

Session token used for authenticating the request.

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjM0NTY3ODkwIiwic2Vzc2lvbklkIjoiYWJjZGVmMTIzNDU2IiwiaWF0IjoxNjA1MDk3ODk5LCJleHAiOjE2MDUxODQyOTl9.4XRQ1iXDyvEj5LgPZHbmTmzOZs98M3YPOzgf3MhxjaI"

Path Parameters

reportId
integer
required

Unique identifier of the report.

Example:

1

Body

application/json

Details required to create anomalies

title
string
required

Anomaly title.

Maximum string length: 250
Example:

"Anomaly title"

description
string
required

Anomaly description.

Maximum string length: 2500
Example:

"Anomaly description"

risk
enum<number>
required

Anomaly risk.

Available options:
0,
1,
2,
3
Example:

1

technicalInstallationId
integer
required

Identifier of the associated technical installation.

Example:

1

siteId
integer
required

Identifier of the associated site.

Example:

1

dueAt

Anomaly dueAt.

Example:

"2024-12-01T12:34:56.000Z"

location
object

Response

201 - application/json

The anomalies have been created

nbInsertion
integer
required

The number of inserted elements.

Example:

1