Attributions and Copyright in CDS
Where is the copyright information inside of CDS? How should a user of CDS determine “ownership” of content?
This is handled primarily by the branding array in CDS.
Branding can be one-to-many, meaning we can have one document that is meant to be branded by multiple services. This is different from previous notions of copyright or attribution found in older APIs at NPR.
Story API Attributions in detail
In the legacy Story API, attributions looked like the following:
<div class="fullattribution">Copyright 2024 Utah Public Radio</div>
This would appear at the end of the story text - encapsulated within the last paragraph of text of the story. The attribution is there primarily for purposes of showing who published the story.
How this worked is that anytime a user would publish to Story API (“Ingest a story”), they would have to use an “OrgId”. This Org ID is mapped to metadata in the Station API, including things like the station website, whether the ID maps to a network and so on. All of this data would be leveraged to show the attribution. In the legacy Story API, the attribution included the name of the Org as well as the URL to their website.
How CDS deals with attribution
In CDS there is no notion of an explicit “attribution” to any entity. Instead, documents can have multiple branding services inside a ‘branding’ array. These services in this array can point to any valid HTTP URL - the status quo today is to use URLs pointing to the Organization V4 service (See the Organization Service documentation).
This has several advantages over the older system:
- Branding of a story (Who is attributed as writing or contributing) can be flexible in this case
- This allows for ad-hoc collaborations in articles being referenced - we can see from the “branding” array who contributed/has a hand in making the content
- Services are not limited to stations, they can be any business entity (e.g. Kaiser Health, PRX, etc.)
How you, as a CDS user, can roll-your-own Attribution
This leaves us with the question of how to do attributions in the CDS space. The flexibility mentioned above gives you freedom to both implement the same method in the legacy Story API as well as come up with your own method.
- For each item in the branding array:
- Follow the
href
and note thedisplayName
inside the brand object of the returned results. This should look like e.g. (Taken from https://organization.api.npr.org/v4/services/s1):
- Follow the
{
"id": "s1",
"name": "NPR Service",
"brand": {
"displayName": "NPR",
"logos": [
{
"href": "https://media.npr.org/images/stations/logos/npr.gif",
"contentType": "image/gif",
"height": 46,
"width": 138,
"aspectRatio": "3:1"
},
{
"href": "https://media.npr.org/images/stations/nprone_logos/npr.png",
"contentType": "image/png",
"height": 190,
"width": 450,
"aspectRatio": "2.37:1"
}
]
},
"generated": "Fri Jun 21 2024 07:00:47 GMT+0000 (Coordinated Universal Time)"
}
- Take the displayName of each result and insert it into a
div
element like so:
<div class="attribution" id="myattribution">Copyright 2024, NPR</div>