Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update API documentation links #18510

Merged
merged 9 commits into from
Dec 16, 2024
Merged

Conversation

jacobbednarz
Copy link
Member

🚨 Don't merge 🚨

Updates all previous documentation links with the new API schema site structure.

Updates all previous documentation links with the new structure
Copy link

cloudflare-workers-and-pages bot commented Dec 4, 2024

Deploying cloudflare-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9cc9751
Status: ✅  Deploy successful!
Preview URL: https://8b414b89.cloudflare-docs-7ou.pages.dev
Branch Preview URL: https://api-next-documentation-links.cloudflare-docs-7ou.pages.dev

View logs

Copy link

github-actions bot commented Dec 4, 2024

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/ruleset-engine/rulesets-api/view/ https://api-next-documentation-links.cloudflare-docs-7ou.pages.dev/ruleset-engine/rulesets-api/view/
https://developers.cloudflare.com/page-shield/reference/page-shield-api/ https://api-next-documentation-links.cloudflare-docs-7ou.pages.dev/page-shield/reference/page-shield-api/
https://developers.cloudflare.com/logs/get-started/api-configuration/ https://api-next-documentation-links.cloudflare-docs-7ou.pages.dev/logs/get-started/api-configuration/
https://developers.cloudflare.com/waf/tools/lists/lists-api/endpoints/ https://api-next-documentation-links.cloudflare-docs-7ou.pages.dev/waf/tools/lists/lists-api/endpoints/
https://developers.cloudflare.com/security-center/intel-apis/ https://api-next-documentation-links.cloudflare-docs-7ou.pages.dev/security-center/intel-apis/
https://developers.cloudflare.com/waf/managed-rules/waf-exceptions/define-api/ https://api-next-documentation-links.cloudflare-docs-7ou.pages.dev/waf/managed-rules/waf-exceptions/define-api/
https://developers.cloudflare.com/load-balancing/pools/ https://api-next-documentation-links.cloudflare-docs-7ou.pages.dev/load-balancing/pools/
https://developers.cloudflare.com/waiting-room/reference/waiting-room-api/ https://api-next-documentation-links.cloudflare-docs-7ou.pages.dev/waiting-room/reference/waiting-room-api/
https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/start/common-api-calls/ https://api-next-documentation-links.cloudflare-docs-7ou.pages.dev/cloudflare-for-platforms/cloudflare-for-saas/start/common-api-calls/
https://developers.cloudflare.com/firewall/api/cf-filters/endpoints/ https://api-next-documentation-links.cloudflare-docs-7ou.pages.dev/firewall/api/cf-filters/endpoints/
https://developers.cloudflare.com/firewall/api/cf-firewall-rules/endpoints/ https://api-next-documentation-links.cloudflare-docs-7ou.pages.dev/firewall/api/cf-firewall-rules/endpoints/
https://developers.cloudflare.com/load-balancing/monitors/ https://api-next-documentation-links.cloudflare-docs-7ou.pages.dev/load-balancing/monitors/
https://developers.cloudflare.com/waf/managed-rules/payload-logging/configure-api/ https://api-next-documentation-links.cloudflare-docs-7ou.pages.dev/waf/managed-rules/payload-logging/configure-api/
https://developers.cloudflare.com/waf/reference/migration-guides/waf-managed-rules-migration/ https://api-next-documentation-links.cloudflare-docs-7ou.pages.dev/waf/reference/migration-guides/waf-managed-rules-migration/
https://developers.cloudflare.com/waiting-room/additional-options/create-events/ https://api-next-documentation-links.cloudflare-docs-7ou.pages.dev/waiting-room/additional-options/create-events/

@jacobbednarz jacobbednarz requested a review from a team as a code owner December 11, 2024 23:21
@pedrosousa
Copy link
Contributor

pedrosousa commented Dec 13, 2024

We should probably also update:

  • Target URLs of redirects pointing to the current API reference site. For example:

/images/cloudflare-images/upload-images/images-batch/ /api/operations/cloudflare-images-list-images 301

  • Links in YAML files like changelogs also pointing to the current site. For example:

- Add `minTLS` to response of [list custom domains](/api/operations/r2-list-custom-domains) endpoint.

cc: @crwaters16

@pedrosousa
Copy link
Contributor

pedrosousa commented Dec 13, 2024

Also noticed that API URLs with parentheses aren't included in this PR yet. Example:
/api/operations/custom-hostname-for-a-zone-delete-custom-hostname-(-and-any-issued-ssl-certificates)

Probably related to the regex you used to capture existing links?

Btw, some of these URLs have escaped parentheses characters in the MDX source. For example:
/api/operations/zone-analytics-\(-deprecated\)-get-dashboard

