Skip to content

Update docs on Content.id (CAPI id) to reflect Evolving URLs - #335

Merged
rtyley merged 2 commits into
mainfrom
update-docs-on-content-id-field-for-evolving-urls
Sep 17, 2026
Merged

rtyley merged 2 commits into
mainfrom
update-docs-on-content-id-field-for-evolving-urls

Conversation

@rtyley

@rtyley rtyley commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

The Evolving URLs work took place in 2020-2021, this means that the Content.id (CAPI id) is no longer guaranteed to be the URL path of the content!

In our current AB-testing work, this has led to some confusion, and I've seen LLMs saying incorrect things, due to them taking this line of documentation as gospel:

* The id of this item of content: this should always be the path to the item on www.theguardian.com

See also historical PRs on Evolving URLs:

@rtyley rtyley added the maintenance Departmental tracking: maintenance work, not a fix or a feature label Sep 16, 2026
@rtyley
rtyley requested a balanced review from Copilot September 16, 2026 15:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The documentation-only change is clear, internally consistent, and matches the stated purpose.

Pull request overview

Updates Content.id documentation to reflect immutable CAPI IDs and evolving content URLs.

Changes:

  • Clarifies that live CAPI IDs are immutable and should be treated as opaque.
  • Documents URL changes and Preview CAPI behavior.
File summaries
File Description
models/src/main/thrift/content/v1.thrift Corrects and expands Content.id documentation.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@rtyley
rtyley marked this pull request as ready for review September 16, 2026 15:58
@rtyley
rtyley requested a review from a team as a code owner September 16, 2026 15:59
@rtyley
rtyley requested a review from JustinPinner September 16, 2026 15:59
* changed by Editorial Staff. In this case, in the Content API, the content's webUrl will change, but the CAPI id
* will *not*.
*
* Note that in our internal Preview CAPI service, the CAPI id is *not* fixed until the content is launched.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All true, might be worth noting that regardless of changes to the actual path via the evolve url process, the content's id will always lead to the correct document, and the id remains fixed unless it is taken down and launched with a new one.

@rtyley rtyley Sep 17, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thanks, I hadn't realised that a CAPI id can change if an item of content is taken-down, has its path altered, and is then republished - I did that just now to an article in CODE to see it happen:

I can see why that might be necessary, for instance if the URL path itself contains a libel!

I've added a note regarding that aspect in 029b091

@JustinPinner JustinPinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 (my comment is non-blocking)

…f content is taken down and republished

Updated in response to:

* #335 (review)
@rtyley
rtyley merged commit cea04a5 into main Sep 17, 2026
4 checks passed
@rtyley
rtyley deleted the update-docs-on-content-id-field-for-evolving-urls branch September 17, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Departmental tracking: maintenance work, not a fix or a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants