Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Policy-Endpoint Associations

Create association with endpoint: PUT /OS-ENDPOINT-POLICY/endpoints/{endpoint_id}/policy

Creates an association between the policy and the endpoint. If another association already existed for the specified endpoint, this will replace that association.

Request:

Content-Type: application/json

{
    "policy": "--policy-id--"
}

Response:

Status: 204 No Content

Check association with endpoint: HEAD /OS-ENDPOINT-POLICY/endpoints/{endpoint_id}/policy

Verifies the existence of an association between a policy and an endpoint. A GET version of this API is also supported, with the same response code.

Response:

Status: 200 OK
Link: http://identity:35357/v3/policies/--policy-id--; rel=policy

Get the policy for the endpoint: GET /OS-ENDPOINT-POLICY/endpoints/{endpoint_id}/policy

Response:

Status: 200 OK
Link: http://identity:35357/v3/policies/--policy-id--; rel=policy

{
        "policy": {
            "blob": "--serialized-blob--",
            "id": "--policy-id--",
            "links": {
                "self": "http://identity:35357/v3/policies/--policy-id--"
            },
            "type": "--serialization-mime-type--"
    }
} 

Delete association with endpoint: DELETE /OS-ENDPOINT-POLICY/endpoints/{endpoint_id}/policy

Deletes an association between the policy and the endpoint.

Response:

Status: 204 No Content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.