policy

Get an existing Agent Policy

get/policies/agent/{id}

Response

Policy object

idstring uuid required

Unique identifier (UUID)

namestring

A unique name label

descriptionstring

User description of this Policy

tagsobject

User defined key/values for organization and searching

backendstring

The policy backend to use. Cannot change once created.

ts_createdstring date-time

Timestamp of creation

versioninteger

A monotonically increasing counter starting at 0 on creation and increasing with each policy update.

policyobject

Agent backend specific policy data in json format

formatstring

Policy text format needed to specify when a policy was created in yaml format.

policy_datastring

Agent backend specific policy data in yaml format

Example response

{
  "name": "my-policy",
  "description": "An example policy",
  "tags": {
    "region": "eu",
    "node_type": "dns"
  },
  "backend": "pktvisor",
  "policy": {
    "handlers": {
      "modules": {
        "default_dns": {
          "type": "dns"
        },
        "default_net": {
          "type": "net"
        }
      }
    },
    "input": {
      "input_type": "pcap",
      "tap": "default_pcap"
    },
    "kind": "collection"
  },
  "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"
}

Changes

Changed in 10 of the 25 revisions of this API.66

    • added the new required header request parameter Authorization to all path's operations

      new-required-request-default-parameter-to-existing-path

    • added the new required header request parameter Bearer authorization to all path's operations

      new-required-request-default-parameter-to-existing-path

    • added the optional property format to the response with the 201 status

      response-optional-property-added

    • added the optional property policy_data to the response with the 201 status

      response-optional-property-added

    • the policy response's property type/format changed from string/ to object/ for status 201

      response-property-type-changed

    • the policy response's property type/format changed from object/ to string/ for status 201

      response-property-type-changed

    • the response optional property ts_created became read-only for the status 201

      response-optional-property-became-read-only

    • the response required property id became read-only for the status 201

      response-required-property-became-read-only

    • endpoint added

      endpoint-added

    • api path removed without deprecation

      api-path-removed-without-deprecation

    • endpoint added

      endpoint-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 15 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog