Skip to content

`GET /v1/orgs/{org}/policies/{policy_id}`, optionally `?version=2`.

GET
/v1/orgs/{org}/policies/{policy_id}
curl --request GET \
--url https://api.updawg.net/v1/orgs/example/policies/example
org
required
string

Organization slug.

policy_id
required
string

The pol_… id.

version
integer format: int32

An older version. Reading one and PUTting it back is how a rollback is done, and the history then shows the rollback as a new version.

The policy, at the version asked for.

Media typeapplication/json
object
created_at
required
string format: date-time
enabled
required
boolean
id
required
string
managed_by
One of:

⚠️ terraform: the Terraform provider created or last saved this policy, and its next terraform apply puts its own text back over any other edit. Recorded from the provider’s requests and never cleared by an edit from anywhere else. null is a policy no tool claims.

string
Allowed values: terraform
name
required
string
priority
required
integer format: int32
updated_at
required
string format: date-time
version
required

Which version is in force. Named version rather than current_version because from outside there is only one that matters, and ?version= takes this same number.

integer format: int32
author
string | null
showing
required

The version this body carries, which differs from version when an older one was asked for. Both are here on purpose: a portal showing version 2 of a policy on version 5 needs to know it is looking at history rather than at the policy.

integer format: int32
written_at
required
string format: date-time
yaml
required

Byte for byte what somebody wrote. The compiled form is derived from it and is not handed back — there is one source of truth for what a policy says and it is the text.

string

Example

{
"managed_by": "terraform"
}

No session.

Media typeapplication/json
object
detail
string | null
status
required
integer format: int32
title
required
string
type
required
string

Example generated

{
"detail": "example",
"status": 1,
"title": "example",
"type": "example"
}

No such policy, or deleted, or no such version — one answer for all three, so asking cannot find out which.

Media typeapplication/json
object
detail
string | null
status
required
integer format: int32
title
required
string
type
required
string

Example generated

{
"detail": "example",
"status": 1,
"title": "example",
"type": "example"
}

The organization’s data is in another region (wrong-region, DAWG-159). detail names that region’s API; send the request there.

Media typeapplication/json
object
detail
string | null
status
required
integer format: int32
title
required
string
type
required
string

Example generated

{
"detail": "example",
"status": 1,
"title": "example",
"type": "example"
}

Over the organization’s request limit. Retry-After says when to try again; RateLimit-Limit is the burst.

Media typeapplication/json
object
detail
string | null
status
required
integer format: int32
title
required
string
type
required
string

Example generated

{
"detail": "example",
"status": 1,
"title": "example",
"type": "example"
}