Chapter 44. Network Policy Service
44.1. Network Policy Service
44.1.1. ApplyNetworkPolicy
POST /v1/networkpolicies/apply/{clusterId}
44.1.1.1. Description
44.1.1.2. Parameters
44.1.1.2.1. Path Parameters
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
clusterId | X | null |
44.1.1.2.2. Body Parameter
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
modification | X |
44.1.1.3. Return Type
Object
44.1.1.4. Content Type
- application/json
44.1.1.5. Responses
Code | Message | Datatype |
---|---|---|
200 | A successful response. |
|
0 | An unexpected error response. |
44.1.1.6. Samples
44.1.2. ApplyNetworkPolicyYamlForDeployment
POST /v1/networkpolicies/apply/deployment/{deploymentId}
44.1.2.1. Description
44.1.2.2. Parameters
44.1.2.2.1. Path Parameters
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
deploymentId | X | null |
44.1.2.2.2. Body Parameter
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
body | X |
44.1.2.3. Return Type
Object
44.1.2.4. Content Type
- application/json
44.1.2.5. Responses
Code | Message | Datatype |
---|---|---|
200 | A successful response. |
|
0 | An unexpected error response. |
44.1.2.6. Samples
44.1.3. GenerateNetworkPolicies
GET /v1/networkpolicies/generate/{clusterId}
44.1.3.1. Description
44.1.3.2. Parameters
44.1.3.2.1. Path Parameters
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
clusterId | X | null |
44.1.3.2.2. Query Parameters
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
query | - | null | ||
deleteExisting | - NONE: Do not delete any existing network policies. - GENERATED_ONLY: Delete any existing auto-generated network policies. - ALL: Delete all existing network policies in the respective namespace. | - | UNKNOWN | |
networkDataSince | - | null | ||
includePorts | - | null |
44.1.3.3. Return Type
44.1.3.4. Content Type
- application/json
44.1.3.5. Responses
Code | Message | Datatype |
---|---|---|
200 | A successful response. | |
0 | An unexpected error response. |
44.1.3.6. Samples
44.1.4. GetAllowedPeersFromCurrentPolicyForDeployment
GET /v1/networkpolicies/allowedpeers/{id}
44.1.4.1. Description
44.1.4.2. Parameters
44.1.4.2.1. Path Parameters
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
id | X | null |
44.1.4.3. Return Type
44.1.4.4. Content Type
- application/json
44.1.4.5. Responses
Code | Message | Datatype |
---|---|---|
200 | A successful response. | |
0 | An unexpected error response. |
44.1.4.6. Samples
44.1.5. GetBaselineGeneratedNetworkPolicyForDeployment
POST /v1/networkpolicies/generate/baseline/{deploymentId}
44.1.5.1. Description
44.1.5.2. Parameters
44.1.5.2.1. Path Parameters
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
deploymentId | X | null |
44.1.5.2.2. Body Parameter
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
body | NetworkPolicyServiceGetBaselineGeneratedNetworkPolicyForDeploymentBody | X |
44.1.5.3. Return Type
44.1.5.4. Content Type
- application/json
44.1.5.5. Responses
Code | Message | Datatype |
---|---|---|
200 | A successful response. | |
0 | An unexpected error response. |
44.1.5.6. Samples
44.1.6. GetDiffFlowsBetweenPolicyAndBaselineForDeployment
GET /v1/networkpolicies/baselinecomparison/{id}
44.1.6.1. Description
44.1.6.2. Parameters
44.1.6.2.1. Path Parameters
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
id | X | null |
44.1.6.3. Return Type
44.1.6.4. Content Type
- application/json
44.1.6.5. Responses
Code | Message | Datatype |
---|---|---|
200 | A successful response. | |
0 | An unexpected error response. |
44.1.6.6. Samples
44.1.7. GetDiffFlowsFromUndoModificationForDeployment
GET /v1/networkpolicies/undobaselinecomparison/{id}
44.1.7.1. Description
44.1.7.2. Parameters
44.1.7.2.1. Path Parameters
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
id | X | null |
44.1.7.3. Return Type
44.1.7.4. Content Type
- application/json
44.1.7.5. Responses
Code | Message | Datatype |
---|---|---|
200 | A successful response. | |
0 | An unexpected error response. |
44.1.7.6. Samples
44.1.8. GetNetworkGraph
GET /v1/networkpolicies/cluster/{clusterId}
44.1.8.1. Description
44.1.8.2. Parameters
44.1.8.2.1. Path Parameters
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
clusterId | X | null |
44.1.8.2.2. Query Parameters
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
query | - | null | ||
includePorts | If set to true, include port-level information in the network policy graph. | - | null | |
scope.query | - | null |
44.1.8.3. Return Type
44.1.8.4. Content Type
- application/json
44.1.8.5. Responses
Code | Message | Datatype |
---|---|---|
200 | A successful response. | |
0 | An unexpected error response. |
44.1.8.6. Samples
44.1.9. GetNetworkGraphEpoch
GET /v1/networkpolicies/graph/epoch
44.1.9.1. Description
44.1.9.2. Parameters
44.1.9.2.1. Query Parameters
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
clusterId | - | null |
44.1.9.3. Return Type
44.1.9.4. Content Type
- application/json
44.1.9.5. Responses
Code | Message | Datatype |
---|---|---|
200 | A successful response. | |
0 | An unexpected error response. |
44.1.9.6. Samples
44.1.10. GetNetworkPolicies
GET /v1/networkpolicies
44.1.10.1. Description
44.1.10.2. Parameters
44.1.10.2.1. Query Parameters
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
clusterId | - | null | ||
deploymentQuery | - | null | ||
namespace | - | null |
44.1.10.3. Return Type
44.1.10.4. Content Type
- application/json
44.1.10.5. Responses
Code | Message | Datatype |
---|---|---|
200 | A successful response. | |
0 | An unexpected error response. |
44.1.10.6. Samples
44.1.11. GetNetworkPolicy
GET /v1/networkpolicies/{id}
44.1.11.1. Description
44.1.11.2. Parameters
44.1.11.2.1. Path Parameters
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
id | X | null |
44.1.11.3. Return Type
44.1.11.4. Content Type
- application/json
44.1.11.5. Responses
Code | Message | Datatype |
---|---|---|
200 | A successful response. | |
0 | An unexpected error response. |
44.1.11.6. Samples
44.1.12. GetUndoModification
GET /v1/networkpolicies/undo/{clusterId}
44.1.12.1. Description
44.1.12.2. Parameters
44.1.12.2.1. Path Parameters
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
clusterId | X | null |
44.1.12.3. Return Type
44.1.12.4. Content Type
- application/json
44.1.12.5. Responses
Code | Message | Datatype |
---|---|---|
200 | A successful response. | |
0 | An unexpected error response. |
44.1.12.6. Samples
44.1.13. GetUndoModificationForDeployment
GET /v1/networkpolicies/undo/deployment/{id}
44.1.13.1. Description
44.1.13.2. Parameters
44.1.13.2.1. Path Parameters
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
id | X | null |
44.1.13.3. Return Type
44.1.13.4. Content Type
- application/json
44.1.13.5. Responses
Code | Message | Datatype |
---|---|---|
200 | A successful response. | |
0 | An unexpected error response. |
44.1.13.6. Samples
44.1.14. SendNetworkPolicyYAML
POST /v1/networkpolicies/simulate/{clusterId}/notify
44.1.14.1. Description
44.1.14.2. Parameters
44.1.14.2.1. Path Parameters
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
clusterId | X | null |
44.1.14.2.2. Body Parameter
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
modification | X |
44.1.14.2.3. Query Parameters
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
notifierIds |
| - | null |
44.1.14.3. Return Type
Object
44.1.14.4. Content Type
- application/json
44.1.14.5. Responses
Code | Message | Datatype |
---|---|---|
200 | A successful response. |
|
0 | An unexpected error response. |
44.1.14.6. Samples
44.1.15. SimulateNetworkGraph
POST /v1/networkpolicies/simulate/{clusterId}
44.1.15.1. Description
44.1.15.2. Parameters
44.1.15.2.1. Path Parameters
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
clusterId | X | null |
44.1.15.2.2. Body Parameter
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
modification | X |
44.1.15.2.3. Query Parameters
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
query | - | null | ||
includePorts | If set to true, include port-level information in the network policy graph. | - | null | |
includeNodeDiff | - | null | ||
scope.query | - | null |
44.1.15.3. Return Type
44.1.15.4. Content Type
- application/json
44.1.15.5. Responses
Code | Message | Datatype |
---|---|---|
200 | A successful response. | |
0 | An unexpected error response. |