Alert - Text
Definition
Name | Value | Description |
---|---|---|
Profile | Asset | An individual piece of content. |
Type | Alert | A short report of a very important event. |
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 an alert this is a single sentence of text describing the important event |
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/a77eda65-ce56-4812-ad7a-4f4bb714b038?product=paproduct:create
Response
{
"uri": "a77eda65-ce56-4812-ad7a-4f4bb714b038",
"type": "text",
"profile": "alert",
"version": "1",
"firstcreated": "2019-10-10T20:38:47Z",
"versioncreated": "2019-10-10T20:38:47Z",
"issued": "2019-10-10T20:38:47Z",
"urgency": 6,
"pubstatus": "usable",
"language": "en",
"headline": "Soccer N Ireland",
"body_text": "Northern Ireland have lost 3-1 to Holland in their Euro 2020 qualifier in Rotterdam.",
"body_html": "<p>Northern Ireland have lost 3-1 to Holland in their Euro 2020 qualifier in Rotterdam. </p>",
"subject": [
{
"code": "paservice:sport",
"name": "Sport",
"profile": "paservice",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "partOf"
},
{
"code": "paservice:sport:football",
"name": "Football",
"profile": "paservice",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "partOf"
},
{
"code": "paservice:sport:uk",
"name": "UK",
"profile": "paservice",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "partOf"
},
{
"code": "patopic:soccer",
"name": "Soccer",
"profile": "patopic",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "about"
},
{
"code": "pakeyword:n-ireland",
"name": "N Ireland",
"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": "sport:football",
"name": "Football",
"profile": "sport",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "about"
},
{
"code": "contributor:pa",
"name": "PA",
"profile": "contributor",
"scheme": "https://content.api.pressassociation.io/v1/subject",
"rel": "contributedBy"
}
],
"event": [
{
"code": "paevent:962e1b296b37188de373bea0b4898d5f890bb091f0ce0b866b062a5ee6f0e8b8",
"name": "Soccer N Ireland 10/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/a77eda65-ce56-4812-ad7a-4f4bb714b038"
}
]
}
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/a77eda65-ce56-4812-ad7a-4f4bb714b038?product=paproduct:create
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/a77eda65-ce56-4812-ad7a-4f4bb714b038</id>
<title>Press Association: Content API</title>
<updated>2019-10-11T14:23:02.192Z</updated>
<link href="https://content.api.pressassociation.io/v1/item/a77eda65-ce56-4812-ad7a-4f4bb714b038" 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/a77eda65-ce56-4812-ad7a-4f4bb714b038</id>
<author>
<name></name>
</author>
<title>
<![CDATA[Soccer N Ireland]]>
</title>
<link rel="self" href="https://content.api.pressassociation.io/v1/item/a77eda65-ce56-4812-ad7a-4f4bb714b038"/>
<link rel="alternate" href="https://content.api.pressassociation.io/v1/item/a77eda65-ce56-4812-ad7a-4f4bb714b038"/>
<link rel="related" href="https://content.api.pressassociation.io/v1/item/a77eda65-ce56-4812-ad7a-4f4bb714b038/more-like-this"/>
<published>2019-10-10T20:38:47.000Z</published>
<updated>2019-10-10T20:38:47.000Z</updated>
<content type="html">
<![CDATA[<p>Northern Ireland have lost 3-1 to Holland in their Euro 2020 qualifier in Rotterdam. </p>]]>
</content>
<category term="paservice:sport" scheme="urn:pa:subject:paservice" label="Sport"/>
<category term="paservice:sport:football" scheme="urn:pa:subject:paservice" label="Football"/>
<category term="paservice:sport:uk" scheme="urn:pa:subject:paservice" label="UK"/>
<category term="patopic:soccer" scheme="urn:pa:subject:patopic" label="Soccer"/>
<category term="pakeyword:n-ireland" scheme="urn:pa:subject:pakeyword" label="N Ireland"/>
<category term="paterritory:uk" scheme="urn:pa:subject:paterritory" label="UK"/>
<category term="sport:football" scheme="urn:pa:subject:sport" label="Football"/>
<category term="contributor:pa" scheme="urn:pa:subject:contributor" label="PA"/>
<category term="profile:alert" scheme="urn:pa:content:profile" label="alert"/>
<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/a77eda65-ce56-4812-ad7a-4f4bb714b038?product=paproduct:create
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/a77eda65-ce56-4812-ad7a-4f4bb714b038</link>
<atom:link href="https://content.api.pressassociation.io/v1/item/a77eda65-ce56-4812-ad7a-4f4bb714b038" 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>Fri, 11 Oct 2019 14:23:28 GMT</lastBuildDate>
<item>
<title>Soccer N Ireland</title>
<link>https://content.api.pressassociation.io/v1/item/a77eda65-ce56-4812-ad7a-4f4bb714b038</link>
<pubDate>Thu, 10 Oct 2019 20:38:47 GMT</pubDate>
<dc:publisher>PA</dc:publisher>
<dcterms:created>2019-10-10T20:38:47.000Z</dcterms:created>
<dcterms:modified>2019-10-10T20:38:47.000Z</dcterms:modified>
<guid isPermaLink="true">https://content.api.pressassociation.io/v1/item/a77eda65-ce56-4812-ad7a-4f4bb714b038</guid>
<content:encoded>
<![CDATA[<p>Northern Ireland have lost 3-1 to Holland in their Euro 2020 qualifier in Rotterdam. </p>]]>
</content:encoded>
<category domain="urn:pa:subject:paservice">Sport</category>
<category domain="urn:pa:subject:paservice">Football</category>
<category domain="urn:pa:subject:paservice">UK</category>
<category domain="urn:pa:subject:patopic">Soccer</category>
<category domain="urn:pa:subject:pakeyword">N Ireland</category>
<category domain="urn:pa:subject:paterritory">UK</category>
<category domain="urn:pa:subject:sport">Football</category>
<category domain="urn:pa:subject:contributor">PA</category>
<category domain="urn:pa:content:profile">alert</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