Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 3 additions & 18 deletions docs/api/pdp-api-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,8 @@ title: PDP API Reference

# PDP API Reference

## PDP/SDK OpenAPI spec - overview and evaluation purpose of online version
## PDP/SDK OpenAPI spec

Just like the Permit.io cloud service, the PDP exposes an OpenAPI spec which can be used to explore the API and develop your own SDKs.

You can access and view the redoc at [https://pdp-api.permit.io/redoc](https://pdp-api.permit.io/redoc) which is embedded here:

<iframe
style={{
boxShadow: "0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24)",
backgroundColor: "#FDFCFC",
maxWidth: "80vw",
}}
src={"https://pdp-api.permit.io/redoc"}
width={"1080px"}
height={"600px"}
/>

## PDP/SDK OpenAPI spec - local version

Just like the Permit.io cloud service, the local PDP exposes an OpenAPI spec which can be used to develop your own SDKs.
Assuming you're running your PDP at `localhost:7000` you can access the spec at `http://localhost:7000/openapi.json` and view the docs at `http://localhost:7000/redoc`.
Assuming you're running your PDP at `localhost:7000` you can access the spec at `http://localhost:7000/openapi.json` and view the docs at `http://localhost:7000/redoc`.
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ curl --location 'http://localhost:7766/allowed_url' \
}'
```

You can see more details about the payload in the [PDP API Redoc](https://pdp-api.permit.io/redoc#tag/Authorization-API/operation/is_allowed_url_allowed_url_post)
You can see more details about the payload in the [PDP API Reference](/api/pdp-api-reference)
4 changes: 2 additions & 2 deletions docs/sdk/nodejs/all-tenants.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ title: All Tenants Check Examples
To validate permissions irrespective of the tenant, you can use the permit.AllTenantsCheck function. This function determines if a user has permissions for a specified action
on a resource across all tenants, the response will be a list of tenants in which the user is allowed to perform the request.
:::note
You can also find information about the All tenants check in the [Permit Authorization Redoc](https://pdp-api.permit.io/redoc#tag/Authorization-API/operation/is_allowed_all_tenants_allowed_all_tenants_post).
You can also find information about the All tenants check in the [PDP API Reference](/api/pdp-api-reference).
:::


Expand All @@ -23,7 +23,7 @@ To perform this check, send a GET request to the `/allowed/all-tenants` endpoint
- **sdk**: The identifier for the SDK making the request.

```bash
curl 'https://pdp-api.permit.io/allowed/all-tenants' \
curl 'http://localhost:7766/allowed/all-tenants' \
-X GET \
-H 'Authorization: Bearer API_SECRET_KEY' \
-D '{ "user": "employee1", "action": "read", "resource": "document", "context": {}, "sdk": "node" }'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
curl https://pdp-api.permit.io/authorized_users \
curl http://localhost:7766/authorized_users \
--request POST \
--header "Authorization: Bearer YOUR_SECRET_TOKEN" \
--header "Content-Type: application/json" \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
curl https://pdp-api.permit.io/user-permissions \
curl http://localhost:7766/user-permissions \
--request POST \
--header "Authorization: Bearer YOUR_SECRET_TOKEN" \
--header "Content-Type: application/json" \
Expand Down