orb-policies (1.0.0)

Download OpenAPI specification:Download

Authentication

bearerAuth

Security Scheme Type HTTP
HTTP Authorization Scheme bearer
Bearer format "JWT"

policy

List Agent Policies

query Parameters
limit
integer [ 1 .. 100 ]
Default: 10

Size of the subset to retrieve.

offset
integer >= 0
Default: 0

Number of items to skip during retrieval.

name
string

Name filter. Filtering is performed as a case-insensitive partial match.

order
string
Default: "id"
Enum: "name" "id"

Order type.

dir
string
Default: "desc"
Enum: "asc" "desc"

Order direction.

tags
object
Example: tags={"key":"value"}

Tags filter. Filtering is performed as a case-insensitive partial key value match.

header Parameters
Authorization
required
any

User's access token (bearer auth).

Responses

Response samples

Content type
application/json
{
  • "policy": [
    ],
  • "total": 0,
  • "offset": 0,
  • "limit": 0
}

Create new Agent Policy

header Parameters
Authorization
required
any

User's access token (bearer auth).

Request Body schema: application/json

JSON-formatted document describing the new Policy configuration

One of
name
required
string

A unique name label

description
string

User description of this Policy

tags
required
object

User defined key/values for organization and searching

version
integer

Currente version of agent policy

backend
required
string

Agent backend this policy is for. Cannot change once created.

schema_version
string

Schema version which needs to match the schema defined by the backend which will use the policy.

required
object

Agent backend specific policy data in json format

Responses

Request samples

Content type
application/json
Example
{
  • "name": "my-policy",
  • "description": "A policy example",
  • "tags": {
    },
  • "version": 1,
  • "backend": "pktvisor",
  • "schema_version": "1.0",
  • "policy": {
    }
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "my-policy",
  • "description": "An example policy",
  • "tags": {
    },
  • "backend": "pktvisor",
  • "ts_created": "2019-08-24T14:15:22Z",
  • "version": 0,
  • "policy": {
    },
  • "format": "yaml",
  • "policy_data": "handlers:\n modules:\n default_dns:\n type: dns\n default_net:\n type: net\ninput:\n input_type: pcap\n tap: default_pcap\nkind: collection"
}

Get an existing Agent Policy

path Parameters
id
required
string <uuid>

Unique Agent Policy identifier.

header Parameters
Authorization
required
any

User's access token (bearer auth).

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "my-policy",
  • "description": "An example policy",
  • "tags": {
    },
  • "backend": "pktvisor",
  • "ts_created": "2019-08-24T14:15:22Z",
  • "version": 0,
  • "policy": {
    },
  • "format": "yaml",
  • "policy_data": "handlers:\n modules:\n default_dns:\n type: dns\n default_net:\n type: net\ninput:\n input_type: pcap\n tap: default_pcap\nkind: collection"
}

Update an existing Agent Policy

path Parameters
id
required
string <uuid>

Unique Agent Policy identifier.

header Parameters
Authorization
required
any

User's access token (bearer auth).

Request Body schema: application/json

JSON-formatted document describing the updated Policy configuration

One of
name
string

A unique name label

description
string

User description of this Policy

tags
object

User defined key/values for organization and searching

object

Agent backend specific policy data in json format

Responses

Request samples

Content type
application/json
Example
{
  • "name": "my-policy",
  • "description": "A policy example",
  • "tags": {
    },
  • "policy": {
    }
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "my-policy",
  • "description": "An example policy",
  • "tags": {
    },
  • "backend": "pktvisor",
  • "ts_created": "2019-08-24T14:15:22Z",
  • "version": 0,
  • "policy": {
    },
  • "format": "yaml",
  • "policy_data": "handlers:\n modules:\n default_dns:\n type: dns\n default_net:\n type: net\ninput:\n input_type: pcap\n tap: default_pcap\nkind: collection"
}

Delete an existing Agent Policy

path Parameters
id
required
string <uuid>

Unique Agent Policy identifier.

header Parameters
Authorization
required
any

User's access token (bearer auth).

Responses

Response samples

Content type
application/json
"string"

Validate an Agent Policy configuration without saving it

header Parameters
Authorization
required
any

User's access token (bearer auth).

Request Body schema: application/json

JSON-formatted document describing the new Policy configuration

One of
name
required
string

A unique name label

description
string

User description of this Policy

tags
required
object

User defined key/values for organization and searching

version
integer

Currente version of agent policy

backend
required
string

Agent backend this policy is for. Cannot change once created.

schema_version
string

Schema version which needs to match the schema defined by the backend which will use the policy.

required
object

Agent backend specific policy data in json format

Responses

Request samples

Content type
application/json
Example
{
  • "name": "my-policy",
  • "description": "A policy example",
  • "tags": {
    },
  • "version": 1,
  • "backend": "pktvisor",
  • "schema_version": "1.0",
  • "policy": {
    }
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "my-policy",
  • "description": "An example policy",
  • "tags": {
    },
  • "backend": "pktvisor",
  • "ts_created": "2019-08-24T14:15:22Z",
  • "version": 0,
  • "policy": {
    },
  • "format": "yaml",
  • "policy_data": "handlers:\n modules:\n default_dns:\n type: dns\n default_net:\n type: net\ninput:\n input_type: pcap\n tap: default_pcap\nkind: collection"
}

Duplicate an existing Agent Policy

path Parameters
id
required
string <uuid>

