Creates a new policy for the authenticated user. Requires cpf:create
scope.
curl --request POST \
--url https://api.altostrat.io/policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"trusted_networks": [
"<string>"
],
"custom_input_rules": true,
"winbox": {
"enabled": true,
"port": 123
},
"ssh": {
"enabled": true,
"port": 123
},
"http": {
"enabled": true,
"port": 123
},
"https": {
"enabled": true,
"port": 123
},
"telnet": {
"enabled": true,
"port": 123
},
"ftp": {
"enabled": true,
"port": 123
},
"api": {
"enabled": true,
"port": 123
},
"api_ssl": {
"enabled": true,
"port": 123
},
"default": true,
"sites": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trusted_networks": [
"<string>"
],
"custom_input_rules": true,
"name": "<string>",
"slug": "<string>",
"winbox": {
"enabled": true,
"port": 123,
"networks": [
"<string>"
]
},
"ssh": {
"enabled": true,
"port": 123,
"networks": [
"<string>"
]
},
"http": {
"enabled": true,
"port": 123,
"networks": [
"<string>"
]
},
"https": {
"enabled": true,
"port": 123,
"networks": [
"<string>"
]
},
"telnet": {
"enabled": true,
"port": 123,
"networks": [
"<string>"
]
},
"ftp": {
"enabled": true,
"port": 123,
"networks": [
"<string>"
]
},
"api": {
"enabled": true,
"port": 123,
"networks": [
"<string>"
]
},
"api_ssl": {
"enabled": true,
"port": 123,
"networks": [
"<string>"
]
},
"default": true,
"sites": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Policy data
The body is of type object
.
Policy created
The response is of type object
.
curl --request POST \
--url https://api.altostrat.io/policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"trusted_networks": [
"<string>"
],
"custom_input_rules": true,
"winbox": {
"enabled": true,
"port": 123
},
"ssh": {
"enabled": true,
"port": 123
},
"http": {
"enabled": true,
"port": 123
},
"https": {
"enabled": true,
"port": 123
},
"telnet": {
"enabled": true,
"port": 123
},
"ftp": {
"enabled": true,
"port": 123
},
"api": {
"enabled": true,
"port": 123
},
"api_ssl": {
"enabled": true,
"port": 123
},
"default": true,
"sites": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trusted_networks": [
"<string>"
],
"custom_input_rules": true,
"name": "<string>",
"slug": "<string>",
"winbox": {
"enabled": true,
"port": 123,
"networks": [
"<string>"
]
},
"ssh": {
"enabled": true,
"port": 123,
"networks": [
"<string>"
]
},
"http": {
"enabled": true,
"port": 123,
"networks": [
"<string>"
]
},
"https": {
"enabled": true,
"port": 123,
"networks": [
"<string>"
]
},
"telnet": {
"enabled": true,
"port": 123,
"networks": [
"<string>"
]
},
"ftp": {
"enabled": true,
"port": 123,
"networks": [
"<string>"
]
},
"api": {
"enabled": true,
"port": 123,
"networks": [
"<string>"
]
},
"api_ssl": {
"enabled": true,
"port": 123,
"networks": [
"<string>"
]
},
"default": true,
"sites": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}