Create Plan Rule
Api to create plan rules. Request body will suggest plan against which rule need to be created and type of entities(workloads type, server groups, regions and all) that need to be referenced for applying that rule against a workload.
- application/json
Request Body
plan object required
- rank int32
Optional field to suggest priority/rank of the rule. If not present, we will process rule in the same order they are created.
workloads object[]
serverGroups object[]
regions object[]
solutions object[]
company object
tags object[]
Responses
- 200
- 403
- 500
OK
- application/json
- Schema
- Example (from schema)
Schema
- id int32
- name string
{
"id": 0,
"name": "string"
}
Forbidden
- application/json
- Schema
- Example (from schema)
Schema
- errorMessage string
- errorCode int32
{
"errorMessage": "string",
"errorCode": 0
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
Schema
- errorMessage string
- errorCode int32
{
"errorMessage": "string",
"errorCode": 0
}
POST /v4/plan/rule
Authorization
type: apiKeyname: Authtokenin: header
Request
Request
curl -L -X POST 'https://localhost/webconsole/api/V4/Plan/Rule' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"plan": {
"id": 0,
"name": "string"
},
"rank": 0,
"workloads": [
{
"id": 0,
"name": "string"
}
],
"serverGroups": [
{
"id": 0,
"name": "string"
}
],
"regions": [
{
"id": 0,
"name": "string"
}
],
"solutions": [
{
"id": 0,
"name": "string"
}
],
"company": {
"id": 0,
"name": "string"
},
"tags": [
{
"id": 0,
"name": "string",
"value": "string"
}
]
}'
curl -L -X POST 'https://localhost/webconsole/api/V4/Plan/Rule' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"plan": {
"id": 0,
"name": "string"
},
"rank": 0,
"workloads": [
{
"id": 0,
"name": "string"
}
],
"serverGroups": [
{
"id": 0,
"name": "string"
}
],
"regions": [
{
"id": 0,
"name": "string"
}
],
"solutions": [
{
"id": 0,
"name": "string"
}
],
"company": {
"id": 0,
"name": "string"
},
"tags": [
{
"id": 0,
"name": "string",
"value": "string"
}
]
}'
curl -L -X POST 'https://localhost/webconsole/api/V4/Plan/Rule' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"plan": {
"id": 0,
"name": "string"
},
"rank": 0,
"workloads": [
{
"id": 0,
"name": "string"
}
],
"serverGroups": [
{
"id": 0,
"name": "string"
}
],
"regions": [
{
"id": 0,
"name": "string"
}
],
"solutions": [
{
"id": 0,
"name": "string"
}
],
"company": {
"id": 0,
"name": "string"
},
"tags": [
{
"id": 0,
"name": "string",
"value": "string"
}
]
}'
curl -L -X POST 'https://localhost/webconsole/api/V4/Plan/Rule' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"plan": {
"id": 0,
"name": "string"
},
"rank": 0,
"workloads": [
{
"id": 0,
"name": "string"
}
],
"serverGroups": [
{
"id": 0,
"name": "string"
}
],
"regions": [
{
"id": 0,
"name": "string"
}
],
"solutions": [
{
"id": 0,
"name": "string"
}
],
"company": {
"id": 0,
"name": "string"
},
"tags": [
{
"id": 0,
"name": "string",
"value": "string"
}
]
}'
curl -L -X POST 'https://localhost/webconsole/api/V4/Plan/Rule' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"plan": {
"id": 0,
"name": "string"
},
"rank": 0,
"workloads": [
{
"id": 0,
"name": "string"
}
],
"serverGroups": [
{
"id": 0,
"name": "string"
}
],
"regions": [
{
"id": 0,
"name": "string"
}
],
"solutions": [
{
"id": 0,
"name": "string"
}
],
"company": {
"id": 0,
"name": "string"
},
"tags": [
{
"id": 0,
"name": "string",
"value": "string"
}
]
}'
curl -L -X POST 'https://localhost/webconsole/api/V4/Plan/Rule' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"plan": {
"id": 0,
"name": "string"
},
"rank": 0,
"workloads": [
{
"id": 0,
"name": "string"
}
],
"serverGroups": [
{
"id": 0,
"name": "string"
}
],
"regions": [
{
"id": 0,
"name": "string"
}
],
"solutions": [
{
"id": 0,
"name": "string"
}
],
"company": {
"id": 0,
"name": "string"
},
"tags": [
{
"id": 0,
"name": "string",
"value": "string"
}
]
}'
curl -L -X POST 'https://localhost/webconsole/api/V4/Plan/Rule' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"plan": {
"id": 0,
"name": "string"
},
"rank": 0,
"workloads": [
{
"id": 0,
"name": "string"
}
],
"serverGroups": [
{
"id": 0,
"name": "string"
}
],
"regions": [
{
"id": 0,
"name": "string"
}
],
"solutions": [
{
"id": 0,
"name": "string"
}
],
"company": {
"id": 0,
"name": "string"
},
"tags": [
{
"id": 0,
"name": "string",
"value": "string"
}
]
}'