Hello! I'm consulting the openAPI spec of the PDP ...
# permit-saas
e
Hello! I'm consulting the openAPI spec of the PDP REST API and the body structures are never defined 😕 https://pdp-api.permit.io/redoc Is there some other place I can consult?
a
Hi @Esther Álvarez Feijoo, I'm an AI assistant for Permit.io. I'll analyze available sources and get back to you shortly.
The PDP API OpenAPI spec is available at your local PDP endpoint. You can access the spec at
<http://localhost:7000/openapi.json>
and view the documentation at
<http://localhost:7000/redoc>
when running your PDP locally (assuming it's running at
localhost:7000
) (1) . Additionally, the Cloud API OpenAPI spec is available at https://api.permit.io/v2/openapi.json with documentation at https://api.permit.io/v2/redoc (2) . For PDP statistics, there's a separate API with its OpenAPI spec available at https://pdp-statistics.api.permit.io/v2/openapi.json (3) . The local PDP version should provide complete body structure definitions in its OpenAPI spec that may not be fully detailed in the online redoc version.
To learn more, see the sources I considered: [[1] PDP API Reference](https://docs.permit.io/api/pdp-api-reference) [[2] API Reference](https://docs.permit.io/api/api-reference) [[3] PDP Statistics](https://docs.permit.io/api/pdp-statistics)
Appreciate the feedback! Feel free to ask me again with additional guidance or context.
e
the localhost:7000/openapi.json doesn't specify the body requests either
o
Which api are you trying to use ?
e
the PDP one
I'm consulting the specification under https://pdp-api.permit.io/redoc or https://pdp-api.permit.io/openapi.json and they don't specify the request body structure for most of the endpoints. Neither do my local PDP in localhost:7000/openapi.json
o
Which specific api are you trying to use ? If you are talking about the local facts api- those are replicas to the control plane equivalents ( see api.permit.io/redoc and https://docs.permit.io/how-to/manage-data/local-facts-uploader/ )
👀 1
e
Ah ok: https://docs.permit.io/how-to/manage-data/local-facts-uploader/#direct-api-usage
You can use Proxy Facts to make requests to the Permit API by simply updating the URL path: Change:
<https://api.permit.io/v2/facts/{proj}/{env}/>...
To:
<http://localhost:7766/facts/>...
The routes and schema are the same as the Permit API facts routes.
Didn't know that. So even some endpoints that are not documented in the openapi of the PDP, like "role_assignments/bulk", do exist. That's great, thanks!
o
The only documented ones( with undocumented body ) are the ones that are supported in the consistent updates features, all the rest do a naive pass through to the control plane
👍 1