Get one rule: a stored policy or a config rule (`policy`).
GET
/v1/policies/{name}
const url = 'https://ferritor.example.internal:7070/v1/policies/example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://ferritor.example.internal:7070/v1/policies/exampleA config rule by its config: name.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”name
required
string
A stored policy’s name (secret-path rules, may contain /), or config:… for a config rule.
Responses
Section titled “Responses”The rule.
Media typeapplication/json
A rule as listed or read.
object
actions
required
Action names (a config rule may hold admin actions).
Array<string>
all_paths
required
boolean
created_at
string format: date-time
description
required
string
identity
required
The <name> of a ferritor://<name> identity, or <prefix>/*.
string
name
required
Stored: its name. Config: config:<name>, or config:<n> by
position.
string
paths
required
Array<string>
source
required
Where a rule comes from.
string
updated_at
string format: date-time
version
Stored policies only.
integer format: int32
Example
{ "source": "config"}default
Section titled “default”An error: see error.code.
Media typeapplication/json
Every error’s body.
object
error
required
object
code
required
Match on this, never on the message.
string
message
required
For people; may change.
string
Example
{ "error": { "code": "invalid_argument" }}