Получение происшествия по ID
Запрос
Тип | Метод |
---|---|
GET |
/occurrences/{id} |
Описание: При выполнении запроса будет возвращено происшествие с соответствующим ID.
Если не указан параметр relations
то подгружаются все связи обьекта. Если параметр указан но не имеет значений - связи не подгружаются. Если параметр указан и содержит значения (поля модели хранящие связанные сущности) то они будут заполнены в ответе.
Пример запроса
GET
http://127.0.0.1/cruddy/v2/occurrences/{id}
Path параметры запроса:
Параметр | Описание |
---|---|
{id} | Идентификатор происшествия |
Успешный ответ
Статус код: 200
– запрос успешно обработан.
Формат: JSON
.
Тело ответа: модель происшествия.
Пример ответа
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"created_at": "2023-12-20T00:00:01.652259Z",
"updated_at": "2023-12-20T00:00:01.652259Z",
"event_type": "manual_source",
"ip": "string",
"mac": "string",
"port": 0,
"start_occurrence": "2023-12-20T00:00:01.652259Z",
"end_occurrence": "2023-12-20T00:00:01.652259Z",
"service_asset_finding_status_change_id": "8d6bf02f-aab2-4fbc-ab53-ee5963306be7",
"service_asset_finding_id": "08a5c673-3c5c-48ab-bf6c-f2ee47d8df88",
"fqdn": "string",
"incident_identifier": "string",
"fincert_sync_status": 10,
"fincert_id": "",
"sopka_sync_status": 10,
"sopka_id": "",
"fincert_sync_result": "7325f612-d464-4395-bb86-c83b3b6893fb",
"sopka_sync_result": "d91aad7a-d9ad-4941-bf19-b94f42afada9",
"service_asset_finding": {
"description": "string",
"risk_impact": "string",
"solution": "string",
"mitigation": "string",
"status": "assigned_customer",
"risklevel": 0,
"service_asset_id": "09122f07-8b1e-48dc-96fd-379806f6c51e",
"finding_id": "feebf65a-2eaa-4fae-aab2-772450efdffe",
"analysis_output": "string",
"synopsis": "string",
"title": "string",
"risk": "none",
"acknowledged_at": "2023-12-20T00:00:01.652259Z",
"alert_type": "automatic",
"client_note": "string",
"internal_note": "string",
"external": false,
"immediate_action_score": 0,
"throughput_period": "grace",
"throughput_period_change": "2023-12-20T00:00:01.652259Z",
"customer_created": false,
"c_visible_since": "2023-12-20T00:00:01.652259Z",
"c_visible_since_in_days": 0,
"c_reopened_count": 0,
"c_last_customer_status_change": "2023-12-20T00:00:01.652259Z",
"logmule_identifier": "string",
"c_remote_exploitable": true,
"c_occurrence_count": 0,
"с_customer_retention_time": 0,
"last_occurrence_id": "92c2542a-a9bb-4370-b835-20b1c9ac1fe9",
"itsm_last_synced_at": "2023-12-20T00:00:01.652259Z",
"itsm_sync_status": "scheduled",
"external_id": "string",
"itsm_sync_error": "string",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
"updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
"group_id": "306db4e0-7449-4501-b76f-075576fe2d8f",
"acknowledged_by": "57e93f65-9db5-4b3c-8761-f3edd8ac8276",
"created_by_customer": "d299b51b-03f1-4b72-b793-1fb027d05389",
"edited_by": "9501acb5-3be0-4719-a60e-dfa79624666c",
"incident_group_id": "5ce55b8d-2342-4286-bf58-bfe807f8c05c",
"reopened_at": "2023-12-20T00:00:01.652259Z",
"display_id": 0
},
"service_asset_finding_status_change": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"created_at": "2023-12-20T00:00:01.652259Z",
"updated_at": "2023-12-20T00:00:01.652259Z",
"service_asset_finding_id": "08a5c673-3c5c-48ab-bf6c-f2ee47d8df88",
"status": "string",
"revisit_at": "string",
"itsm_sync_status": "not_synced",
"itsm_last_synced_at": "string",
"itsm_sync_error": "string",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
},
"vulnerabilities": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"created_at": "2023-12-20T00:00:01.652259Z",
"updated_at": "2023-12-20T00:00:01.652259Z",
"plugin_id": "8b176ba5-fa8e-458e-94ad-85d1ae8f3be0",
"plugin_name": "string",
"description": "string",
"severity": 0,
"additional_data": {},
"protocol": "string",
"port": 0,
"occurrence_id": "8508ee33-23a1-4a06-ae02-1eb167405e7b",
"synopsis": "string",
"vulnerability_host_id": "f7091c30-f117-455e-9531-6af6bb5ece68",
"exploitable": true,
"plugin_output": "string",
"solution": "string",
"compare_port": -1,
"compare_protocol": "",
"service_asset_id": "09122f07-8b1e-48dc-96fd-379806f6c51e",
"vulnerability_scan_id": "b72752e1-e814-4606-9275-f2ac9ca468b7",
"external": false,
"remote_exploitable": false,
"cvss_vector": "string",
"cvss_temporal_vector": "string",
"cvss_base_score": 0,
"cvss_temporal_score": 0,
"risk_factor": "string",
"plugin_modification_date": "string",
"publication_date": "string"
}
],
"logmule_go_result": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"created_at": "2023-12-20T00:00:01.652259Z",
"updated_at": "2023-12-20T00:00:01.652259Z",
"rule_id": "uuid",
"analysis_output": "string",
"event": {},
"compressed_event": "string",
"risklevel": 5.35,
"occurred_at": "2023-12-20T00:00:01.652259Z",
"occurrence_id": "uuid",
"error": "string",
"service_asset_id": "uuid",
"asset_info": {
"ip": "string",
"hostname": "string",
"fqdn": "string",
"mac": "string"
},
"incident_identifier": "string",
"metadata": "{\"key\": \"value\"}",
"logmule_go_rule": null,
"occurrence": null,
"service_asset": null,
"service_asset_groups": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"created_at": "2023-12-20T00:00:01.652259Z",
"updated_at": "2023-12-20T00:00:01.652259Z",
"name": "string",
"network_ranges": [],
"domain": "string",
"itsm_synced": false,
"regex": "string",
"subject_id": "string",
"object_id": "string",
"is_kii": false,
"is_fincert": false,
"responsible_person": "string",
"technical_specialist": "string",
"system_id": "string",
"responsible_group_id": "2d40d7ca-3218-4132-89ef-42e29379a567",
"edited_by": "9501acb5-3be0-4719-a60e-dfa79624666c"
}
],
"_relations": {}
},
"_relations": {
"logmule_go_results": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"vulnerabilities": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}
}
Другие возможные ответы
Код | Ответ | Описание |
---|---|---|
400 |
id is empty |
Не передан параметр “id” |
404 |
not found |
Объект не найден |
500 |
Internal Server Error |
Другие ошибки при получении объекта |
Примечание: Текст ошибки не фиксированный, может изменяться в зависимости от фактического ответа получателя запроса.
Пример ответа
Код 400
{ "error": "Bad Request", "error_code": 400 }
Код 404
{ "error": "Not Found", "error_code": 404 }
Код 500
{ "error": "Internal Server Error", "error_code": 500 }