{ "opencollection": "1.0.0", "info": { "name": "API Reference subpackage_bulkSync subpackage_permissions.subpackage_permissions/policies API", "version": "1.0.0" }, "items": [ { "info": { "name": "subpackage_permissions.subpackage_permissions/policies", "type": "folder" }, "items": [ { "info": { "name": "List Policies", "type": "http" }, "http": { "method": "GET", "url": "https://app.polytomic.com/api/permissions/policies", "headers": [ { "name": "Authorization", "value": "" }, { "name": "X-Polytomic-Version", "value": "" } ] }, "docs": "Lists all policies in the caller's organization.\n\nEach policy binds one or more roles to a set of resources, controlling what\nactions members with those roles can perform on those resources.\n\nTo inspect a specific policy in detail, use\n[`GET /api/permissions/policies/{id}`](../../../api-reference/permissions/policies/get)." }, { "info": { "name": "Create Policy", "type": "http" }, "http": { "method": "POST", "url": "https://app.polytomic.com/api/permissions/policies", "headers": [ { "name": "Authorization", "value": "" }, { "name": "X-Polytomic-Version", "value": "" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Creates a new policy.\n\nA policy binds one or more roles to a set of resources, granting members who\nhold those roles the actions defined by them. Roles must already exist before\nthey are referenced in a policy; create roles using\n[`POST /api/permissions/roles`](../../../api-reference/permissions/roles/create)." }, { "info": { "name": "Get Policy", "type": "http" }, "http": { "method": "GET", "url": "https://app.polytomic.com/api/permissions/policies/:id", "headers": [ { "name": "Authorization", "value": "" }, { "name": "X-Polytomic-Version", "value": "" } ], "params": [ { "name": "id", "value": "", "type": "path" } ] }, "docs": "Returns a single policy by ID, including all action/role bindings it defines.\n\nReturns the full set of action/role bindings defined by the policy, including\nthe resources it applies to." }, { "info": { "name": "Update Policy", "type": "http" }, "http": { "method": "PUT", "url": "https://app.polytomic.com/api/permissions/policies/:id", "headers": [ { "name": "Authorization", "value": "" }, { "name": "X-Polytomic-Version", "value": "" } ], "params": [ { "name": "id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Updates an existing policy.\n\nThe update is a **full replacement** of the policy's bindings. Any role or\nresource binding not included in the request body is removed. To make a\npartial change, fetch the current policy with\n[`GET /api/permissions/policies/{id}`](../../../../api-reference/permissions/policies/get), modify the relevant bindings,\nand send the complete object back." }, { "info": { "name": "Delete Policy", "type": "http" }, "http": { "method": "DELETE", "url": "https://app.polytomic.com/api/permissions/policies/:id", "headers": [ { "name": "Authorization", "value": "" }, { "name": "X-Polytomic-Version", "value": "" } ], "params": [ { "name": "id", "value": "", "type": "path" } ] }, "docs": "Deletes a policy.\n\nDeletion is permanent. Any access that was granted solely through this policy\nis revoked immediately for all users who depended on it." } ] } ], "bundled": true }