Get one anomaly
curl --request GET \
--url http://localhost:3000/rs/anomalies/v1/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:3000/rs/anomalies/v1/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:3000/rs/anomalies/v1/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/rs/anomalies/v1/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/rs/anomalies/v1/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3000/rs/anomalies/v1/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/rs/anomalies/v1/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"type": "non_conformity",
"status": "extracted",
"risk": "low",
"title": "<string>",
"description": "<string>",
"externalReference": "<string>",
"unitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"technicalInstallationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"equipmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"libraryAnomalyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reportId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"caseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sortOrder": 123,
"pageNumber": 4503599627370495,
"assignedToUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resolvedComment": "<string>",
"location": "<string>",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"observedAt": "2023-11-07T05:31:56Z",
"dueAt": "2023-11-07T05:31:56Z",
"resolvedAt": "2023-11-07T05:31:56Z",
"historizedAt": "2023-11-07T05:31:56Z",
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isNew": true,
"actions": {
"canBeUpdated": true,
"canBeArchived": true,
"canBeUnarchived": true,
"canBeDeleted": true,
"canBeResolved": true,
"canBeUnresolved": true,
"canAddSighting": true
},
"updatableFields": {
"title": true,
"description": true,
"externalReference": true,
"risk": true,
"observedAt": true,
"unitId": true,
"technicalInstallationId": true,
"equipmentId": true,
"assignedToUserId": true,
"dueAt": true,
"pageNumber": true,
"sortOrder": true,
"location": true,
"caseId": true
},
"sightings": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reporter": "<string>",
"reportedByUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reportedBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"comment": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"sightingsCount": 4503599627370495,
"position": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"planId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"xPercent": 123,
"yPercent": 123
},
"unit": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"name": "<string>"
},
"technicalInstallation": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"name": "<string>",
"image": {
"name": "<string>",
"mimeType": "<string>",
"size": 536870912,
"downloadUrl": "<string>"
}
},
"equipment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"name": "<string>"
},
"report": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"status": "<string>"
},
"origin": {
"reportedBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"commission": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"visitType": "<string>",
"decision": "<string>",
"heldAt": "2023-11-07T05:31:56Z",
"sites": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
]
},
"intervention": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assigneeName": "<string>",
"providerName": "<string>",
"signedBy": "<string>"
},
"report": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"pageNumber": 123
}
},
"interventions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"comment": "<string>",
"providerAction": "<string>",
"clientDecision": "<string>",
"clientDecisionComment": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"attachments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"mimeType": "<string>",
"size": 536870912,
"slot": "<string>"
}
],
"intervention": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"type": "<string>",
"status": "<string>",
"scheduledStart": "2023-11-07T05:31:56Z"
}
}
],
"resolution": {
"resolvedBy": {
"name": "<string>"
},
"resolvedByProvider": {
"name": "<string>"
}
},
"libraryAnomaly": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"resolutionDelay": "<string>",
"category": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"subCategory": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
},
"assignee": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
}{
"error": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": "<unknown>"
}anomalies
Get one anomaly
GET
/
rs
/
anomalies
/
v1
/
{id}
Get one anomaly
curl --request GET \
--url http://localhost:3000/rs/anomalies/v1/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:3000/rs/anomalies/v1/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:3000/rs/anomalies/v1/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/rs/anomalies/v1/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/rs/anomalies/v1/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3000/rs/anomalies/v1/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/rs/anomalies/v1/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"type": "non_conformity",
"status": "extracted",
"risk": "low",
"title": "<string>",
"description": "<string>",
"externalReference": "<string>",
"unitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"technicalInstallationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"equipmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"libraryAnomalyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reportId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"caseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sortOrder": 123,
"pageNumber": 4503599627370495,
"assignedToUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resolvedComment": "<string>",
"location": "<string>",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"observedAt": "2023-11-07T05:31:56Z",
"dueAt": "2023-11-07T05:31:56Z",
"resolvedAt": "2023-11-07T05:31:56Z",
"historizedAt": "2023-11-07T05:31:56Z",
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isNew": true,
"actions": {
"canBeUpdated": true,
"canBeArchived": true,
"canBeUnarchived": true,
"canBeDeleted": true,
"canBeResolved": true,
"canBeUnresolved": true,
"canAddSighting": true
},
"updatableFields": {
"title": true,
"description": true,
"externalReference": true,
"risk": true,
"observedAt": true,
"unitId": true,
"technicalInstallationId": true,
"equipmentId": true,
"assignedToUserId": true,
"dueAt": true,
"pageNumber": true,
"sortOrder": true,
"location": true,
"caseId": true
},
"sightings": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reporter": "<string>",
"reportedByUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reportedBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"comment": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"sightingsCount": 4503599627370495,
"position": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"planId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"xPercent": 123,
"yPercent": 123
},
"unit": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"name": "<string>"
},
"technicalInstallation": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"name": "<string>",
"image": {
"name": "<string>",
"mimeType": "<string>",
"size": 536870912,
"downloadUrl": "<string>"
}
},
"equipment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"name": "<string>"
},
"report": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"status": "<string>"
},
"origin": {
"reportedBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"commission": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"visitType": "<string>",
"decision": "<string>",
"heldAt": "2023-11-07T05:31:56Z",
"sites": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
]
},
"intervention": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assigneeName": "<string>",
"providerName": "<string>",
"signedBy": "<string>"
},
"report": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"pageNumber": 123
}
},
"interventions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"comment": "<string>",
"providerAction": "<string>",
"clientDecision": "<string>",
"clientDecisionComment": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"attachments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"mimeType": "<string>",
"size": 536870912,
"slot": "<string>"
}
],
"intervention": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"type": "<string>",
"status": "<string>",
"scheduledStart": "2023-11-07T05:31:56Z"
}
}
],
"resolution": {
"resolvedBy": {
"name": "<string>"
},
"resolvedByProvider": {
"name": "<string>"
}
},
"libraryAnomaly": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"resolutionDelay": "<string>",
"category": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"subCategory": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
},
"assignee": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
}{
"error": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": "<unknown>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Query Parameters
Extend options (JSON-encoded array, e.g. ?extend=["category"]):
- "is-new": Adds
isNew: true when this anomaly is the earliest occurrence of its case, by report control date. False when a case already has an older occurrence - and false too when the anomaly carries no case at all (a ticket, an observation). - "actions-info": Adds
actions{ canBeUpdated, canBeArchived, canBeUnarchived, canBeDeleted, canBeResolved, canBeUnresolved }. - "updatable-fields": Adds
updatableFields- per-type editable-field flags. - "sightings": Adds the observation
sightings(signalements), newest first. - "sightings-count": Adds
sightingsCount- how many times this anomaly has been reported (grouped ticketing). - "position": Plan position (PlanItem) when the anomaly is placed on a plan.
- "unit": Hydrates the linked unit (id, ref, name).
- "technical-installation": Hydrates the linked technical installation (id, ref, name, image with a presigned download URL).
- "equipment": Hydrates the linked equipment (id, ref, name).
- "report": Hydrates the linked report (id, ref, status) - non-conformity / prescription.
- "origin": Adds
origin: the reporter (observation, ticket), linked commission (prescription), linked intervention's assignee (non-conformity), and the source report reference (page/ref) when set. - "interventions": Adds
interventions: the anomaly's linked curative interventions (comment/providerAction/clientDecision/attachments). - "resolution": Adds
resolution{ resolvedBy, resolvedByProvider } once the anomaly is resolved (resolver = the assignee at resolution time). - "library-anomaly": Hydrates the source library template (id, title, resolutionDelay, category, subCategory).
- "assignee": Adds
assignee{ id, name } - the user the anomaly is assigned to.
Available options:
is-new, actions-info, updatable-fields, sightings, sightings-count, position, unit, technical-installation, equipment, report, origin, interventions, resolution, library-anomaly, assignee Response
Default Response
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Maximum string length:
40Pattern:
^[A-Z]+-[1-9]\d*(?:-[A-Z]+-[1-9]\d*)*$Available options:
non_conformity, observation, prescription, audit, ticket Available options:
extracted, unreviewed, pending, resolved Available options:
low, medium, high, critic Required string length:
1 - 300Maximum string length:
5000Required string length:
1 - 100Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Required range:
0 < x <= 9007199254740991Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Maximum string length:
2000Maximum string length:
200Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Required range:
0 <= x <= 9007199254740991Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes