Skip to content

Commit 5201d05

Browse files
committed
APISHI-4914: Reflect new JWT routes in dev docs
Route for JWT validation are changing to support terraforming. This change updates them in the dev docs.
1 parent 3201d28 commit 5201d05

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/content/docs/api-shield/security/jwt-validation/api.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,11 @@ For example, the following selector will apply a rule to all operations in `v1.e
262262

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

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

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

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

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

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

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

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

603603
```bash title="Example using cURL"
604604
curl --request PATCH \
605-
"https://api.cloudflare.com/client/v4/zones/{zone_id}/api_gateway/token_validation/rules" \
605+
"https://api.cloudflare.com/client/v4/zones/{zone_id}/token_validation/rules/bulk" \
606606
--header 'Content-Type: application/json' \
607607
--data '[
608608
{

src/content/docs/api-shield/security/jwt-validation/jwt-worker.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ curl https://<your-team-name>.cloudflareaccess.com/cdn-cgi/access/certs -s | jq
132132
*/
133133
async function updateCredentials(bearer) {
134134
// Cloudflare API endpoint for credentials update
135-
const url = `https://api.cloudflare.com/client/v4/zones/${zone_id}/api_gateway/token_validation/${token_config_id}/credentials`;
135+
const url = `https://api.cloudflare.com/client/v4/zones/${zone_id}/token_validation/config/${token_config_id}/credentials`;
136136
const init = {
137137
body: await fetchCredentials(),
138138
method: "PUT",

0 commit comments

Comments
 (0)