Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Latest commit

 

History

History
160 lines (91 loc) · 4.68 KB

PolicyApi.md

File metadata and controls

160 lines (91 loc) · 4.68 KB

\PolicyApi

All URIs are relative to http://localhost

Method HTTP request Description
CreatePolicy Post /policies Create an Access Control Policy
DeletePolicy Delete /policies/{id} Delete an Access Control Policy
GetPolicy Get /policies/{id} Get an Access Control Policy
ListPolicies Get /policies List Access Control Policies
UpdatePolicy Put /policies/{id} Update an Access Control Polic

CreatePolicy

Policy CreatePolicy($body)

Create an Access Control Policy

The subject making the request needs to be assigned to a policy containing: { \"resources\": [\"rn:hydra:policies\"], \"actions\": [\"create\"], \"effect\": \"allow\" }

Parameters

Name Type Description Notes
body Policy [optional]

Return type

Policy

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeletePolicy

DeletePolicy($id)

Delete an Access Control Policy

The subject making the request needs to be assigned to a policy containing: { \"resources\": [\"rn:hydra:policies:<id>\"], \"actions\": [\"delete\"], \"effect\": \"allow\" }

Parameters

Name Type Description Notes
id string The id of the policy.

Return type

void (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetPolicy

Policy GetPolicy($id)

Get an Access Control Policy

The subject making the request needs to be assigned to a policy containing: { \"resources\": [\"rn:hydra:policies:<id>\"], \"actions\": [\"get\"], \"effect\": \"allow\" }

Parameters

Name Type Description Notes
id string The id of the policy.

Return type

Policy

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListPolicies

[]Policy ListPolicies($offset, $limit)

List Access Control Policies

The subject making the request needs to be assigned to a policy containing: { \"resources\": [\"rn:hydra:policies\"], \"actions\": [\"list\"], \"effect\": \"allow\" }

Parameters

Name Type Description Notes
offset int64 The offset from where to start looking. [optional]
limit int64 The maximum amount of policies returned. [optional]

Return type

[]Policy

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdatePolicy

Policy UpdatePolicy($id, $body)

Update an Access Control Polic

The subject making the request needs to be assigned to a policy containing: { \"resources\": [\"rn:hydra:policies\"], \"actions\": [\"update\"], \"effect\": \"allow\" }

Parameters

Name Type Description Notes
id string The id of the policy.
body Policy [optional]

Return type

Policy

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]