Skip to content

Commit

Permalink
PMM-12258 add the first category
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Tymchuk authored and ademidoff committed Oct 3, 2023
1 parent 4d49b16 commit 7b48e9c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docs/api/access-control.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: Access Control
slug: 'access-control'
category: '64e49e26498dc6002b62ebf4'
---

## Overview
Expand All @@ -15,9 +17,9 @@ Once enabled, restricting access to metrics can be performed by:
### Create a Percona role

```bash
curl -X POST "http://localhost/v1/management/Role/Create" \
curl -X POST "http://localhost/v1/management/Role/Create" \
-H "Authorization: Basic xxx" \
-H "Content-Type: application/json" \
-H "Content-Type: application/json" \
-d '{
"title": "My custom role role",
"filter": "{environment=\"staging\"}"
Expand All @@ -33,9 +35,9 @@ Users can be assigned roles by using the `/v1/management/Role/Assign` API.
The endpoint assigns new roles to a user. Other roles, that may have been assigned to the user previously, stay intact.

```bash
curl -X POST "http://localhost/v1/management/Role/Assign" \
curl -X POST "http://localhost/v1/management/Role/Assign" \
-H "Authorization: Basic xxx" \
-H "Content-Type: application/json" \
-H "Content-Type: application/json" \
-d '{
"user_id": 1,
"role_ids": [2, 3, 4]
Expand Down

0 comments on commit 7b48e9c

Please sign in to comment.