Skip to content

Commit

Permalink
Merge pull request #508 from permitio/maya/per-11852-fix-access-reque…
Browse files Browse the repository at this point in the history
…st-doc

add origin
  • Loading branch information
maya-barak authored Feb 12, 2025
2 parents 96aec57 + 03b4e6d commit fadaaa4
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions docs/api/elements/access-requests.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ To create a new access request, make a POST request to the following with the re

```bash
curl 'https://api.permit.io/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests' \
-H 'cookie: <COOKIE FROM LOGIN>'
-H 'cookie: <COOKIE FROM LOGIN>' \
-H 'origin: https://api.permit.io'
-data-raw
{
"access_request_details": {
Expand Down Expand Up @@ -135,7 +136,8 @@ The user who creates the access request must be in the tenant that the access re
To get a specific access request, make a GET request to the following.
```bash
curl 'https://api.permit.io/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}' \
-H 'cookie: <COOKIE FROM LOGIN>'
-H 'cookie: <COOKIE FROM LOGIN>' \
-H 'origin: https://api.permit.io'
```
The return access request object will look like this:
```json
Expand Down Expand Up @@ -172,7 +174,8 @@ To get a list of access requests, make the following GET request:

```bash
curl 'https://api.permit.io/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests' \
-H 'cookie: <COOKIE FROM LOGIN>'
-H 'cookie: <COOKIE FROM LOGIN>' \
-H 'origin: https://api.permit.io'
-H 'status: Status of the access request'
-H 'tenant: Tenant key of the access request'
-H 'role: Role key of the access request'
Expand Down Expand Up @@ -221,7 +224,8 @@ To update an access request, make the following PATCH request (data is optional)

```bash
curl 'https://api.permit.io/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}/reviewer' \
-H 'cookie: <COOKIE FROM LOGIN>'
-H 'cookie: <COOKIE FROM LOGIN>' \
-H 'origin: https://api.permit.io'
--data-raw
"reviewer_comment": "new employee",
"role": "ac4e70c8-d5be-48af-93eb-760f58fc91a9",
Expand Down Expand Up @@ -258,7 +262,8 @@ To approve an access request, make the following PUT request (data is optional):

```bash
curl 'https://api.permit.io/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}/approve' \
-H 'cookie: <COOKIE FROM LOGIN>'
-H 'cookie: <COOKIE FROM LOGIN>' \
-H 'origin: https://api.permit.io'
--data-raw
{
"reviewer_comment": "new employee",
Expand Down Expand Up @@ -294,7 +299,8 @@ To deny an access request, make the following PUT request (data is optional):

```bash
curl 'https://api.permit.io/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}/deny' \
-H 'cookie: <COOKIE FROM LOGIN>'
-H 'cookie: <COOKIE FROM LOGIN>' \
-H 'origin: https://api.permit.io'

--data-raw
"reviewer_comment": "need more info",
Expand Down Expand Up @@ -332,7 +338,8 @@ To cancel an access request, make the following PUT request:

```bash
curl 'https://api.permit.io/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}/cancel' \
-H 'cookie: <COOKIE FROM LOGIN>'
-H 'cookie: <COOKIE FROM LOGIN>' \
-H 'origin: https://api.permit.io'
--data-raw
{
"reason": "done onboarding last week",
Expand Down

0 comments on commit fadaaa4

Please sign in to comment.