Asset - Text
Definition
Name | Value | Description |
---|---|---|
Profile | Asset | An individual piece of content. |
Type | Text | An item comprised of textual content. |
Important Metadata
Name | Description |
---|---|
Id | The unique id of the content item |
First Created | The timestamp of when the first version of this content item was published. |
Version Created | The timestamp of when the most recent version of this content item was published. |
Content | The main content of the item. In the case of a text asset this will be several paragraphs of text. This could be an update to a story, a quote or transcript of a speech. |
Topic | PA Specific metadata to define an event or story. For more information please see Subject FAQs. |
Keyword | PA Specific metadata to define an event or story. For more information please see Subject FAQs. |
Service | The service that this content is part of inside of a product. For more information please see Service FAQ. |
Ninjs (JSON)
Request
curl \
-H "Accept: application/json" \
-H "apikey: <API KEY>" \
https://content.api.pressassociation.io/v1/item/9f1ed634-c515-4b6c-9c8b-54fc7494ce61?product=paproduct:now
Response
{
"uri": "9f1ed634-c515-4b6c-9c8b-54fc7494ce61",
"type": "text",
"profile": "asset",
"version": "1",
"firstcreated": "2019-10-16T11:37:54Z",
"versioncreated": "2019-10-16T11:37:54Z",
"issued": "2019-10-16T11:37:54Z",
"urgency": 6,
"pubstatus": "usable",
"language": "en",
"headline": "Royal Tour",
"body_text": "The Duke and Duchess of Cambridge have visited a village destroyed by flooding in 2015 during the third day of their tour of Pakistan.\n\nThe couple visited Bumburet, in the Chitral region, where they witnessed an emergency response drill which included demonstrations of how members of the community carry casualties over a river.",
"body_html": "<p>The Duke and Duchess of Cambridge have visited a village destroyed by flooding in 2015 during the third day of their tour of Pakistan.</p><p>The couple visited Bumburet, in the Chitral region, where they witnessed an emergency response drill which included demonstrations of how members of the community carry casualties over a river.</p>",
"subject": [
{
"code": "paservice:news",
"name": "News",
"profile": "paservice",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "partOf"
},
{
"code": "paservice:news:uk",
"name": "UK",
"profile": "paservice",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "partOf"
},
{
"code": "patopic:royal",
"name": "Royal",
"profile": "patopic",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "about"
},
{
"code": "pakeyword:tour",
"name": "Tour",
"profile": "pakeyword",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "about"
},
{
"code": "paterritory:uk",
"name": "UK",
"profile": "paterritory",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "intendedFor"
},
{
"code": "paselection:curated",
"name": "Curated",
"profile": "paselection",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "selectedAs"
},
{
"code": "contributor:pa",
"name": "PA",
"profile": "contributor",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "contributedBy"
}
],
"event": [
{
"code": "paevent:11b134556c8371f5d994f167a40c18c937eb0f19663450b79fe2f88d38cb0dfe",
"name": "Royal Tour 16/10/2019",
"profile": "paevent",
"scheme": "https://content.api.pressassociation.io/v1/event",
"rel": "partOf"
}
],
"links": [
{
"rel": "self",
"href": "https://content.api.pressassociation.io/v1/item/9f1ed634-c515-4b6c-9c8b-54fc7494ce61"
}
]
}
Important Metadata Mappings
Name | JSON Path |
---|---|
Id | uri |
First Created | firstcreated |
Version Created | versioncreated |
Content | body_html |
Topic | subject[?(@.profile == 'patopic')] |
Keyword | subject[?(@.profile == 'pakeyword')] |
Service | subject[?(@.profile == 'paservice')] |
ATOM
Request
curl \
-H "Accept: application/atom+xml" \
-H "apikey: <API KEY>" \
https://content.api.pressassociation.io/v1/item/9f1ed634-c515-4b6c-9c8b-54fc7494ce61?product=paproduct:now
Response
<?xml version="1.0" encoding="utf-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:pa="http://api.pressassociation.io/mrss/" xmlns:snf="http://www.smartnews.be/snf/">
<id>https://content.api.pressassociation.io/v1/item/9f1ed634-c515-4b6c-9c8b-54fc7494ce61</id>
<title>Press Association: Content API</title>
<updated>2019-10-16T12:18:26.482Z</updated>
<link href="https://content.api.pressassociation.io/v1/item/9f1ed634-c515-4b6c-9c8b-54fc7494ce61" rel="self"/>
<opensearch:itemsPerPage>1</opensearch:itemsPerPage>
<opensearch:totalResults>1</opensearch:totalResults>
<opensearch:startIndex>0</opensearch:startIndex>
<snf:logo>
<url>http://logo.static.press.net/pa-logo-smartnews.png</url>
</snf:logo>
<entry>
<id>https://content.api.pressassociation.io/v1/item/9f1ed634-c515-4b6c-9c8b-54fc7494ce61</id>
<author>
<name></name>
</author>
<title>
<![CDATA[Royal Tour]]>
</title>
<link rel="self" href="https://content.api.pressassociation.io/v1/item/9f1ed634-c515-4b6c-9c8b-54fc7494ce61"/>
<link rel="alternate" href="https://content.api.pressassociation.io/v1/item/9f1ed634-c515-4b6c-9c8b-54fc7494ce61"/>
<link rel="related" href="https://content.api.pressassociation.io/v1/item/9f1ed634-c515-4b6c-9c8b-54fc7494ce61/more-like-this"/>
<published>2019-10-16T11:37:54.000Z</published>
<updated>2019-10-16T11:37:54.000Z</updated>
<content type="html">
<![CDATA[<p>The Duke and Duchess of Cambridge have visited a village destroyed by flooding in 2015 during the third day of their tour of Pakistan.</p><p>The couple visited Bumburet, in the Chitral region, where they witnessed an emergency response drill which included demonstrations of how members of the community carry casualties over a river.</p>]]>
</content>
<category term="paservice:news" scheme="urn:pa:subject:paservice" label="News"/>
<category term="paservice:news:uk" scheme="urn:pa:subject:paservice" label="UK"/>
<category term="patopic:royal" scheme="urn:pa:subject:patopic" label="Royal"/>
<category term="pakeyword:tour" scheme="urn:pa:subject:pakeyword" label="Tour"/>
<category term="paterritory:uk" scheme="urn:pa:subject:paterritory" label="UK"/>
<category term="paselection:curated" scheme="urn:pa:subject:paselection" label="Curated"/>
<category term="contributor:pa" scheme="urn:pa:subject:contributor" label="PA"/>
<category term="profile:asset" scheme="urn:pa:content:profile" label="asset"/>
<category term="type:text" scheme="urn:pa:content:type" label="text"/>
</entry>
</feed>
Important Metadata Mappings
Name | JSON Path |
---|---|
Id | //feed/entry/id |
First Created | //feed/entry/published |
Version Created | //feed/entry/updated |
Content | //feed/entry/content[@scheme="urn:pa:subject:patopic"] |
Topic | //feed/entry/content[@type="html"] |
Keyword | //feed/entry/category[@scheme="urn:pa:subject:pakeyword"] |
Service | //feed/entry/category[@scheme="urn:pa:subject:paservice"] |
RSS
Request
curl \
-H "Accept: application/rss+xml" \
-H "apikey: <API KEY>" \
https://content.api.pressassociation.io/v1/item/9f1ed634-c515-4b6c-9c8b-54fc7494ce61?product=paproduct:now
Response
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:pa="http://api.pressassociation.io/mrss/" xmlns:snf="http://www.smartnews.be/snf/">
<channel>
<title>Press Association: Content API</title>
<description>A collection of content items</description>
<language>en</language>
<link>https://content.api.pressassociation.io/v1/item/9f1ed634-c515-4b6c-9c8b-54fc7494ce61</link>
<atom:link href="https://content.api.pressassociation.io/v1/item/9f1ed634-c515-4b6c-9c8b-54fc7494ce61" rel="self"/>
<opensearch:itemsPerPage>1</opensearch:itemsPerPage>
<opensearch:totalResults>1</opensearch:totalResults>
<opensearch:startIndex>0</opensearch:startIndex>
<snf:logo>
<snf:url>http://logo.static.press.net/pa-logo-smartnews.png</snf:url>
</snf:logo>
<lastBuildDate>Wed, 16 Oct 2019 12:18:37 GMT</lastBuildDate>
<item>
<title>Royal Tour</title>
<link>https://content.api.pressassociation.io/v1/item/9f1ed634-c515-4b6c-9c8b-54fc7494ce61</link>
<pubDate>Wed, 16 Oct 2019 11:37:54 GMT</pubDate>
<dc:publisher>PA</dc:publisher>
<dcterms:created>2019-10-16T11:37:54.000Z</dcterms:created>
<dcterms:modified>2019-10-16T11:37:54.000Z</dcterms:modified>
<guid isPermaLink="true">https://content.api.pressassociation.io/v1/item/9f1ed634-c515-4b6c-9c8b-54fc7494ce61</guid>
<content:encoded>
<![CDATA[<p>The Duke and Duchess of Cambridge have visited a village destroyed by flooding in 2015 during the third day of their tour of Pakistan.</p><p>The couple visited Bumburet, in the Chitral region, where they witnessed an emergency response drill which included demonstrations of how members of the community carry casualties over a river.</p>]]>
</content:encoded>
<category domain="urn:pa:subject:paservice">News</category>
<category domain="urn:pa:subject:paservice">UK</category>
<category domain="urn:pa:subject:patopic">Royal</category>
<category domain="urn:pa:subject:pakeyword">Tour</category>
<category domain="urn:pa:subject:paterritory">UK</category>
<category domain="urn:pa:subject:paselection">Curated</category>
<category domain="urn:pa:subject:contributor">PA</category>
<category domain="urn:pa:content:profile">asset</category>
<category domain="urn:pa:content:type">text</category>
</item>
</channel>
</rss>
Important Metadata Mappings
Name | JSON Path |
---|---|
Id | //rss/channel/item/guid |
First Created | //rss/channel/item/dcterms:created |
Version Created | //rss/channel/item/dcterms:modified |
Content | //rss/channel/item/content:encoded |
Topic | //rss/channel/item/category[@domain="urn:pa:subject:patopic"] |
Keyword | //rss/channel/item/category[@domain="urn:pa:subject:pakeyword"] |
Service | //rss/channel/item/category[@domain="urn:pa:subject:paservice"] |
Updated about 5 years ago