Unique Agent Policy identifier.

header Parameters
Authorization
required
any

User's access token (bearer auth).

Request Body schema: application/json

JSON-formatted document describing the Policy to be duplicate

name
string

A unique name label

Responses

Request samples

Content type
application/json
{
  • "name": "my-policy"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "my-policy",
  • "description": "An example policy",
  • "tags": {
    },
  • "backend": "pktvisor",
  • "ts_created": "2019-08-24T14:15:22Z",
  • "version": 0,
  • "policy": {
    },
  • "format": "yaml",
  • "policy_data": "handlers:\n modules:\n default_dns:\n type: dns\n default_net:\n type: net\ninput:\n input_type: pcap\n tap: default_pcap\nkind: collection"
}

dataset

List Dataset

query Parameters
limit
integer [ 1 .. 100 ]
Default: 10

Size of the subset to retrieve.

offset
integer >= 0
Default: 0

Number of items to skip during retrieval.

name
string

Name filter. Filtering is performed as a case-insensitive partial match.

order
string
Default: "id"
Enum: "name" "id"

Order type.

dir
string
Default: "desc"
Enum: "asc" "desc"

Order direction.

tags
object
Example: tags={"key":"value"}

Tags filter. Filtering is performed as a case-insensitive partial key value match.

header Parameters
Authorization
required
any

User's access token (bearer auth).

Responses

Response samples

Content type
application/json
{
  • "dataset": [
    ],
  • "total": 0,
  • "offset": 0,
  • "limit": 0
}

Create new Dataset

header Parameters
Authorization
required
any

User's access token (bearer auth).

Request Body schema: application/json

JSON-formatted document describing the new Dataset configuration

name
required
string

A unique name label

agent_group_id
required
string <uuid>

A unique identifier of an agent_group

agent_policy_id
required
string <uuid>

A unique identifier of an agent_policy

sink_ids
required
Array of strings <uuid> non-empty

An array of one or more sink unique identifier

Responses

Request samples

Content type
application/json
{
  • "name": "my-dataset",
  • "agent_group_id": "4f51d64b-3a46-4641-aa07-41a47534d8ba",
  • "agent_policy_id": "94cde23b-50ed-4f7a-9096-f50a6e9e7da4",
  • "sink_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "my-dataset",
  • "agent_group_id": "4f51d64b-3a46-4641-aa07-41a47534d8ba",
  • "agent_policy_id": "94cde23b-50ed-4f7a-9096-f50a6e9e7da4",
  • "sink_ids": [
    ],
  • "valid": true,
  • "tags": {
    },
  • "ts_created": "2019-08-24T14:15:22Z"
}

Get an existing Dataset

path Parameters
id
required
string <uuid>

Unique Dataset identifier.

header Parameters
Authorization
required
any

User's access token (bearer auth).

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "my-dataset",
  • "agent_group_id": "4f51d64b-3a46-4641-aa07-41a47534d8ba",
  • "agent_policy_id": "94cde23b-50ed-4f7a-9096-f50a6e9e7da4",
  • "sink_ids": [
    ],
  • "valid": true,
  • "tags": {
    },
  • "ts_created": "2019-08-24T14:15:22Z"
}

Update an existing Dataset

path Parameters
id
required
string <uuid>

Unique Dataset identifier.

header Parameters
Authorization
required
any

User's access token (bearer auth).

Request Body schema: application/json

JSON-formatted document describing the updated Dataset configuration

name
string

A unique name label

sink_ids
Array of strings <uuid> non-empty unique

An array of one or more sink unique identifier

Responses

Request samples

Content type
application/json
{
  • "name": "my-dataset",
  • "sink_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "my-dataset",
  • "agent_group_id": "4f51d64b-3a46-4641-aa07-41a47534d8ba",
  • "agent_policy_id": "94cde23b-50ed-4f7a-9096-f50a6e9e7da4",
  • "sink_ids": [
    ],
  • "valid": true,
  • "tags": {
    },
  • "ts_created": "2019-08-24T14:15:22Z"
}

Delete an existing Dataset

path Parameters
id
required
string <uuid>

Unique Dataset identifier.

header Parameters
Authorization
required
any

User's access token (bearer auth).

Responses

Response samples

Content type
application/json
"string"

Validate a Policy Dataset configuration without saving it

header Parameters
Authorization
required
any

User's access token (bearer auth).

Request Body schema: application/json

JSON-formatted document describing the new Dataset configuration

name
required
string

A unique name label

agent_group_id
required
string <uuid>

A unique identifier of an agent_group

agent_policy_id
required
string <uuid>

A unique identifier of an agent_policy

sink_ids
required
Array of strings <uuid> non-empty

An array of one or more sink unique identifier

Responses

Request samples

Content type
application/json
{
  • "name": "my-dataset",
  • "agent_group_id": "4f51d64b-3a46-4641-aa07-41a47534d8ba",
  • "agent_policy_id": "94cde23b-50ed-4f7a-9096-f50a6e9e7da4",
  • "sink_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "my-dataset",
  • "agent_group_id": "4f51d64b-3a46-4641-aa07-41a47534d8ba",
  • "agent_policy_id": "94cde23b-50ed-4f7a-9096-f50a6e9e7da4",
  • "sink_ids": [
    ],
  • "valid": true,
  • "tags": {
    },
  • "ts_created": "2019-08-24T14:15:22Z"
}