Skip to main content
PATCH
/
anomalies
/
v3
/
ad
/
library
/
{libAnomalyId}
Update an anomaly
curl --request PATCH \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/anomalies/v3/ad/library/{libAnomalyId} \
  --header 'Authorization: Bearer <token>' \
  --header 'content-type: <content-type>' \
  --header 'x-session-token: <x-session-token>' \
  --data '
{
  "title": "Anomaly title",
  "risk": 1,
  "description": "Anomaly description",
  "resolutionDelay": "P7D",
  "subCategoryId": 1,
  "categoryId": 1
}
'
{
  "data": {
    "id": 1,
    "title": "Anomaly title",
    "description": "Anomaly description",
    "risk": 1,
    "comment": "Anomaly comment",
    "resolutionDelay": "P7D",
    "categoryId": 1,
    "subCategoryId": 1,
    "deletedAt": "2024-01-15T08:45:00.000Z",
    "updatedAt": "2024-12-05T14:56:23.000Z",
    "createdAt": "2024-01-15T08:45:00.000Z"
  }
}

Authorizations

Authorization
string
header
required

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

Headers

content-type
string
required

Content type, must be "application/json".

Allowed value: "application/json"
x-session-token
string
required

Session token used for authenticating the request.

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjM0NTY3ODkwIiwic2Vzc2lvbklkIjoiYWJjZGVmMTIzNDU2IiwiaWF0IjoxNjA1MDk3ODk5LCJleHAiOjE2MDUxODQyOTl9.4XRQ1iXDyvEj5LgPZHbmTmzOZs98M3YPOzgf3MhxjaI"

Path Parameters

libAnomalyId
integer
required

Unique identifier of the anomaly.

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

1

Body

application/json

Details required to update an anomaly

title
string

Anomaly title.

Maximum string length: 250
Example:

"Anomaly title"

risk
enum<number>

Anomaly risk.

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

1

description
string

Anomaly description.

Maximum string length: 2500
Example:

"Anomaly description"

resolutionDelay
string

Anomaly resolution delay in ISO 8601 format (only for audit anomaly).

Pattern: ^P(?:\d+Y)?(?:\d+M)?(?:\d+W)?(?:\d+D)?(?:T(?:\d+H)?(?:\d+M)?(?:\d+S)?)?$
Example:

"P7D"

subCategoryId
integer | null

Identifier of the anomaly sub-category.

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

1

categoryId
integer | null

Identifier of the anomaly category.

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

1

Response

201 - application/json

The anomalies have been updated

data
object
required