Get one report
curl --request GET \
--url http://localhost:3000/rs/reports/v1/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:3000/rs/reports/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/reports/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/reports/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/reports/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/reports/v1/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/rs/reports/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": "pv",
"status": "unreviewed",
"comment": "<string>",
"checkedAt": "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",
"doc": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"name": "<string>"
},
"createdByUser": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"anomaliesStats": {
"total": 4503599627370495,
"extracted": 4503599627370495,
"unreviewed": 4503599627370495,
"pending": 4503599627370495,
"resolved": 4503599627370495
},
"anomalies": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"type": "non_conformity",
"status": "extracted",
"risk": "low",
"title": "<string>"
}
],
"attachments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"mimeType": "<string>",
"size": 536870912,
"slot": "<string>"
}
],
"commission": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"visitType": "<string>",
"status": "<string>",
"heldAt": "2023-11-07T05:31:56Z",
"signedBy": "<string>"
},
"intervention": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"type": "<string>",
"status": "<string>",
"scheduledStart": "2023-11-07T05:31:56Z",
"scheduledEnd": "2023-11-07T05:31:56Z",
"signedBy": "<string>",
"assignedUser": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"assignedContact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provider": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"types": [
"<string>"
]
}
}
},
"rule": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"rules": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"rulesCount": 4503599627370495,
"coverages": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"compliance": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "site",
"unitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"equipmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rule": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"technicalInstallations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"imageUrl": "<string>"
}
]
}
}
}
],
"units": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"equipments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"technicalInstallations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"imageUrl": "<string>"
}
],
"actions": {
"canBeUpdated": true,
"canBeArchived": true,
"canBeUnarchived": true,
"canBeDeleted": true,
"canBeRestored": true,
"canSetCoverages": true
},
"updatableFields": {
"comment": true,
"status": true
},
"downloadUrl": "<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>"
}reports
Get one report
GET
/
rs
/
reports
/
v1
/
{id}
Get one report
curl --request GET \
--url http://localhost:3000/rs/reports/v1/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:3000/rs/reports/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/reports/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/reports/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/reports/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/reports/v1/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/rs/reports/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": "pv",
"status": "unreviewed",
"comment": "<string>",
"checkedAt": "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",
"doc": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"name": "<string>"
},
"createdByUser": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"anomaliesStats": {
"total": 4503599627370495,
"extracted": 4503599627370495,
"unreviewed": 4503599627370495,
"pending": 4503599627370495,
"resolved": 4503599627370495
},
"anomalies": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"type": "non_conformity",
"status": "extracted",
"risk": "low",
"title": "<string>"
}
],
"attachments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"mimeType": "<string>",
"size": 536870912,
"slot": "<string>"
}
],
"commission": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"visitType": "<string>",
"status": "<string>",
"heldAt": "2023-11-07T05:31:56Z",
"signedBy": "<string>"
},
"intervention": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref": "<string>",
"type": "<string>",
"status": "<string>",
"scheduledStart": "2023-11-07T05:31:56Z",
"scheduledEnd": "2023-11-07T05:31:56Z",
"signedBy": "<string>",
"assignedUser": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"assignedContact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provider": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"types": [
"<string>"
]
}
}
},
"rule": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"rules": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"rulesCount": 4503599627370495,
"coverages": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"compliance": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "site",
"unitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"equipmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rule": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"technicalInstallations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"imageUrl": "<string>"
}
]
}
}
}
],
"units": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"equipments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"technicalInstallations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"imageUrl": "<string>"
}
],
"actions": {
"canBeUpdated": true,
"canBeArchived": true,
"canBeUnarchived": true,
"canBeDeleted": true,
"canBeRestored": true,
"canSetCoverages": true
},
"updatableFields": {
"comment": true,
"status": true
},
"downloadUrl": "<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"]):
- "created-by": Adds the report author (
createdByUserwith display name). - "anomalies-stats": Adds
anomaliesStats(counts of non-deleted anomalies by status). - "anomalies": Adds the report anomalies (non-deleted list).
- "attachments": Adds the report attachments (non-deleted).
- "origin": Adds the report source:
commission(PV) and/orintervention(RVRE, via coverage), with the intervention assignment. - "rules": Adds the covered rules, deduplicated (
rulewhen exactly one,ruleslist,rulesCount). - "scopes": Adds the covered compliances via coverages (compliance type + rule with its technical installations + target ids).
- "units": Adds the deduped units covered by the report (via compliances).
- "equipments": Adds the deduped equipments covered by the report (via compliances).
- "technical-installations": Adds the deduped technical installations covered by the report (via compliances), with presigned images.
- "actions-info": Adds
actions{ canBeUpdated, canBeArchived, canBeUnarchived, canBeDeleted }. - "updatable-fields": Adds
updatableFields{ comment, status } - per-field editability for the UI. - "download-url": Adds a presigned
downloadUrlfor the report's document.
Available options:
created-by, anomalies-stats, anomalies, attachments, origin, rules, scopes, units, equipments, technical-installations, actions-info, updatable-fields, download-url 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:
pv, rvre, rvrat, cr Available options:
unreviewed, pending, processing, pending_verification, in_treatment, resolved, compliant, with_reservations Maximum string length:
2000Show 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
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