{ "opencollection": "1.0.0", "info": { "name": "Datadog Account Role API", "version": "1.0" }, "request": { "auth": { "type": "apikey", "key": "DD-API-KEY", "value": "{{DD-API-KEY}}", "placement": "header" } }, "items": [ { "info": { "name": "Role", "type": "folder" }, "items": [ { "info": { "name": "Datadog Grant Role to an Archive", "type": "http" }, "http": { "method": "POST", "url": "https://{subdomain}.{site}/api/v2/logs/config/archives/:archive_id/readers", "params": [ { "name": "archive_id", "value": "", "type": "path", "description": "The ID of the archive." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Adds a read role to an archive. ([Roles API](https://docs.datadoghq.com/api/v2/roles/))" }, { "info": { "name": "Datadog Revoke Role from an Archive", "type": "http" }, "http": { "method": "DELETE", "url": "https://{subdomain}.{site}/api/v2/logs/config/archives/:archive_id/readers", "params": [ { "name": "archive_id", "value": "", "type": "path", "description": "The ID of the archive." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Removes a role from an archive. ([Roles API](https://docs.datadoghq.com/api/v2/roles/))" }, { "info": { "name": "Datadog Get Restriction Query for a Given Role", "type": "http" }, "http": { "method": "GET", "url": "https://{subdomain}.{site}/api/v2/logs/config/restriction_queries/role/:role_id", "params": [ { "name": "role_id", "value": "", "type": "path", "description": "The ID of the role." } ] }, "docs": "Get restriction query for a given role." }, { "info": { "name": "Datadog Grant Role to a Restriction Query", "type": "http" }, "http": { "method": "POST", "url": "https://{subdomain}.{site}/api/v2/logs/config/restriction_queries/:restriction_query_id/roles", "params": [ { "name": "restriction_query_id", "value": "", "type": "path", "description": "The ID of the restriction query." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Adds a role to a restriction query." }, { "info": { "name": "Datadog Revoke Role from a Restriction Query", "type": "http" }, "http": { "method": "DELETE", "url": "https://{subdomain}.{site}/api/v2/logs/config/restriction_queries/:restriction_query_id/roles", "params": [ { "name": "restriction_query_id", "value": "", "type": "path", "description": "The ID of the restriction query." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Removes a role from a restriction query." }, { "info": { "name": "Datadog Create Role", "type": "http" }, "http": { "method": "POST", "url": "https://{subdomain}.{site}/api/v2/roles", "body": { "type": "json", "data": "{}" }, "auth": { "type": "apikey", "key": "DD-API-KEY", "value": "{{DD-API-KEY}}", "placement": "header" } }, "docs": "Create a new role for your organization." }, { "info": { "name": "Datadog Get a Role", "type": "http" }, "http": { "method": "GET", "url": "https://{subdomain}.{site}/api/v2/roles/:role_id", "params": [ { "name": "role_id", "value": "", "type": "path", "description": "The unique identifier of the role." } ], "auth": { "type": "apikey", "key": "DD-API-KEY", "value": "{{DD-API-KEY}}", "placement": "header" } }, "docs": "Get a role in the organization specified by the role’s `role_id`." }, { "info": { "name": "Datadog Update a Role", "type": "http" }, "http": { "method": "PATCH", "url": "https://{subdomain}.{site}/api/v2/roles/:role_id", "params": [ { "name": "role_id", "value": "", "type": "path", "description": "The unique identifier of the role." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "apikey", "key": "DD-API-KEY", "value": "{{DD-API-KEY}}", "placement": "header" } }, "docs": "Edit a role. Can only be used with application keys belonging to administrators." }, { "info": { "name": "Datadog Delete Role", "type": "http" }, "http": { "method": "DELETE", "url": "https://{subdomain}.{site}/api/v2/roles/:role_id", "params": [ { "name": "role_id", "value": "", "type": "path", "description": "The unique identifier of the role." } ], "auth": { "type": "apikey", "key": "DD-API-KEY", "value": "{{DD-API-KEY}}", "placement": "header" } }, "docs": "Disables a role." }, { "info": { "name": "Datadog Create a New Role by Cloning an Existing Role", "type": "http" }, "http": { "method": "POST", "url": "https://{subdomain}.{site}/api/v2/roles/:role_id/clone", "params": [ { "name": "role_id", "value": "", "type": "path", "description": "The unique identifier of the role." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "apikey", "key": "DD-API-KEY", "value": "{{DD-API-KEY}}", "placement": "header" } }, "docs": "Clone an existing role" }, { "info": { "name": "Datadog List Permissions for a Role", "type": "http" }, "http": { "method": "GET", "url": "https://{subdomain}.{site}/api/v2/roles/:role_id/permissions", "params": [ { "name": "role_id", "value": "", "type": "path", "description": "The unique identifier of the role." } ], "auth": { "type": "apikey", "key": "DD-API-KEY", "value": "{{DD-API-KEY}}", "placement": "header" } }, "docs": "Returns a list of all permissions for a single role." }, { "info": { "name": "Datadog Grant Permission to a Role", "type": "http" }, "http": { "method": "POST", "url": "https://{subdomain}.{site}/api/v2/roles/:role_id/permissions", "params": [ { "name": "role_id", "value": "", "type": "path", "description": "The unique identifier of the role." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "apikey", "key": "DD-API-KEY", "value": "{{DD-API-KEY}}", "placement": "header" } }, "docs": "Adds a permission to a role." }, { "info": { "name": "Datadog Get All Users of a Role", "type": "http" }, "http": { "method": "GET", "url": "https://{subdomain}.{site}/api/v2/roles/:role_id/users", "params": [ { "name": "role_id", "value": "", "type": "path", "description": "The unique identifier of the role." }, { "name": "page[size]", "value": "", "type": "query", "description": "Size for a given page. The maximum allowed value is 100." }, { "name": "page[number]", "value": "", "type": "query", "description": "Specific page number to return." }, { "name": "sort", "value": "example_value", "type": "query", "description": "User attribute to order results by. Sort order is **ascending** by default.\nSort order is **descending** if the field is prefixed by a negative sign,\nfor example `sort=-name`. Options: `name`, `email`, `status`." }, { "name": "filter", "value": "example_value", "type": "query", "description": "Filter all users by the given string. Defaults to no filtering." } ], "auth": { "type": "apikey", "key": "DD-API-KEY", "value": "{{DD-API-KEY}}", "placement": "header" } }, "docs": "Gets all users of a role." }, { "info": { "name": "Datadog Add a User to a Role", "type": "http" }, "http": { "method": "POST", "url": "https://{subdomain}.{site}/api/v2/roles/:role_id/users", "params": [ { "name": "role_id", "value": "", "type": "path", "description": "The unique identifier of the role." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "apikey", "key": "DD-API-KEY", "value": "{{DD-API-KEY}}", "placement": "header" } }, "docs": "Adds a user to a role." }, { "info": { "name": "Datadog Remove a User from a Role", "type": "http" }, "http": { "method": "DELETE", "url": "https://{subdomain}.{site}/api/v2/roles/:role_id/users", "params": [ { "name": "role_id", "value": "", "type": "path", "description": "The unique identifier of the role." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "apikey", "key": "DD-API-KEY", "value": "{{DD-API-KEY}}", "placement": "header" } }, "docs": "Removes a user from a role." } ] } ], "bundled": true }