Skip to main content
PATCH
/
org
/
{org}
/
policy
/
{name}
Perform a Patch on a policy by name
curl --request PATCH \
  --url https://api.cpln.io/org/{org}/policy/{name} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "$drop": [
    "description"
  ],
  "name": "<string>",
  "description": "<string>",
  "tags": {},
  "$replace/tags": {},
  "targetKind": "org",
  "targetLinks": [
    "<string>"
  ],
  "$drop/targetLinks": [
    "<string>"
  ],
  "$append/targetLinks": [
    "<string>"
  ],
  "$retain/targetLinks": [
    "<string>"
  ],
  "targetQuery": {
    "$drop": [
      "kind"
    ],
    "kind": "<string>",
    "spec": {
      "$drop": [
        "match"
      ],
      "match": "all",
      "terms": [
        {
          "op": "=",
          "property": "<string>",
          "rel": "<string>",
          "tag": "<string>",
          "value": "<string>"
        }
      ],
      "$drop/terms": [
        "<string>"
      ],
      "$append/terms": [
        {
          "op": "=",
          "property": "<string>",
          "rel": "<string>",
          "tag": "<string>",
          "value": "<string>"
        }
      ],
      "$patch/terms": [
        {
          "$drop": [
            "op"
          ],
          "op": "=",
          "property": "<string>",
          "rel": "<string>",
          "tag": "<string>",
          "$replace/value": "<string>",
          "value": "<unknown>"
        }
      ],
      "$retain/terms": [
        "<string>"
      ],
      "sort": {
        "$drop": [
          "by"
        ],
        "by": "<string>",
        "order": "asc"
      },
      "$replace/sort": {
        "by": "<string>",
        "order": "asc"
      }
    },
    "$replace/spec": {
      "match": "all",
      "terms": [
        {
          "op": "=",
          "property": "<string>",
          "rel": "<string>",
          "tag": "<string>",
          "value": "<string>"
        }
      ],
      "sort": {
        "by": "<string>",
        "order": "asc"
      }
    }
  },
  "$replace/targetQuery": {
    "kind": "<string>",
    "spec": {
      "match": "all",
      "terms": [
        {
          "op": "=",
          "property": "<string>",
          "rel": "<string>",
          "tag": "<string>",
          "value": "<string>"
        }
      ],
      "sort": {
        "by": "<string>",
        "order": "asc"
      }
    }
  },
  "target": "all",
  "origin": "default",
  "bindings": [
    {
      "permissions": [
        "<string>"
      ],
      "principalLinks": [
        "<string>"
      ]
    }
  ],
  "$drop/bindings": [
    "<string>"
  ],
  "$append/bindings": [
    {
      "permissions": [
        "<string>"
      ],
      "principalLinks": [
        "<string>"
      ]
    }
  ],
  "$retain/bindings": [
    "<string>"
  ],
  "$patch/bindings": [
    {
      "$drop": [
        "permissions"
      ],
      "permissions": [
        "<string>"
      ],
      "$drop/permissions": [
        "<string>"
      ],
      "$append/permissions": [
        "<string>"
      ],
      "$retain/permissions": [
        "<string>"
      ],
      "principalLinks": [
        "<string>"
      ],
      "$drop/principalLinks": [
        "<string>"
      ],
      "$append/principalLinks": [
        "<string>"
      ],
      "$retain/principalLinks": [
        "<string>"
      ]
    }
  ]
}
'
{
  "id": "<string>",
  "name": "<string>",
  "kind": "<string>",
  "version": 123,
  "description": "<string>",
  "tags": {},
  "created": "2023-11-07T05:31:56Z",
  "lastModified": "2023-11-07T05:31:56Z",
  "links": [
    {
      "rel": "<string>",
      "href": "<string>"
    }
  ],
  "targetKind": "org",
  "targetLinks": [
    "<string>"
  ],
  "targetQuery": {
    "kind": "<string>",
    "context": {},
    "spec": {
      "match": "all",
      "terms": [
        {
          "op": "=",
          "property": "<string>",
          "rel": "<string>",
          "tag": "<string>",
          "value": "<string>"
        }
      ],
      "sort": {
        "by": "<string>",
        "order": "asc"
      }
    }
  },
  "target": "all",
  "origin": "default",
  "bindings": [
    {
      "permissions": [
        "<string>"
      ],
      "principalLinks": [
        "<string>"
      ]
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.controlplane.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Service account key can be used as API keys

Path Parameters

org
string
required
name
string
required

Body

application/json
$drop
enum<string>[]
Available options:
description,
tags,
targetKind,
targetLinks,
targetQuery,
target,
origin,
bindings
name
string
Maximum string length: 64
description
string
Maximum string length: 250
tags
object
$replace/tags
object
targetKind
enum<string>
Available options:
org,
cloudaccount,
policy,
user,
group,
resource,
task,
permissions,
serviceaccount,
secret,
location,
gvc,
workload,
quota,
identity,
deployment,
event,
domain,
image,
ipset,
resourcepolicy,
agent,
accessreport,
policymembership,
dbcluster,
auditctx,
memcachecluster,
spicedbcluster,
tenant,
mk8s,
command,
imagesummary,
volumeset
targetQuery
object
$replace/targetQuery
object
target
enum<string>
Available options:
all
origin
enum<string>
default:default
Available options:
default,
builtin
bindings
object[]
$drop/bindings
string[]
$append/bindings
object[]
$retain/bindings
string[]
$patch/bindings
object[]

Response

Success

id
string
read-only
name
string
Maximum string length: 64
kind
string
read-only
version
integer
read-only
description
string
Maximum string length: 250
tags
object
created
string<date-time>
read-only
lastModified
string<date-time>
read-only
targetKind
enum<string>
Available options:
org,
cloudaccount,
policy,
user,
group,
resource,
task,
permissions,
serviceaccount,
secret,
location,
gvc,
workload,
quota,
identity,
deployment,
event,
domain,
image,
ipset,
resourcepolicy,
agent,
accessreport,
policymembership,
dbcluster,
auditctx,
memcachecluster,
spicedbcluster,
tenant,
mk8s,
command,
imagesummary,
volumeset
targetQuery
object
target
enum<string>
Available options:
all
origin
enum<string>
default:default
Available options:
default,
builtin
bindings
object[]