
|
Operation |
Method |
URL Path |
Payload |
|---|---|---|---|
|
List all Packet Capture Jobs |
GET |
/api/v2/agapi/v1/packet-capture/job/?get_all=0&limit=1&offset=0
|
List Packet Capture Jobs |
| Download Job PCAP zip file with Job ID | GET | /api/v2/agapi/v1/packet-capture/job/{{JOB_ID}}/merged-pcap/ | |
| Download Job PCAP zip file with Incident ID | GET | /api/v2/agapi/v1/packet-capture/incident/{{INCIDENT_ID}}/merged-pcap/ | |
| Download Job PCAP zip file with Job ID and Task ID | GET | /api/v2/agapi/v1/packet-capture/job/{{JOB_ID}}/task/{{TASK_ID}}/merged-pcap/ | |
| Create Packet Capture Job | POST | /api/v2/agapi/v1/packet-capture/job/ | Create Packet Capture Job |
| Start Capture | POST | /api/v2/agapi/v1/packet-capture/job/{{JOB_ID}}/operation/start/ | |
| Stop Capture | POST | /api/v2/agapi/v1/packet-capture/job/{{JOB_ID}}/operation/stop/ | |
| Delete Packet Capture Job | DELETE | /api/v2/agapi/v1/packet-capture/job/{{JOB_ID}}/ | |
| Bulk Delete Packet Capture Job | POST | /api/v2/agapi/v1/packet-capture/job-bulk/?action=delete | Bulk Delete Packet Capture Job |
Get a list of all packet capture jobs.
|
Method |
URL |
|
GET, OPTIONS |
/api/v2/agapi/v1/packet-capture/job/?get_all=0&limit=1&offset=0 |
|
Field |
Value |
Description |
|---|---|---|
|
get_all |
boolean |
0 for pagination with applying `limit` and `offset`, 1 for get all entries. |
|
limit |
integer | Pagination purpose |
|
offset |
integer | Pagination purpose |
|
capture_name |
string | Search for specific capture name |
|
description |
string | Search for specific description |
|
Id |
string | Search for specific pcap job id |
{
"count": 1,
"data": [
{
"binding": {
"zone": {
"capture_all": true,
"device_list": [
"d67c08ec-90df-47e2-af93-10afd944ce59"
],
"zone_id": "984fda0e-f194-4066-9a96-8bcffd785776",
"zone_name": "test_zone_052",
"zone_service_list": []
}
},
"binding_id": "9991480d-d1f7-45e5-a4bc-029a37a376f8",
"capture_config": {
"bpf_filter": null,
"capture_limit": {
"max_file_size": 10,
"max_packet_count": 0,
"timeout": 180
},
"created_time": 1696921355,
"id": "b24cff33-6fca-4f38-af7a-5e1d808d6d90",
"length_per_packet": 128,
"name": "2258e10a-36f6-47cd-ad37-caa4951e9df1",
"packet_direction": "all",
"updated_time": null
},
"capture_config_id": "b24cff33-6fca-4f38-af7a-5e1d808d6d90",
"capture_name": "martin_test_555",
"created_time": 1696921355,
"description": "",
"historical_device_list": [
{
"boot_version": "5.0.3-TPS, build 46",
"created_time": 1696921355,
"device_add_time": "Sun, 01 Jan 2023 00:00:00 GMT",
"device_id": "d67c08ec-90df-47e2-af93-10afd944ce59",
"dns_name": "dummy-01",
"id": "2e76c0a2-842a-419f-9a41-37048abf9787",
"job_id": "2258e10a-36f6-47cd-ad37-caa4951e9df1",
"mgmt_ip_address": "10.64.42.46",
"updated_time": null
}
],
"id": "2258e10a-36f6-47cd-ad37-caa4951e9df1",
"incident_id": "",
"status": -1,
"task_list": [
{
"capture_status": -1,
"created_time": 1696921355,
"current_file_size": 0,
"current_pkt_count": 0,
"device": {
"host": "10.64.1.64",
"id": "d67c08ec-90df-47e2-af93-10afd944ce59",
"managed_by_aGalaxy": true,
"name": "dummy-01",
"version": "5.0.3-TPS, build 46"
},
"device_capture_config_name": "2258e10a-36f6-47cd-ad37-caa4951e9df1",
"device_id": "d67c08ec-90df-47e2-af93-10afd944ce59",
"id": "1147d433-3238-4e8b-9b2b-364f14c210ae",
"job_id": "2258e10a-36f6-47cd-ad37-caa4951e9df1",
"last_captured_time": "Tue, 10 Oct 2023 07:02:36 GMT",
"merged_pcap_file": null,
"parse_status": 0,
"transfer_status": 0,
"updated_time": 1696921363
}
],
"updated_time": 1699954784
}]
}
|
Method |
URL |
|
POST, OPTIONS |
/api/v2/agapi/v1/packet-capture/job/ |
|
Field |
Value |
Description |
|---|---|---|
|
capture_name |
string (required) |
The capture name is required field. |
|
description |
string (optional) | |
|
binding |
Zone object | Entry example of binding.zone.zone_service_list: `53+dns-tcp` or `25+tcp` |
|
capture_config.packet_direction |
string |
Can be one of `all`, `forward` or `drop` |
|
capture_config.bpf_filter |
string (optional) | Maximum string length is 1024 |
{
"capture_name": <job name>,
"description": <description>,
"binding": {
"zone": {
"zone_id": <binding_zone_id>,
"zone_name": <binding_zone_name>,
"capture_all": <true|false>,
"zone_service_list": [<service_list>],
"device_list": [<device_list>]
}
},
"capture_config": {
"packet_direction": "<all|forward|drop>",
"capture_limit": {
"max_file_size": <1-10>,
"max_packet_count": <0-65535>,
"timeout": <10-3600>
},
"length_per_packet": <64-1518>,
"bpf_filter": <BGP filter>
}
}
|
Method |
URL |
|
POST, OPTIONS |
/api/v2/agapi/v1/packet-capture/job-bulk/?action=delete |
{
"delete_ids": [<JOB_UUID>]
}
{
"message": "Succeed to delete 0 entries and fail to delete 1 entries"
}