/v2/projects/{project_id}/links/{link_id}/start_capture¶
Contents
POST /v2/projects/{project_id}/links/{link_id}/start_capture¶
Start capture on a link instance. By default we consider it as an Ethernet link
Parameters¶
- project_id: Project UUID
- link_id: Link UUID
Response status codes¶
- 201: Capture started
- 400: Invalid request
Input¶
Name | Mandatory | Type | Description |
---|---|---|---|
capture_file_name | string | Read only property. The name of the capture file if capture is running | |
data_link_type | enum | Possible values: DLT_ATM_RFC1483, DLT_EN10MB, DLT_FRELAY, DLT_C_HDLC, DLT_PPP_SERIAL |
Output¶
Name | Mandatory | Type | Description |
---|---|---|---|
capture_file_name | ['string', 'null'] | Read only property. The name of the capture file if capture is running | |
capture_file_path | ['string', 'null'] | Read only property. The full path of the capture file if capture is running | |
capturing | boolean | Read only property. True if a capture running on the link | |
filters | object | Packet filter. This allow to simulate latency and errors | |
link_id | string | Link UUID | |
link_type | enum | Possible values: ethernet, serial | |
nodes | array | List of the VMS | |
project_id | string | Project UUID | |
suspend | boolean | Suspend the link |
Sample session¶
curl -i -X POST 'http://localhost:3080/v2/projects/b743b3a3-845f-4604-9459-d673fb3bc9c3/links/57a8d659-29a9-4cbd-888c-090d69a9eb35/start_capture' -d '{}'
POST /v2/projects/b743b3a3-845f-4604-9459-d673fb3bc9c3/links/57a8d659-29a9-4cbd-888c-090d69a9eb35/start_capture HTTP/1.1
{}
HTTP/1.1 201
Connection: close
Content-Length: 288
Content-Type: application/json
Date: Mon, 08 Jan 2018 08:16:36 GMT
Server: Python/3.6 GNS3/2.1.2dev1
X-Route: /v2/projects/{project_id}/links/{link_id}/start_capture
{
"capture_file_name": null,
"capture_file_path": null,
"capturing": false,
"filters": {},
"link_id": "57a8d659-29a9-4cbd-888c-090d69a9eb35",
"link_type": "ethernet",
"nodes": [],
"project_id": "b743b3a3-845f-4604-9459-d673fb3bc9c3",
"suspend": false
}