Skip to content
Merged
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
16 changes: 8 additions & 8 deletions src/content/docs/api-shield/security/jwt-validation/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,11 @@ For example, the following selector will apply a rule to all operations in `v1.e

Operations can be included at a host level and ignored on a per-operation basis.

You can use the `POST /zones/{zone_id}/api_gateway/token_validation/rules/preview` endpoint to see the operations covered by this rule:
You can use the `POST /zones/{zone_id}/token_validation/rules/preview` endpoint to see the operations covered by this rule:

```bash title="Example using cURL"
curl --request PUT \
'https://api.cloudflare.com/client/v4/zones/{zone_id}/api_gateway/token_validation/rules/preview' \
'https://api.cloudflare.com/client/v4/zones/{zone_id}/token_validation/rules/preview' \
--header 'Content-Type: application/json' \
--data '{
"include": [
Expand Down Expand Up @@ -386,7 +386,7 @@ You can also send an empty object in the request body:

```bash title="Example using cURL"
curl --request PUT \
'https://api.cloudflare.com/client/v4/zones/{zone_id}/api_gateway/token_validation/rules/preview' \
'https://api.cloudflare.com/client/v4/zones/{zone_id}/token_validation/rules/preview' \
--header 'Content-Type: application/json' \
--data '{ }'
```
Expand Down Expand Up @@ -438,7 +438,7 @@ Replace any token configurations IDs and operation IDs with the IDs that exist i
A single request can create multiple rules. To do so, pass multiple rule objects in the JSON array of the request body.

```bash title="Example using cURL"
curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/api_gateway/token_validation/rules" \
curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/token_validation/rules/bulk" \
--header 'Content-Type: application/json' \
--data '[
{
Expand Down Expand Up @@ -529,7 +529,7 @@ Use the `PUT` command to update keys.

```bash title="Example using cURL"
curl --request PUT \
'https://api.cloudflare.com/client/v4/zones/{zone_id}/api_gateway/token_validation/{config_id}/credentials' \
'https://api.cloudflare.com/client/v4/zones/{zone_id}/token_validation/config/{config_id}/credentials' \
--header 'Content-Type: application/json' \
--data '{
"keys": [
Expand Down Expand Up @@ -565,7 +565,7 @@ The following example updates one rule and disables another:

```bash title="Example using cURL"
curl --request PATCH \
"https://api.cloudflare.com/client/v4/zones/{zone_id}/api_gateway/token_validation/rules" \
"https://api.cloudflare.com/client/v4/zones/{zone_id}/token_validation/rules/bulk" \
--header "Content-Type: application/json" \
--data '[
{
Expand All @@ -586,7 +586,7 @@ This example places rule `714d3dd0-cc59-4911-862f-8a27e22353cc` after rule `7124

```bash title="Example using cURL"
curl --request PATCH \
"https://api.cloudflare.com/client/v4/zones/{zone_id}/api_gateway/token_validation/rules" \
"https://api.cloudflare.com/client/v4/zones/{zone_id}/token_validation/rules/bulk" \
--header 'Content-Type: application/json' \
--data '[
{
Expand All @@ -602,7 +602,7 @@ This example places rule `714d3dd0-cc59-4911-862f-8a27e22353cc` before rule `712

```bash title="Example using cURL"
curl --request PATCH \
"https://api.cloudflare.com/client/v4/zones/{zone_id}/api_gateway/token_validation/rules" \
"https://api.cloudflare.com/client/v4/zones/{zone_id}/token_validation/rules/bulk" \
--header 'Content-Type: application/json' \
--data '[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ curl https://<your-team-name>.cloudflareaccess.com/cdn-cgi/access/certs -s | jq
*/
async function updateCredentials(bearer) {
// Cloudflare API endpoint for credentials update
const url = `https://api.cloudflare.com/client/v4/zones/${zone_id}/api_gateway/token_validation/${token_config_id}/credentials`;
const url = `https://api.cloudflare.com/client/v4/zones/${zone_id}/token_validation/config/${token_config_id}/credentials`;
const init = {
body: await fetchCredentials(),
method: "PUT",
Expand Down
Loading