Create new Agent Policy
Request body
Example request
{
"name": "my-policy",
"description": "A policy example",
"tags": {
"region": "eu",
"node_type": "dns"
},
"version": 1,
"backend": "pktvisor",
"schema_version": "1.0",
"policy": {
"handlers": {
"modules": {
"default_dns": {
"type": "dns"
},
"default_net": {
"type": "net"
}
}
},
"input": {
"input_type": "pcap",
"tap": "default_pcap"
},
"kind": "collection"
}
}Response
Policy object
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 17 of the 25 revisions of this API.201542
- ▲
added the new required
headerrequest parameterAuthorizationto all path's operationsnew-required-request-default-parameter-to-existing-path
- ▲
- ▲
added the new required
headerrequest parameterBearer authorizationto all path's operationsnew-required-request-default-parameter-to-existing-path
- ▲
- ○
added the optional property
formatto the response with the201statusresponse-optional-property-added
- ○
added the optional property
policy_datato the response with the201statusresponse-optional-property-added
- ○
- ○
added the new optional request property
oneOf[PolicyCreateReqSchemaJson]/schema_versionnew-optional-request-property
- ○
added the new optional request property
oneOf[PolicyCreateReqSchemaYaml]/schema_versionnew-optional-request-property
- ○
- ○
added the new optional request property
oneOf[PolicyCreateReqSchemaJson]/policy/handlersnew-optional-request-property
- ○
added the new optional request property
oneOf[PolicyCreateReqSchemaJson]/policy/inputnew-optional-request-property
- ○
added the new optional request property
oneOf[PolicyCreateReqSchemaJson]/policy/kindnew-optional-request-property
- ○
added the new optional request property
oneOf[PolicyCreateReqSchemaJson]/versionnew-optional-request-property
- ○
the request property
oneOf[PolicyCreateReqSchemaJson]/descriptionbecame optionalrequest-property-became-optional
- ○
the request property
oneOf[PolicyCreateReqSchemaYaml]/descriptionbecame optionalrequest-property-became-optional
- ○
- ▲
the
policyresponse's property type/format changed fromstring/toobject/for status201response-property-type-changed
- ▲
- ▲
the request's body type/format changed from
object/to/request-body-type-changed
- ●
removed the request property
backendrequest-property-removed
- ●
removed the request property
descriptionrequest-property-removed
- ●
removed the request property
formatrequest-property-removed
- ●
removed the request property
namerequest-property-removed
- ●
removed the request property
policyrequest-property-removed
- ●
removed the request property
policy_datarequest-property-removed
- ●
removed the request property
tagsrequest-property-removed
- ○
added
PolicyCreateReqSchemaJsonPolicyCreateReqSchemaYamlto the request bodyoneOflistrequest-body-one-of-added
This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ▲
the
policyrequest property type/format changed fromstring/toobject/request-property-type-changed
- ○
the request property
policybecame optionalrequest-property-became-optional
- ▲
- ○
added the new optional request property
formatnew-optional-request-property
- ○
added the new optional request property
policy_datanew-optional-request-property
- ○
- ▲
the
policyrequest property type/format changed fromobject/tostring/request-property-type-changed
- ▲
the
policyresponse's property type/format changed fromobject/tostring/for status201response-property-type-changed
- ▲