@pedrosousa
Copy link
Contributor

Some (apparently normal?) API links still need to be updated — found 174 search results for /api/operations/ across different documentation sections, including changelogs, notifications, and partials. Example:

You can require users to re-enter their credentials into Entra ID whenever they [re-authenticate their WARP session](/cloudflare-one/connections/connect-devices/warp/configure-warp/warp-sessions/). To configure this setting, make a [`PUT` request](/api/operations/access-identity-providers-update-an-access-identity-provider) and set the `prompt` parameter to either `login` or `select_account`.

Maybe rerunning the script will fix these occurrences?

@jacobbednarz
Copy link
Member Author

Probably related to the regex you used to capture existing links?

there wasn't a regex used here; it was taking the existing URLs and mapping them to the current documentation URLs. if it isn't picked up, one of those are missing.

Also noticed that API URLs with parentheses aren't included in this PR yet. Example:
/api/operations/custom-hostname-for-a-zone-delete-custom-hostname-(-and-any-issued-ssl-certificates)

this one is due to workaround being used to not escape the parentheses (it's called an automatic link). in the source it is laid out as

To delete a custom hostname and any issued certificates using the API, send a [`DELETE` request](</api/operations/custom-hostname-for-a-zone-delete-custom-hostname-(-and-any-issued-ssl-certificates)>).

while valid, this doesn't get picked up as the URL is wrapped with <> violating the word boundary restriction we have on the replacement to prevent it from overlapping replacements. i'll update it to allow optional <> to wrap.

Btw, some of these URLs have escaped parentheses characters in the MDX source. For example:
/api/operations/zone-analytics-(-deprecated)-get-dashboard

these won't automatically get picked up as that is not in the source of the openapi schema which was used for mapping. we can manually update these ones.

@jacobbednarz jacobbednarz requested a review from KianNH as a code owner December 16, 2024 04:18
@jacobbednarz jacobbednarz force-pushed the api-next-documentation-links branch 2 times, most recently from 9dc6169 to e9cb6bb Compare December 16, 2024 05:03
@github-actions github-actions bot added the product:queues Cloudflare Queues: https://developers.cloudflare.com/queues label Dec 16, 2024
@jacobbednarz jacobbednarz force-pushed the api-next-documentation-links branch from e9cb6bb to b296093 Compare December 16, 2024 05:06
@github-actions github-actions bot added the product:analytics Related to Analytics product label Dec 16, 2024
@jacobbednarz jacobbednarz force-pushed the api-next-documentation-links branch from b296093 to 928d22a Compare December 16, 2024 07:28
@jacobbednarz jacobbednarz merged commit 13229de into production Dec 16, 2024
11 of 12 checks passed
@jacobbednarz jacobbednarz deleted the api-next-documentation-links branch December 16, 2024 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge-yet product:ai-gateway AI Gateway: https://developers.cloudflare.com/ai-gateway/ product:analytics Related to Analytics product product:api-shield product:argo-smart-routing product:byoip Related to BYOIP product:cache Issues or PRs related to Cache product:calls product:china-network product:cloudflare-for-platforms product:cloudflare-one product:d1 D1: https://developers.cloudflare.com/d1/ product:data-localization product:dns Issues or PRs related to DNS product:durable-objects Durable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/ product:email-routing product:firewall Related to Firewall product product:fundamentals product:hyperdrive Hyperdrive: https://developers.cloudflare.com/hyperdrive/ product:images Related to Image Resizing product product:kv product:learning-paths product:load-balancing Related to Load Balancing product product:logs Related to Logs product:magic-firewall product:magic-network-monitoring product:magic-transit product:magic-wan product:network product:notifications product:page-shield Issues or PRs related to Page Shield product:pages product:queues Cloudflare Queues: https://developers.cloudflare.com/queues product:r2 R2 object storage: https://developers.cloudflare.com/r2 product:radar product:reference-architecture product:registrar Related to Registrar product product:rules Related to rules product:ruleset-engine product:security-center product:spectrum Related to Spectrum product product:speed product:ssl Related to SSL product:stream Related to Stream product product:support product:tenant product:terraform Related to Terraform product product:turnstile product:vectorize Vectorize: https://developers.cloudflare.com/vectorize/ product:waf product:waiting-room Related to Waiting Room product product:web3 product:workers Related to Workers product product:workers-ai Workers AI: https://developers.cloudflare.com/workers-ai/ product:workflows Workflows: https://developers.cloudflare.com/workflows/ size/xl
Projects
None yet
Development

Successfully merging this pull request may close these issues.