Skip to main content

Announce BGP FlowSpec rule

POST
/tasks/flap/bgp/flowspec/announce/{id}

Announce a BGP FlowSpec rule from the emulated neighbor while the task is running. A rule whose name is already announced is replaced. The agent response carries the time of its host before the command and after the emulator's reply (sent_unix_ns, answered_unix_ns): the time until the flow reacts is counted from it.

Contract

Parameter
Value
Sectiontasks
AuthenticationCookieAuth
Consumesapplication/json
Producesapplication/json

Parameters

2 parameters

Name
Location
Required
Type
Description
idpathyesintegerTask ID
requestbodyyesobjectrule: the rule {name, address-family: ipv4|ipv6, match: {...}, then: {discard|rate-limit|redirect|mark-dscp|...}}, the name is required; local_address and peer_address: select the BGP session (required if several sessions have FlowSpec); the optional agent field (agent ID or hostname) selects one routing agent of the task
  • {}

Responses

4 responses

Status
Description
Type
200
Response: {status: ok, agents: {hostname: agent response}}; the agent response contains the emulator's reply (bgp-flowspec: operation, name, updates-tx, withdraws-tx) and the host time sent_unix_ns, answered_unix_nsobject
400
Invalid task ID, the request body is not a JSON object, or the agent value does not match any routing agent of the taskobject
401
Unauthorizedobject
500
Task is not running, has no routing agents, the agent rejected the request (no rule or name), or the emulator rejected the command (the session is not established, or several sessions match the selection)object
  • {}
  • {
      "data": {},
      "error": "<string>"
    }
  • {
      "data": {},
      "error": "<string>"
    }
  • {
      "data": {},
      "error": "<string>"
    }