v1.ClusterRole

    Expand or mouse-over a field for more information about it.

    Create a ClusterRole

    HTTP request

    1. Authorization: Bearer $TOKEN
    2. Accept: application/json
    3. Connection: close
    4. Content-Type: application/json'
    5. {
    6. "kind": "ClusterRole",
    7. "apiVersion": "v1",
    8. ...
    9. }

    Curl request

    1. $ curl -k \
    2. -X POST \
    3. -d @- \
    4. -H "Authorization: Bearer $TOKEN" \
    5. -H 'Accept: application/json' \
    6. -H 'Content-Type: application/json' \
    7. https://$ENDPOINT/oapi/v1/clusterroles <<'EOF'
    8. {
    9. "kind": "ClusterRole",
    10. "apiVersion": "v1",
    11. ...
    12. }
    13. EOF

    HTTP body

    Query parameters

    ParameterDescription

    pretty

    If ‘true’, then the output is pretty printed.

    Responses

    HTTP CodeSchema

    200 OK

    v1.ClusterRole

    401 Unauthorized

    Consumes

    • */*

    Produces

    • application/json

    • application/yaml

    • application/vnd.kubernetes.protobuf

    Get a ClusterRole

    Read the specified ClusterRole

    HTTP request

    1. GET /oapi/v1/clusterroles/$NAME HTTP/1.1
    2. Accept: application/json
    3. Connection: close

    Curl request

    Path parameters

    ParameterDescription

    name

    name of the ClusterRole

    Query parameters

    ParameterDescription

    pretty

    If ‘true’, then the output is pretty printed.

    Responses

    HTTP CodeSchema

    200 OK

    v1.ClusterRole

    401 Unauthorized

    Consumes

    • */*

    Produces

    • application/json

    • application/yaml

    • application/vnd.kubernetes.protobuf

    List objects of kind ClusterRole

    HTTP request

    1. GET /oapi/v1/clusterroles HTTP/1.1
    2. Authorization: Bearer $TOKEN
    3. Accept: application/json
    4. Connection: close

    Curl request

    1. $ curl -k \
    2. -H "Authorization: Bearer $TOKEN" \
    3. -H 'Accept: application/json' \
    4. https://$ENDPOINT/oapi/v1/clusterroles

    Query parameters

    Responses

    HTTP CodeSchema

    200 OK

    v1.ClusterRoleList

    401 Unauthorized

    Consumes

    • */*

    Produces

    • application/json

    • application/yaml

    • application/vnd.kubernetes.protobuf

    • application/json;stream=watch

    • application/vnd.kubernetes.protobuf;stream=watch

    Update a ClusterRole

    Replace the specified ClusterRole

    HTTP request

    1. Authorization: Bearer $TOKEN
    2. Accept: application/json
    3. Connection: close
    4. Content-Type: application/json'
    5. {
    6. "kind": "ClusterRole",
    7. "apiVersion": "v1",
    8. ...
    9. }

    Curl request

    HTTP body

    ParameterSchema

    body

    v1.ClusterRole

    Path parameters

    ParameterDescription

    name

    name of the ClusterRole

    Query parameters

    ParameterDescription

    pretty

    If ‘true’, then the output is pretty printed.

    Responses

    HTTP CodeSchema

    200 OK

    v1.ClusterRole

    401 Unauthorized

    Consumes

    • */*

    Produces

    • application/json

    • application/yaml

    • application/vnd.kubernetes.protobuf

    Partially update the specified ClusterRole

    HTTP request

    1. PATCH /oapi/v1/clusterroles/$NAME HTTP/1.1
    2. Authorization: Bearer $TOKEN
    3. Accept: application/json
    4. Content-Type: application/json-patch+json'
    5. {
    6. ...
    7. }

    Curl request

    1. $ curl -k \
    2. -X PATCH \
    3. -d @- \
    4. -H "Authorization: Bearer $TOKEN" \
    5. -H 'Accept: application/json' \
    6. -H 'Content-Type: application/json-patch+json' \
    7. https://$ENDPOINT/oapi/v1/clusterroles/$NAME <<'EOF'
    8. {
    9. ...
    10. }
    11. EOF

    HTTP body

    Path parameters

    ParameterDescription

    name

    name of the ClusterRole

    Query parameters

    ParameterDescription

    pretty

    If ‘true’, then the output is pretty printed.

    Responses

    HTTP CodeSchema

    200 OK

    v1.ClusterRole

    401 Unauthorized

    Consumes

    • application/json-patch+json

    • application/merge-patch+json

    • application/strategic-merge-patch+json

    Produces

    • application/json

    • application/yaml

    • application/vnd.kubernetes.protobuf

    Delete a ClusterRole

    Delete a ClusterRole

    HTTP request

    1. DELETE /oapi/v1/clusterroles/$NAME HTTP/1.1
    2. Authorization: Bearer $TOKEN
    3. Accept: application/json
    4. Connection: close
    5. Content-Type: application/json'
    6. {
    7. ...

    Curl request

    HTTP body

    ParameterSchema

    body

    v1.DeleteOptions

    Path parameters

    ParameterDescription

    name

    name of the ClusterRole

    Query parameters

    Responses

    HTTP CodeSchema

    200 OK

    v1.Status

    401 Unauthorized

    Consumes

    • */*

    Produces

    • application/json

    • application/vnd.kubernetes.protobuf