API v2: Diagnostics

Diagnostics endpoints allow downloading service data files, retrieving the list of generated diagnostics, and deleting diagnostics definitions.


Data Structures

DiagnosticsModel
Attribute Type Required Description
id string   Unique and read-only diagnostic identifier
file string   System file name to tarball diagnostic. Read-only.
error string   Error information when generating failed. Read-only.
created_at datetime   Timestamp of fenerated diagnostic tarball .Read-only.
owner string   Node on which diagnostic where generated. Read-only.
size number   Size in bytes of diagnostic tarball. Read-only.

Request for Retrieving Available Attributes of the DiagnosticsModel

Method
GET
Path
/api/v2/objspec/diagnostics

Note

To check allowed methods, available URL parameters and possible responses please refer to the API Overview section.

The next chapter describes procedures for creating separate requests.


Downloading Service Data

Request

Method
POST
Path
/api/v2/diagnostics
Headers
Content-Type: Application/JSON
Body
DiagnosticsModel

Example Request

Sending POST https://10.0.0.0/api/v2/diagnostics

curl -s -k -X POST -H 'Authorization: vg1ei6rgo58fsbobr7octp0w3afd9vsm' https://10.0.214.98/api/v2/diagnostics -H 'Content-Type: application/json' -d'{"diagnostic_files":"all"}'

Response

"diagnostics": {
    "id": "9124292845052624898"
},
"result": "success"

Retrieving Generated Diagnostics List

Request

Method
GET
Path
/api/v2/diagnostics

Example Request

Sending GET https://10.0.0.0/api/v2/diagnostics

curl -s -k -X GET -H 'Authorization: vg1ei6rgo58fsbobr7octp0w3afd9vsm' https://10.0.214.98/api/v2/diagnostics

Response

"result": "success",
"diagnostics": [
    {
        "id": "9124292845052624897",
        "file": "service_data-87074336-2024-06-19T05_12_11.420631817.tgz",
        "created_at": "2024-06-18 22:12:13.339584-07",
        "owner": "87074336",
        "size": 2505831
    },
    {
        "id": "9124292845052624898",
        "file": "service_data-87074336-2024-06-19T05_16_58.870647504.tgz",
        "created_at": "2024-06-18 22:17:00.132129-07",
        "owner": "87074336",
        "size": 2506749
    }
]

Deleting Diagnostics Definition

Request

Method
DELETE
Path
/api/v2/diagnostics/<id>

Example Request

Sending DELETE https://10.0.0.0/api/v2/diagnostics/9124292845052624897

curl -s -k -X DELETE -H 'Authorization: vg1ei6rgo58fsbobr7octp0w3afd9vsm' https://10.0.214.98/api/v2/diagnostics/9124292845052624897

Response

{
    "result": "success"
}