API Documentation

Content

Content resources give access to Metro Publisher content types, such as an article, recipe, review or roundup.

/{iid}/content

GET

Retrieve a batched collection of content objects.

Each item returned by this resource is one of the Metro Publisher content types. Using the ctypes parameter, you can restrict items to specific content types.

Note

The parameters sections and blogs are mutually exclusive, i.e. you can only pass either one of them to this resource but not both at the same time. The parameters can contain one or more UUIDs.

Sample Call

Get articles and reviews:

>>> GET("/123/content?ctypes=articles-reviews&fields=title-url-issued-thumb_url&order=title&rpp=2")
{'items': [['Article 01',
            'https://api.metropublisher.com/123/content/799d6c73-fe75-11df-837b-001ec21bff9e',
            '2010-12-02T16:37:00',
            'https://api.metropublisher.com/123/files/f6294df8-9023-3687-865b-af22de234abf/download/1291309162'],
           ['Review 01',
            'https://api.metropublisher.com/123/content/a33b5997-00ca-11e0-b096-001ec21bff9e',
            '2010-12-05T15:51:00',
            'https://api.metropublisher.com/123/files/5a778106-5e32-3af2-9bb6-97aeacf01c8e/download/1291558800']],
 'next': 'ctypes=articles-reviews&fields=title-url-issued-thumb_url&order=title&page=2&rpp=2'}

Get only content objects issued before December 4th, 2010:

>>> GET("/123/content?ctypes=articles-reviews&fields=title-url-issued&issued=_2010-12-04&rpp=2")
{'items': [['Article 01',
            'https://api.metropublisher.com/123/content/799d6c73-fe75-11df-837b-001ec21bff9e',
            '2010-12-02T16:37:00']]}

Get all content objects associated with the blog with the UUID '441d7168-d0c0-11e1-a944-001b63a90f63':

>>> GET("/123/content?fields=title&blogs=441d7168-d0c0-11e1-a944-001b63a90f63")
{'items': [['Blog Entry 01'], ['Blog Entry 02'], ['Blog Entry 03']]}

Get the title of the content object and the UUID for the location associated with the content object, if available/applicable:

>>> GET("/123/content?fields=title-location_uuid&rpp=6&order=title")
{'items': [['Article 01', None],
           ['Blog Entry 01', None],
           ['Blog Entry 02', None],
           ['Blog Entry 03', None],
           ['Event 01', '22222222-2222-2222-2222-222222222222'],
           ['Review 01', '11111111-1111-1111-1111-111111111111']],
 'next': 'fields=title-location_uuid&order=title&page=2&rpp=6'}

Parameters

page:

The page number to retrieve.

optional

Default: 1

Values must not be lower than 1

rpp:

The number of results per page.

optional

Default: 20

Values must not be lower than 1 or higher than 100

state:

optional

Default: 'live' if the user is a public user else None.

Example value: "draft"

Values must be any of the following

live:

Only published content with issued dates in the past

published:

Only published

Access is restricted to users with these roles:

draft:

Only draft

Access is restricted to users with these roles:

ctypes:

The content types to retrieve (if not specified, return all content types).

optional

Default: None

Every element of the list must be any of the following

articles:

all articles

blogentries:

all content associated with a blog

events:

all events

recipes:

all recipes

reviews:

all reviews

reviews_album:

all album reviews

reviews_book:

all book reviews

reviews_location:

all location reviews

reviews_movie:

all movie reviews

reviews_product:

all product reviews

roundups_content:

all content roundups

roundups_location:

all location roundups

videos:
all videos

Deprecated since MP 2.9:

With MP 2.9, the video articles are converted to normal articles with the video information moved into the article's media slots.

(also see ChangeLog)

fields:

A dash-separated list of fields to return.

optional

Default: ['url']

Example value: 'blog_uuid-website'

Every element of the list must be any of the following

blog_uuid:

The UUID of the blog the content is in.

content_type:

The content type, e.g. 'article'.

created:

The date/time that the content object was created.

Access is restricted to users with these roles:

description:

Description of the content object

email:

Event only: The email for contacting the event organizer.

event_status_type:

Event only: The status of the event, such as 'cancelled' or 'rescheduled'.

ical_uid:

Event only: The event's unique identifier, see RFC 5545.

Access is restricted to users with these roles:

issued:

The date/time that the content was issued.

location_uuid:

The UUID of the associated location for events and location reviews.

media:

A list of dictionaries with media information for the content.

modified:

The date/time that the content object was last modified.

Access is restricted to users with these roles:

phone:

Event only: A phone number to contact the event organizer.

prices:

Event only: The event's prices.

rrule:

Event only: Recurrence rule of the event.

section_uuid:

The UUID of the section the content is in.

sponsored:

Event only: The event is sponsored. Only available with the Directory Add-on.

state:

The status of the content, i.e. 'draft' or 'published'.

thumb_url:

The API download url to an image for this content object, to be used outside the content object.

title:

The title

url:

URL to the content

urlname:

The urlname

user_email:

Event only: The email of the user that submitted the event.

uuid:

The UUID of the content

website:

Event only: Website of the event.

sections:

A underscore-separated list of section UUIDs for which to return content.

optional

Default: None

The parameters sections and blogs are mutually exclusive.

blogs:

A underscore-separated list of blog UUIDs for which to return content.

Deprecated since MP 2.10:

With MP 2.10, sections are enhanced to work like blogs. Old blogs will be available until merged to sections manually via the Metro Pulisher Administration Interface.

(also see ChangeLog)

optional

Default: None

Values must obey all the conditions

  • If this parameter is used, ctypes must be None or a subset of ['articles', 'reviews']

  • The parameters sections and blogs are mutually exclusive.

issued:

A date/time period within which the content was issued. First element is the start of the period, second element is the end of the period. Either start or end can be None.

optional

Default: None

Element 0 (dtstart):

optional

Default: None

Element 1 (dtend):

optional

Default: None

order:

A dash-separated list of orderings to apply

optional

Default: []

Example value: 'issued-urlname.desc'

Every element of the list must be any of the following

issued:Sort by issue date ascending
issued.asc:Sort by issue date ascending
issued.desc:Sort by issue date descending
sort_title:Sort by sort_title (if exists) or title ascending
sort_title.asc:Sort by sort_title (if exists) or title ascending
sort_title.desc:Sort by sort_title (if exists) or title descending
title:Sort by title ascending
title.asc:Sort by title ascending
title.desc:Sort by title descending
urlname:Sort by urlname ascending
urlname.asc:Sort by urlname ascending
urlname.desc:Sort by urlname descending
uuid:Sort by UUID ascending
uuid.asc:Sort by UUID ascending
uuid.desc:Sort by UUID descending

/{iid}/content/{uuid}

DELETE

Deletes a content object.

Sample Call

>>> DELETE("/123/content/799d6c73-fe75-11df-837b-001ec21bff9e")
{'msg': 'deleted'}

GET

Retrieve one content object.

This resource returns information about one specific content object, e.g. an article or event. What information is returned depends on the role of the API key. Some attributes are not publicly available.

Sample Call

>>> GET("/123/content/799d6c73-fe75-11df-837b-001ec21bff9e")
{'blog_uuid': None,
 'canonical_url': None,
 'content': '<p>Sed elit. In blandit sapien at nisi. ...</p>',
 'content_type': 'article',
 'created': '2010-12-02T16:37:14.422690',
 'description': 'This is descriptive text for an article. ... ',
 'evergreen': False,
 'feature_image_alttext': None,
 'feature_image_caption': None,
 'feature_image_url': 'https://api.metropublisher.com/123/files/f6294df8-9023-3687-865b-af22de234abf',
 'feature_thumb_url': 'https://api.metropublisher.com/123/files/f6294df8-9023-3687-865b-af22de234abf',
 'header_image_url': None,
 'issued': '2010-12-02T16:37:00',
 'meta_description': None,
 'meta_title': None,
 'modified': '2010-12-02T16:37:14.422690',
 'perma_url_path': None,
 'print_description': None,
 'section_uuid': 'c1c1b3dc-d24a-11e1-b1d7-001b63a90f63',
 'state': 'published',
 'sub_title': None,
 'teaser_image_url': 'https://api.metropublisher.com/123/files/f6294df8-9023-3687-865b-af22de234abf',
 'title': 'Article 01',
 'urlname': 'article-01',
 'uuid': '799d6c73-fe75-11df-837b-001ec21bff9e',
 'video_uuid': None}

Return Value

Additional return values for type: article

blog_uuid:The UUID of the blog the content object is associated with (None if content object is not part of a blog).
evergreen:The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.
section_uuid:The UUID of the section the content object is associated with (None if content object resides outside any section).

Additional return values for type: event

allday:
canonical:

Access is restricted to users with these roles:

dtend:

The end date/time of either the event or its first occurrence. See also RFC 5545.

dtstart:

The start date/time of either the event or its first occurrence. See also RFC 5545.

email:

Email to contact the event organizer.

event_source:

Access is restricted to users with these roles:

event_status_type:

The status of the event, such as 'cancelled'.

exdates:

If the event is a recurring event, this is a list of all the exceptions to the recurrence rule. See also RFC 5545.

ical_uid:

The event's unique identifier, see RFC 5545.

Access is restricted to users with these roles:

location_alt:

An alternative for location_uuid. It can be used if the location is not a reusable location and was therefore not created in the Metro Publisher instance. This may be the case, for example, if it is not a real location and does not have usable location data such as an address or geolocation.

Access is restricted to users with these roles:

location_uuid:

The location UUID associated with this content object.

phone:

A phone number to contact the event organizer.

prices:

Price information for the event.

rdates:

If the event is a recurring event, this is a list of all additional occurrences for the event. See also RFC 5545.

recurrence_id:

The recurrence_id for this event, see RFC 5545.

Access is restricted to users with these roles:

rrule:

a dictionary with the recurrence rule settings or None

sort_title:
sponsored:

The event is sponsored. Only available with Directory Add-on.

Note

only available for instances with Directory Add-On

time_type:

Access is restricted to users with these roles:

user_email:

Email of the user who submitted the event.

website:

The url to an external event website.

canonical_url:

Returns None if the MP-internal URL is the canonical URL of the content.

content:

see Content-XML

content_type:

see Content Types

created:

The creation date/time in ISO 8601 format. See Dates and Times.

Access is restricted to users with these roles:

description:

A short description of the content.

header_image_url:

URL of the wide feature image.

issued:

The date/time the content object was issued (see issued and Dates and Times).

meta_description:

The text for the HTML meta description tag on the content page.

meta_title:

The text for the HTML meta title tag on the content page.

modified:

The date/time of last modification in ISO 8601 format. See Dates and Times.

Access is restricted to users with these roles:

perma_url_path:

The permanent path to the content object (see Consideration When Migrating Content).

Note

Should only be used if the content is imported from another system and has already acquired significant social media / search engine recognition.

print_description:
state:

The state of the content object, i.e. 'draft' or 'published'.

Access is restricted to users with these roles:

sub_title:

The content sub title

teaser_image_url:

URL of the teaser image.

title:

The content title

urlname:

see urlname

uuid:

Additional return values for type: recipe

evergreen:The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.
recipe_cook_time:The cooking time in minutes.
recipe_image_url:
recipe_ingredients:A list of dictionaries with the recipe ingredients.
recipe_prep_time:The preparation time in minutes.
recipe_yield:The recipe yield, e.g. '1 loaf'.

Additional return values for type: review_album

album_buy_link_text:

Deprecated since MP 3.x:

Please use the field album_buy_urls.

(also see ChangeLog)

album_buy_url:

Deprecated since MP 3.x:

Please use the field album_buy_urls.

(also see ChangeLog)

album_buy_urls:

A list of dictionaries with the URL (and link text) to external websites to buy the album.

New in MP 3.x:

Object Reviews (album, book, product) can now have multiple non-provider buy urls.

(also see ChangeLog)

album_image_url:
album_issued:

The date when the album was / is going to be published. This can be some general text, such as 'October 2014', or a date as a string, such as '2014-06-05'.

album_provider_urls:

A list of Amazon or iTunes urls.

album_title:

The title of the album that is being reviewed.

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

rating:

The rating for the object that is being reviewed.

Additional return values for type: review_book

book_buy_link_text:

Deprecated since MP 3.x:

Please use the field book_buy_urls.

(also see ChangeLog)

book_buy_url:

Deprecated since MP 3.x:

Please use the field book_buy_urls.

(also see ChangeLog)

book_buy_urls:

A list of dictionaries with the URL (and link text) to external websites to buy the book.

New in MP 3.x:

Object Reviews (album, book, product) can now have multiple non-provider buy urls.

(also see ChangeLog)

book_image_url:
book_isbn:

The ISBN of the book that is being reviewed.This must be a valid ISBN-10 or ISBN-13.

book_issued:

The date when the book was / is going to be published. This can be some general text, such as 'October 2014', or a date as a string, such as '2014-06-05'.

book_provider_urls:

A list of Amazon or iTunes urls.

book_title:

The title of the book that is being reviewed.

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

rating:

The rating for the object that is being reviewed.

Additional return values for type: review_location

blog_uuid:The UUID of the blog the content object is associated with (None if content object is not part of a blog).
evergreen:The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.
location_uuid:The location UUID associated with this content object.
rating:The rating for the object that is being reviewed.
section_uuid:The UUID of the section the content object is associated with (None if content object resides outside any section).

Additional return values for type: review_movie

evergreen:The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.
movie_buy_urls:A list of dictionaries with the URL (and link text) to external websites to buy the movie.
movie_duration:The movie duration, in minutes.
movie_image_url:
movie_issued:The date when the movie was / is going to be published. This can be some general text, such as 'October 2014', or a date as a string, such as '2014-06-05'.
movie_provider_urls:A list of Amazon or iTunes urls.
movie_title:The title of the movie that is being reviewed.
rating:The rating for the object that is being reviewed.

Additional return values for type: review_product

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

product_buy_link_text:

Deprecated since MP 3.x:

Please use the field product_buy_urls.

(also see ChangeLog)

product_buy_url:

Deprecated since MP 3.x:

Please use the field product_buy_urls.

(also see ChangeLog)

product_buy_urls:

A list of dictionaries with the URL (and link text) to external websites to buy the product.

New in MP 3.x:

Object Reviews (album, book, product) can now have multiple non-provider buy urls.

(also see ChangeLog)

product_image_url:
product_issued:

The date when the product was / is going to be released. This can be some general text, such as 'October 2014', or a date as a string, such as '2014-06-05'.

product_provider_urls:

A list of Amazon or iTunes urls.

product_title:

The title of the product that is being reviewed.

rating:

The rating for the object that is being reviewed.

Additional return values for type: roundup_content

evergreen:The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.
roundup_content_targets:A list of dictionaries, each defining the content UUID.
roundup_numbering:The sorting of the list.

Additional return values for type: roundup_location

evergreen:The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.
roundup_location_hide_map:
roundup_location_tour_type:Default type for the Google Directions Service
roundup_locations:A list of dictionaries, each defining the location UUID, override description and override image.
roundup_numbering:The sorting of the list.

PUT

Create/update a content object.

Sending data to this resource does one of two things:

  • creates a new content object if no object with the given UUID was found, or
  • updates the content object with the given UUID.

(see content types)

Sample Call

>>> PUT("/123/content/12345678-1234-1234-1234-123456789abc",
...         {"urlname": "article-a",
...          "content_type": "article",
...          "title": "Article A",
...          "state": "draft",
...          "content": "<p>This is the content of the article.</p>",
...          "teaser_image_uuid": "186fa89b-1ecf-3e94-a144-0603362ed675",
...         })
{'url': 'https://api.metropublisher.com/123/content/12345678-1234-1234-1234-123456789abc',
 'uuid': '12345678-1234-1234-1234-123456789abc'}

Parameters

urlname:

see urlname

required

Example value: "om-østerbro"

Values must obey all the conditions

  • match the following regular expression:

    ^[^/@+][^/]*$

    Info: may not start with either @ or + and may not contain /.

  • must be unique per section

  • must be unique per blog

  • must be unique for events

content_type:

see content types, also please note that there are additional parameters depending on the content type specified here

required

Example value: "article"

Values must be any of the following

article:
event:
recipe:
review:

same as review_location

review_album:
review_book:
review_location:
review_movie:
review_product:
roundup_content:
roundup_location:
video:

Deprecated since MP 2.9:

With MP 2.9, the video articles are converted to normal articles with the video information moved into the article's media slots.

(also see ChangeLog)

perma_url_path:

The permanent path to the content object (see Consideration When Migrating Content).

Note

Should only be used if the content is imported from another system and has already acquired significant social media / search engine recognition.

optional

Default: None

must be unique and start with a slash ('/')

canonical_url:

Only set a value with this parameter if the canonical URL is different than the MP-internal url of the content, i.e. a URL to differnt website.

optional

Example value: "http://www.test.com/canonical/url/article.html"

Values must obey all the conditions

  • match the following regular expression:

    ^[A-Za-z][-A-Za-z0-9+\.]*:

    Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

  • Value must be more than just the URL scheme (i.e. more than just 'http://').

title:

The content title

required

Example value: "Om Østerbro"

Value must not contain unicode characters x00-x08 or x0b-x1f

sub_title:

The content sub title

optional

Default: None

Example value: "Alt om Østerbro"

description:

A short description of the content.

optional

Default: None

Values must not be longer than 250

content:

see Content-XML

optional

Default: None

Example value: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.<p>"

Values must obey all the conditions

  • Value must not contain unicode characters x00-x08 or x0b-x1f

  • XML-compliant HTML, see Content-XML for restrictions on HTML tags

  • Slot ids must be unique within content

created:

The creation date/time in ISO 8601 format. See Dates and Times.

optional

Default: <current timestamp>

Example value: '2012-01-01T11:30:45'

Values must restricted to users with these roles:

modified:

The date/time of last modification in ISO 8601 format. See Dates and Times.

optional

Default: <current timestamp>

Example value: '2012-01-01T11:30:45'

Values must restricted to users with these roles:

issued:

The date/time the content object was issued (see issued and Dates and Times).

optional

Note

required

if the parameter state is set to 'published'.

Example value: '2012-01-01T11:30:45'

Values must restricted to users with these roles:

state:

optional

Default: 'draft'

Values must be any of the following

draft:

This object is a draft and is not visible on the public website.

published:

This object is published and is visible on the public website after its issued date.

meta_title:

The text for the HTML meta title tag.

optional

Default: None

Example value: "Om Østerbro"

meta_description:

The text for the HTML meta description tag.

optional

Default: None

Example value: "En artikel om Østerbro i København."

teaser_image_uuid:

The UUID of the teaser image.

optional

Default: None

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

  • not be present if feature_thumb_uuid is used

header_image_uuid:

The UUID of the wide feature image.

optional

Default: None

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

print_description:

optional

Default: None

Additional parameters for type: article

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

optional

Default: False

section_uuid:

The UUID of the section the content object is associated with (None if content object resides outside any section).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Section with the given UUID must exist in the Metro Publisher instance.

blog_uuid:

The UUID of the blog the content object is associated with (None if content object is not part of a blog).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • Blog with the given id must exist in the Metro Publisher instance.

  • Content Type must be allowed in a blog

Additional parameters for type: event

location_uuid:

The location UUID associated with this content object.

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Location with the given UUID must exist in the Metro Publisher instance.

location_alt:

An alternative for location_uuid. It can be used if the location is not a reusable location and should therefore not be created in the Metro Publisher instance. This may be the case, for example, if it is not a real location and does not have usable location data such as an address or geolocation.

optional

Example value: "Conference Room 18, Convention Center"

Required if no 'location_uuid' is given, but must be None if 'location_uuid' is given.

dtstart:

The start date/time of either the event or its first occurrence. See also RFC 5545.

required

Example value: '2012-01-01T11:30:45'

Event start date/time must be before end date/time.

dtend:

The end date/time of either the event or its first occurrence. See also RFC 5545.

required

Example value: '2012-01-01T11:30:45'

website:

The url to an external event website.

optional

Example value: "http://www.ourevent2012.com"

Values must obey all the conditions

  • match the following regular expression:

    ^[A-Za-z][-A-Za-z0-9+\.]*:

    Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

  • Value must be more than just the URL scheme (i.e. more than just 'http://').

prices:

Price information for the event.

optional

Default: None

user_email:

Email of the user who submitted the event.

optional

Default: None

Values must match the following regular expression:

^[A-Za-z0-9!#$%&'*+/=?^_`{|}~.-]+@[A-Za-z0-9.-]+\.[A-Za-z]*$

Info: The regular expression tries to verify the following pattern:

<string of characters>@<string of characters>.<string of characters>

The first string may contain a number of different special characters besides letters and numbers, such as an underscore (_) or asterisk (*), while the second string must contain only letters, numbers, dashes (-) and dots (.).

email:

Email to contact the event organizer.

optional

Default: None

Values must match the following regular expression:

^[A-Za-z0-9!#$%&'*+/=?^_`{|}~.-]+@[A-Za-z0-9.-]+\.[A-Za-z]*$

Info: The regular expression tries to verify the following pattern:

<string of characters>@<string of characters>.<string of characters>

The first string may contain a number of different special characters besides letters and numbers, such as an underscore (_) or asterisk (*), while the second string must contain only letters, numbers, dashes (-) and dots (.).

sponsored:

The event is sponsored. Only available with Directory Add-on.

optional

Default: False

Values must obey all the conditions

  • must be an event

  • The Metro Publisher instance requires the Directory Add-on.

event_status_type:

The status of the event, such as 'cancelled'.

optional

Default: None

Must be one of 'cancelled', 'postponed', 'rescheduled', 'moved_online'

phone:

A phone number to contact the event organizer.

optional

rrule:

The recurrence rule definitions for the event. See RFC 5545.

optional

Default: None

freq:

required

Values must be any of the following

SECONDLY:
MINUTELY:
HOURLY:
DAILY:
WEEKLY:
MONTHLY:
YEARLY:
until:

The event repeats until this date. See also RFC 5545.

optional

Default: None

Example value: '2012-01-01T11:30:45'

count:

optional

Default: None

interval:

optional

Default: None

bysecond:

optional

Default: None

byminute:

optional

Default: None

byhour:

optional

Default: None

byday:

optional

Default: None

bymonth:

optional

Default: None

bymonthday:

optional

Default: None

byyearday:

optional

Default: None

byweekno:

optional

Default: None

bysetpos:

optional

Default: None

wkst:

optional

Default: None

Values must be any of the following

SU:

Sunday

MO:

Monday

TU:

Tuesday

WE:

Wednesday

TH:

Thursday

FR:

Friday

SA:

Saturday

rdates:

A list of either date objects or datetime objects that specify any additional occurrences outside the rule defining a recurring event. See RFC 5545.

optional

Default: []

exdates:

A list of either date objects or datetime objects that specify any exceptions to occurrences defined by the recurrence rule of a recurring event. See RFC 5545.

optional

Default: []

recurrence_id:

The recurrence_id for this event, see RFC 5545.

optional

ical_uid:

The event's unique identifier, see RFC 5545.

required

sort_title:

optional

Additional parameters for type: recipe

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

optional

Default: False

section_uuid:

The UUID of the section the content object is associated with (None if content object resides outside any section).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Section with the given UUID must exist in the Metro Publisher instance.

recipe_prep_time:

The preparation time in minutes.

optional

Default: None

recipe_cook_time:

The cooking time in minutes.

optional

Default: None

recipe_yield:

The recipe yield, e.g. '1 loaf'.

optional

Default: None

Values must not be longer than 150

recipe_ingredients:

A list of dictionaries with the recipe ingredients.

optional

Default: None

Example value: [{'ingredient': 'self-rising flour', 'unit': 'g', 'amount': 250}]

Every element of the list is a dictionary, each consisting of the following fields:

amount:

The amount of the ingredient.

optional

Default: None

Example value: 3.5

unit:

The unit of the ingredient.

optional

Default: None

Example value: "'cups', 'g', 'tablespoon'"

Values must not be longer than 50

ingredient:

The name of the ingredient.

required

Example value: "self-rising flour"

Values must not be longer than 250

recipe_image_uuid:

The UUID of the recipe image.

optional

Default: None

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

Additional parameters for type: review_album

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

optional

Default: False

section_uuid:

The UUID of the section the content object is associated with (None if content object resides outside any section).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Section with the given UUID must exist in the Metro Publisher instance.

blog_uuid:

The UUID of the blog the content object is associated with (None if content object is not part of a blog).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • Blog with the given id must exist in the Metro Publisher instance.

  • Content Type must be allowed in a blog

rating:

The rating for the object that is being reviewed.

optional

Values must be any of the following

0:

0 of 5 stars

0.5:

½ of 5 stars

1:

1 of 5 stars

1.5:

1 ½ of 5 stars

2:

2 of 5 stars

2.5:

2 ½ of 5 stars

3:

3 of 5 stars

3.5:

3 ½ of 5 stars

4:

4 of 5 stars

4.5:

4 ½ of 5 stars

5:

5 of 5 stars

album_title:

The title of the album that is being reviewed.

required

album_image_uuid:

The UUID of the album cover.

optional

Default: None

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

album_issued:

The date when the album was / is going to be published. This can be some general text, such as 'October 2014', or a date as a string, such as '2014-06-05'.

optional

Default: None

album_provider_urls:

A list of Amazon or iTunes urls.

optional

Default: None

Example value: ['http://www.amazon.fr/gp/product/B00I9NJG96/', 'http://itunes.apple.com/app/id426698291&mt=8']

Every element of the list must obey all the conditions

  • obey all the conditions

    • match the following regular expression:

      ^[A-Za-z][-A-Za-z0-9+\.]*:

      Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

    • Value must be more than just the URL scheme (i.e. more than just 'http://').

  • must be an Amazon or iTunes url

album_buy_urls:

A list of dictionaries with url / link text to websites where the album can be bought.

New in MP 3.x:

Object Reviews (album, book, product) can now have multiple non-provider buy urls.

(also see ChangeLog)

optional

Default: None

Example value: [{'link_text': 'Buy at SomePlace', 'url': 'http://www.someplace.com/product/12345.html'}]

The parameters album_buy_urls and album_buy_url/album_buy_link_text are mutually exclusive.

Every element of the list is a dictionary, each consisting of the following fields:

url:

URL to a page where the website visitor can buy the reviewed object. If the url is to a provider supported by Metro Publisher, use the *_provider_urls parameter.

required

Example value: "http://www.someplace.com/product/12345.html"

Values must obey all the conditions

  • match the following regular expression:

    ^[A-Za-z][-A-Za-z0-9+\.]*:

    Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

  • Value must be more than just the URL scheme (i.e. more than just 'http://').

link_text:

The link text used for the url link.

required

Example value: "Buy at SomePlace"

Values must not be longer than 50

album_buy_url:

Deprecated since MP 3.x:

Please use the field album_buy_urls.

(also see ChangeLog)

optional

Default: None

Values must obey all the conditions

  • match the following regular expression:

    ^[A-Za-z][-A-Za-z0-9+\.]*:

    Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

  • Value must be more than just the URL scheme (i.e. more than just 'http://').

album_buy_link_text:

Deprecated since MP 3.x:

Please use the field album_buy_urls.

(also see ChangeLog)

optional

Default: None

Values must not be longer than 50

Additional parameters for type: review_book

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

optional

Default: False

section_uuid:

The UUID of the section the content object is associated with (None if content object resides outside any section).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Section with the given UUID must exist in the Metro Publisher instance.

blog_uuid:

The UUID of the blog the content object is associated with (None if content object is not part of a blog).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • Blog with the given id must exist in the Metro Publisher instance.

  • Content Type must be allowed in a blog

rating:

The rating for the object that is being reviewed.

optional

Values must be any of the following

0:

0 of 5 stars

0.5:

½ of 5 stars

1:

1 of 5 stars

1.5:

1 ½ of 5 stars

2:

2 of 5 stars

2.5:

2 ½ of 5 stars

3:

3 of 5 stars

3.5:

3 ½ of 5 stars

4:

4 of 5 stars

4.5:

4 ½ of 5 stars

5:

5 of 5 stars

book_title:

The title of the book that is being reviewed.

required

book_image_uuid:

The UUID of the book cover.

optional

Default: None

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

book_isbn:

The ISBN of the book that is being reviewed.This must be a valid ISBN-10 or ISBN-13.

required

must be an ISBN-10 or ISBN-13

book_issued:

The date when the book was / is going to be published. This can be some general text, such as 'October 2014', or a date as a string, such as '2014-06-05'.

optional

Default: None

book_provider_urls:

A list of Amazon or iTunes urls.

optional

Default: None

Example value: ['http://www.amazon.fr/gp/product/B00I9NJG96/', 'http://itunes.apple.com/app/id426698291&mt=8']

Every element of the list must obey all the conditions

  • obey all the conditions

    • match the following regular expression:

      ^[A-Za-z][-A-Za-z0-9+\.]*:

      Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

    • Value must be more than just the URL scheme (i.e. more than just 'http://').

  • must be an Amazon or iTunes url

book_buy_urls:

A list of dictionaries with url / link text to websites where the book can be bought.

New in MP 3.x:

Object Reviews (album, book, product) can now have multiple non-provider buy urls.

(also see ChangeLog)

optional

Default: None

Example value: [{'link_text': 'Buy at SomePlace', 'url': 'http://www.someplace.com/product/12345.html'}]

The parameters book_buy_urls and book_buy_url/book_buy_link_text are mutually exclusive.

Every element of the list is a dictionary, each consisting of the following fields:

url:

URL to a page where the website visitor can buy the reviewed object. If the url is to a provider supported by Metro Publisher, use the *_provider_urls parameter.

required

Example value: "http://www.someplace.com/product/12345.html"

Values must obey all the conditions

  • match the following regular expression:

    ^[A-Za-z][-A-Za-z0-9+\.]*:

    Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

  • Value must be more than just the URL scheme (i.e. more than just 'http://').

link_text:

The link text used for the url link.

required

Example value: "Buy at SomePlace"

Values must not be longer than 50

book_buy_url:

Deprecated since MP 3.x:

Please use the field book_buy_urls.

(also see ChangeLog)

optional

Default: None

Values must obey all the conditions

  • match the following regular expression:

    ^[A-Za-z][-A-Za-z0-9+\.]*:

    Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

  • Value must be more than just the URL scheme (i.e. more than just 'http://').

book_buy_link_text:

Deprecated since MP 3.x:

Please use the field book_buy_urls.

(also see ChangeLog)

optional

Default: None

Values must not be longer than 50

Additional parameters for type: review_location

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

optional

Default: False

section_uuid:

The UUID of the section the content object is associated with (None if content object resides outside any section).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Section with the given UUID must exist in the Metro Publisher instance.

location_uuid:

The location UUID associated with this content object.

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Location with the given UUID must exist in the Metro Publisher instance.

blog_uuid:

The UUID of the blog the content object is associated with (None if content object is not part of a blog).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • Blog with the given id must exist in the Metro Publisher instance.

  • Content Type must be allowed in a blog

rating:

The rating for the object that is being reviewed.

optional

Values must be any of the following

0:

0 of 5 stars

0.5:

½ of 5 stars

1:

1 of 5 stars

1.5:

1 ½ of 5 stars

2:

2 of 5 stars

2.5:

2 ½ of 5 stars

3:

3 of 5 stars

3.5:

3 ½ of 5 stars

4:

4 of 5 stars

4.5:

4 ½ of 5 stars

5:

5 of 5 stars

Additional parameters for type: review_movie

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

optional

Default: False

section_uuid:

The UUID of the section the content object is associated with (None if content object resides outside any section).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Section with the given UUID must exist in the Metro Publisher instance.

rating:

The rating for the object that is being reviewed.

optional

Values must be any of the following

0:

0 of 5 stars

0.5:

½ of 5 stars

1:

1 of 5 stars

1.5:

1 ½ of 5 stars

2:

2 of 5 stars

2.5:

2 ½ of 5 stars

3:

3 of 5 stars

3.5:

3 ½ of 5 stars

4:

4 of 5 stars

4.5:

4 ½ of 5 stars

5:

5 of 5 stars

movie_title:

The title of the movie that is being reviewed.

required

movie_image_uuid:

The UUID of the movie cover.

optional

Default: None

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

movie_issued:

The date when the movie was / is going to be published. This can be some general text, such as 'October 2014', or a date as a string, such as '2014-06-05'.

optional

Default: None

movie_provider_urls:

A list of Amazon or iTunes urls.

optional

Default: None

Example value: ['http://www.amazon.fr/gp/product/B00I9NJG96/', 'http://itunes.apple.com/app/id426698291&mt=8']

Every element of the list must obey all the conditions

  • obey all the conditions

    • match the following regular expression:

      ^[A-Za-z][-A-Za-z0-9+\.]*:

      Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

    • Value must be more than just the URL scheme (i.e. more than just 'http://').

  • must be an Amazon or iTunes url

movie_buy_urls:

A list of dictionaries with url / link text to websites where the movie can be bought.

New in MP 3.x:

Object Reviews (album, book, product) can now have multiple non-provider buy urls.

(also see ChangeLog)

optional

Default: None

Example value: [{'link_text': 'Buy at SomePlace', 'url': 'http://www.someplace.com/product/12345.html'}]

Every element of the list is a dictionary, each consisting of the following fields:

url:

URL to a page where the website visitor can buy the reviewed object. If the url is to a provider supported by Metro Publisher, use the *_provider_urls parameter.

required

Example value: "http://www.someplace.com/product/12345.html"

Values must obey all the conditions

  • match the following regular expression:

    ^[A-Za-z][-A-Za-z0-9+\.]*:

    Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

  • Value must be more than just the URL scheme (i.e. more than just 'http://').

link_text:

The link text used for the url link.

required

Example value: "Buy at SomePlace"

Values must not be longer than 50

movie_duration:

The movie duration, in minutes.

optional

Default: None

Additional parameters for type: review_product

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

optional

Default: False

section_uuid:

The UUID of the section the content object is associated with (None if content object resides outside any section).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Section with the given UUID must exist in the Metro Publisher instance.

blog_uuid:

The UUID of the blog the content object is associated with (None if content object is not part of a blog).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • Blog with the given id must exist in the Metro Publisher instance.

  • Content Type must be allowed in a blog

rating:

The rating for the object that is being reviewed.

optional

Values must be any of the following

0:

0 of 5 stars

0.5:

½ of 5 stars

1:

1 of 5 stars

1.5:

1 ½ of 5 stars

2:

2 of 5 stars

2.5:

2 ½ of 5 stars

3:

3 of 5 stars

3.5:

3 ½ of 5 stars

4:

4 of 5 stars

4.5:

4 ½ of 5 stars

5:

5 of 5 stars

product_title:

The title of the product that is being reviewed.

required

product_image_uuid:

The UUID of the product image.

optional

Default: None

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

product_issued:

The date when the product was / is going to be released. This can be some general text, such as 'October 2014', or a date as a string, such as '2014-06-05'.

optional

Default: None

product_provider_urls:

A list of Amazon or iTunes urls.

optional

Default: None

Example value: ['http://www.amazon.fr/gp/product/B00I9NJG96/', 'http://itunes.apple.com/app/id426698291&mt=8']

Every element of the list must obey all the conditions

  • obey all the conditions

    • match the following regular expression:

      ^[A-Za-z][-A-Za-z0-9+\.]*:

      Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

    • Value must be more than just the URL scheme (i.e. more than just 'http://').

  • must be an Amazon or iTunes url

product_buy_urls:

A list of dictionaries with url / link text to websites where the product can be bought.

New in MP 3.x:

Object Reviews (album, book, product) can now have multiple non-provider buy urls.

(also see ChangeLog)

optional

Default: None

Example value: [{'link_text': 'Buy at SomePlace', 'url': 'http://www.someplace.com/product/12345.html'}]

The parameters product_buy_urls and product_buy_url/product_buy_link_text are mutually exclusive.

Every element of the list is a dictionary, each consisting of the following fields:

url:

URL to a page where the website visitor can buy the reviewed object. If the url is to a provider supported by Metro Publisher, use the *_provider_urls parameter.

required

Example value: "http://www.someplace.com/product/12345.html"

Values must obey all the conditions

  • match the following regular expression:

    ^[A-Za-z][-A-Za-z0-9+\.]*:

    Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

  • Value must be more than just the URL scheme (i.e. more than just 'http://').

link_text:

The link text used for the url link.

required

Example value: "Buy at SomePlace"

Values must not be longer than 50

product_buy_url:

Deprecated since MP 3.x:

Please use the field product_buy_urls.

(also see ChangeLog)

optional

Default: None

Values must obey all the conditions

  • match the following regular expression:

    ^[A-Za-z][-A-Za-z0-9+\.]*:

    Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

  • Value must be more than just the URL scheme (i.e. more than just 'http://').

product_buy_link_text:

Deprecated since MP 3.x:

Please use the field product_buy_urls.

(also see ChangeLog)

optional

Default: None

Values must not be longer than 50

Additional parameters for type: roundup_content

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

optional

Default: False

roundup_location_tour_type:

Default type for the Google Directions Service

optional

Default: None

Values must be any of the following

cycle:

by bicycle

drive:

by car

walk:

walking

roundup_content_targets:

The list of content targets for this roundup.

required

Every element of the list is a dictionary, each consisting of the following fields:

target_uuid:

The UUID of this roundup content.

required

Example value: '12345678-1234-1234-1234-123456789abc'

Content with the given UUID must exist in the Metro Publisher instance.

roundup_numbering:

The sorting of the list.

optional

Default: 'ascending'

Values must be any of the following

ascending:

Numbers appear as 1, 2, 3,...

descending:

Numbers appear as 5, 4, 3,...

Additional parameters for type: roundup_location

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

optional

Default: False

roundup_locations:

The list of locations for this roundup.

required

Every element of the list is a dictionary, each consisting of the following fields:

location_uuid:

The UUID of this roundup location.

required

Example value: '12345678-1234-1234-1234-123456789abc'

Location with the given UUID must exist in the Metro Publisher instance.

title:

Override title to be used within the roundup instead of the original location title.

optional

Default: None

description:

Override description to be used within the roundup instead of the original location description.

optional

Default: None

XML-compliant HTML, see Content-XML for restrictions on HTML tags

image_uuid:

UUID of a linked image

optional

Default: None

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

roundup_location_tour_type:

Default type for the Google Directions Service

optional

Default: None

Values must be any of the following

cycle:

by bicycle

drive:

by car

walk:

walking

roundup_location_hide_map:

optional

Default: False

roundup_numbering:

The sorting of the list.

optional

Default: 'ascending'

Values must be any of the following

ascending:

Numbers appear as 1, 2, 3,...

descending:

Numbers appear as 5, 4, 3,...

/{iid}/content/{uuid}

PATCH

Update specific attributes of a content object.

Note

You cannot change the content type via PATCH. Use PUT /{iid}/content/{uuid}.

Sample Call

>>> PATCH("/123/content/799d6c73-fe75-11df-837b-001ec21bff9e",
...            {'title': 'NEW TITLE'})
{'url': 'https://api.metropublisher.com/123/content/799d6c73-fe75-11df-837b-001ec21bff9e',
 'uuid': '799d6c73-fe75-11df-837b-001ec21bff9e'}

Parameters

urlname:

see urlname

optional

Example value: "om-østerbro"

Values must obey all the conditions

  • match the following regular expression:

    ^[^/@+][^/]*$

    Info: may not start with either @ or + and may not contain /.

  • must be unique per section

  • must be unique per blog

  • must be unique for events

perma_url_path:

The permanent path to the content object (see Consideration When Migrating Content).

Note

Should only be used if the content is imported from another system and has already acquired significant social media / search engine recognition.

optional

must be unique and start with a slash ('/')

canonical_url:

Only set a value with this parameter if the canonical URL is different than the MP-internal url of the content, i.e. a URL to differnt website.

optional

Example value: "http://www.test.com/canonical/url/article.html"

Values must obey all the conditions

  • match the following regular expression:

    ^[A-Za-z][-A-Za-z0-9+\.]*:

    Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

  • Value must be more than just the URL scheme (i.e. more than just 'http://').

title:

The content title

optional

Example value: "Om Østerbro"

Value must not contain unicode characters x00-x08 or x0b-x1f

sub_title:

The content sub title

optional

Example value: "Alt om Østerbro"

description:

A short description of the content.

optional

Values must not be longer than 250

content:

see Content-XML

optional

Example value: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.<p>"

Values must obey all the conditions

  • Value must not contain unicode characters x00-x08 or x0b-x1f

  • XML-compliant HTML, see Content-XML for restrictions on HTML tags

  • Slot ids must be unique within content

created:

The creation date/time in ISO 8601 format. See Dates and Times.

optional

Example value: '2012-01-01T11:30:45'

Values must restricted to users with these roles:

modified:

The date/time of last modification in ISO 8601 format. See Dates and Times.

optional

Example value: '2012-01-01T11:30:45'

Values must restricted to users with these roles:

issued:

The date/time the content object was issued (see issued and Dates and Times).

optional

Note

required

if the parameter state is set to 'published'.

Example value: '2012-01-01T11:30:45'

Values must restricted to users with these roles:

state:

optional

Values must be any of the following

draft:

This object is a draft and is not visible on the public website.

published:

This object is published and is visible on the public website after its issued date.

meta_title:

The text for the HTML meta title tag.

optional

Example value: "Om Østerbro"

meta_description:

The text for the HTML meta description tag.

optional

Example value: "En artikel om Østerbro i København."

teaser_image_uuid:

The UUID of the teaser image.

optional

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

  • not be present if feature_thumb_uuid is used

header_image_uuid:

The UUID of the wide feature image.

optional

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

print_description:

optional

Additional parameters for type: article

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

optional

section_uuid:

The UUID of the section the content object is associated with (None if content object resides outside any section).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Section with the given UUID must exist in the Metro Publisher instance.

blog_uuid:

The UUID of the blog the content object is associated with (None if content object is not part of a blog).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • Blog with the given id must exist in the Metro Publisher instance.

  • Content Type must be allowed in a blog

Additional parameters for type: event

location_uuid:

The location UUID associated with this content object.

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Location with the given UUID must exist in the Metro Publisher instance.

location_alt:

An alternative for location_uuid. It can be used if the location is not a reusable location and should therefore not be created in the Metro Publisher instance. This may be the case, for example, if it is not a real location and does not have usable location data such as an address or geolocation.

optional

Example value: "Conference Room 18, Convention Center"

Required if no 'location_uuid' is given, but must be None if 'location_uuid' is given.

dtstart:

The start date/time of either the event or its first occurrence. See also RFC 5545.

optional

Example value: '2012-01-01T11:30:45'

Event start date/time must be before end date/time.

dtend:

The end date/time of either the event or its first occurrence. See also RFC 5545.

optional

Example value: '2012-01-01T11:30:45'

website:

The url to an external event website.

optional

Example value: "http://www.ourevent2012.com"

Values must obey all the conditions

  • match the following regular expression:

    ^[A-Za-z][-A-Za-z0-9+\.]*:

    Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

  • Value must be more than just the URL scheme (i.e. more than just 'http://').

prices:

Price information for the event.

optional

user_email:

Email of the user who submitted the event.

optional

Values must match the following regular expression:

^[A-Za-z0-9!#$%&'*+/=?^_`{|}~.-]+@[A-Za-z0-9.-]+\.[A-Za-z]*$

Info: The regular expression tries to verify the following pattern:

<string of characters>@<string of characters>.<string of characters>

The first string may contain a number of different special characters besides letters and numbers, such as an underscore (_) or asterisk (*), while the second string must contain only letters, numbers, dashes (-) and dots (.).

email:

Email to contact the event organizer.

optional

Values must match the following regular expression:

^[A-Za-z0-9!#$%&'*+/=?^_`{|}~.-]+@[A-Za-z0-9.-]+\.[A-Za-z]*$

Info: The regular expression tries to verify the following pattern:

<string of characters>@<string of characters>.<string of characters>

The first string may contain a number of different special characters besides letters and numbers, such as an underscore (_) or asterisk (*), while the second string must contain only letters, numbers, dashes (-) and dots (.).

sponsored:

The event is sponsored. Only available with Directory Add-on.

optional

Values must obey all the conditions

  • must be an event

  • The Metro Publisher instance requires the Directory Add-on.

event_status_type:

The status of the event, such as 'cancelled'.

optional

Must be one of 'cancelled', 'postponed', 'rescheduled', 'moved_online'

phone:

A phone number to contact the event organizer.

optional

rrule:

The recurrence rule definitions for the event. See RFC 5545.

optional

freq:

optional

Values must be any of the following

SECONDLY:
MINUTELY:
HOURLY:
DAILY:
WEEKLY:
MONTHLY:
YEARLY:
until:

The event repeats until this date. See also RFC 5545.

optional

Example value: '2012-01-01T11:30:45'

count:

optional

interval:

optional

bysecond:

optional

byminute:

optional

byhour:

optional

byday:

optional

bymonth:

optional

bymonthday:

optional

byyearday:

optional

byweekno:

optional

bysetpos:

optional

wkst:

optional

Values must be any of the following

SU:

Sunday

MO:

Monday

TU:

Tuesday

WE:

Wednesday

TH:

Thursday

FR:

Friday

SA:

Saturday

rdates:

A list of either date objects or datetime objects that specify any additional occurrences outside the rule defining a recurring event. See RFC 5545.

optional

exdates:

A list of either date objects or datetime objects that specify any exceptions to occurrences defined by the recurrence rule of a recurring event. See RFC 5545.

optional

recurrence_id:

The recurrence_id for this event, see RFC 5545.

optional

ical_uid:

The event's unique identifier, see RFC 5545.

optional

sort_title:

optional

Additional parameters for type: recipe

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

optional

section_uuid:

The UUID of the section the content object is associated with (None if content object resides outside any section).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Section with the given UUID must exist in the Metro Publisher instance.

recipe_prep_time:

The preparation time in minutes.

optional

recipe_cook_time:

The cooking time in minutes.

optional

recipe_yield:

The recipe yield, e.g. '1 loaf'.

optional

Values must not be longer than 150

recipe_ingredients:

A list of dictionaries with the recipe ingredients.

optional

Example value: [{'ingredient': 'self-rising flour', 'unit': 'g', 'amount': 250}]

Every element of the list is a dictionary, each consisting of the following fields:

amount:

The amount of the ingredient.

optional

Default: None

Example value: 3.5

unit:

The unit of the ingredient.

optional

Default: None

Example value: "'cups', 'g', 'tablespoon'"

Values must not be longer than 50

ingredient:

The name of the ingredient.

required

Example value: "self-rising flour"

Values must not be longer than 250

recipe_image_uuid:

The UUID of the recipe image.

optional

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

Additional parameters for type: review_album

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

optional

section_uuid:

The UUID of the section the content object is associated with (None if content object resides outside any section).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Section with the given UUID must exist in the Metro Publisher instance.

blog_uuid:

The UUID of the blog the content object is associated with (None if content object is not part of a blog).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • Blog with the given id must exist in the Metro Publisher instance.

  • Content Type must be allowed in a blog

rating:

The rating for the object that is being reviewed.

optional

Values must be any of the following

0:

0 of 5 stars

0.5:

½ of 5 stars

1:

1 of 5 stars

1.5:

1 ½ of 5 stars

2:

2 of 5 stars

2.5:

2 ½ of 5 stars

3:

3 of 5 stars

3.5:

3 ½ of 5 stars

4:

4 of 5 stars

4.5:

4 ½ of 5 stars

5:

5 of 5 stars

album_title:

The title of the album that is being reviewed.

optional

album_image_uuid:

The UUID of the album cover.

optional

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

album_issued:

The date when the album was / is going to be published. This can be some general text, such as 'October 2014', or a date as a string, such as '2014-06-05'.

optional

album_provider_urls:

A list of Amazon or iTunes urls.

optional

Example value: ['http://www.amazon.fr/gp/product/B00I9NJG96/', 'http://itunes.apple.com/app/id426698291&mt=8']

Every element of the list must obey all the conditions

  • obey all the conditions

    • match the following regular expression:

      ^[A-Za-z][-A-Za-z0-9+\.]*:

      Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

    • Value must be more than just the URL scheme (i.e. more than just 'http://').

  • must be an Amazon or iTunes url

album_buy_urls:

A list of dictionaries with url / link text to websites where the album can be bought.

New in MP 3.x:

Object Reviews (album, book, product) can now have multiple non-provider buy urls.

(also see ChangeLog)

optional

Example value: [{'link_text': 'Buy at SomePlace', 'url': 'http://www.someplace.com/product/12345.html'}]

The parameters album_buy_urls and album_buy_url/album_buy_link_text are mutually exclusive.

Every element of the list is a dictionary, each consisting of the following fields:

url:

URL to a page where the website visitor can buy the reviewed object. If the url is to a provider supported by Metro Publisher, use the *_provider_urls parameter.

required

Example value: "http://www.someplace.com/product/12345.html"

Values must obey all the conditions

  • match the following regular expression:

    ^[A-Za-z][-A-Za-z0-9+\.]*:

    Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

  • Value must be more than just the URL scheme (i.e. more than just 'http://').

link_text:

The link text used for the url link.

required

Example value: "Buy at SomePlace"

Values must not be longer than 50

album_buy_url:

Deprecated since MP 3.x:

Please use the field album_buy_urls.

(also see ChangeLog)

optional

Values must obey all the conditions

  • match the following regular expression:

    ^[A-Za-z][-A-Za-z0-9+\.]*:

    Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

  • Value must be more than just the URL scheme (i.e. more than just 'http://').

album_buy_link_text:

Deprecated since MP 3.x:

Please use the field album_buy_urls.

(also see ChangeLog)

optional

Values must not be longer than 50

Additional parameters for type: review_book

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

optional

section_uuid:

The UUID of the section the content object is associated with (None if content object resides outside any section).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Section with the given UUID must exist in the Metro Publisher instance.

blog_uuid:

The UUID of the blog the content object is associated with (None if content object is not part of a blog).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • Blog with the given id must exist in the Metro Publisher instance.

  • Content Type must be allowed in a blog

rating:

The rating for the object that is being reviewed.

optional

Values must be any of the following

0:

0 of 5 stars

0.5:

½ of 5 stars

1:

1 of 5 stars

1.5:

1 ½ of 5 stars

2:

2 of 5 stars

2.5:

2 ½ of 5 stars

3:

3 of 5 stars

3.5:

3 ½ of 5 stars

4:

4 of 5 stars

4.5:

4 ½ of 5 stars

5:

5 of 5 stars

book_title:

The title of the book that is being reviewed.

optional

book_image_uuid:

The UUID of the book cover.

optional

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

book_isbn:

The ISBN of the book that is being reviewed.This must be a valid ISBN-10 or ISBN-13.

optional

must be an ISBN-10 or ISBN-13

book_issued:

The date when the book was / is going to be published. This can be some general text, such as 'October 2014', or a date as a string, such as '2014-06-05'.

optional

book_provider_urls:

A list of Amazon or iTunes urls.

optional

Example value: ['http://www.amazon.fr/gp/product/B00I9NJG96/', 'http://itunes.apple.com/app/id426698291&mt=8']

Every element of the list must obey all the conditions

  • obey all the conditions

    • match the following regular expression:

      ^[A-Za-z][-A-Za-z0-9+\.]*:

      Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

    • Value must be more than just the URL scheme (i.e. more than just 'http://').

  • must be an Amazon or iTunes url

book_buy_urls:

A list of dictionaries with url / link text to websites where the book can be bought.

New in MP 3.x:

Object Reviews (album, book, product) can now have multiple non-provider buy urls.

(also see ChangeLog)

optional

Example value: [{'link_text': 'Buy at SomePlace', 'url': 'http://www.someplace.com/product/12345.html'}]

The parameters book_buy_urls and book_buy_url/book_buy_link_text are mutually exclusive.

Every element of the list is a dictionary, each consisting of the following fields:

url:

URL to a page where the website visitor can buy the reviewed object. If the url is to a provider supported by Metro Publisher, use the *_provider_urls parameter.

required

Example value: "http://www.someplace.com/product/12345.html"

Values must obey all the conditions

  • match the following regular expression:

    ^[A-Za-z][-A-Za-z0-9+\.]*:

    Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

  • Value must be more than just the URL scheme (i.e. more than just 'http://').

link_text:

The link text used for the url link.

required

Example value: "Buy at SomePlace"

Values must not be longer than 50

book_buy_url:

Deprecated since MP 3.x:

Please use the field book_buy_urls.

(also see ChangeLog)

optional

Values must obey all the conditions

  • match the following regular expression:

    ^[A-Za-z][-A-Za-z0-9+\.]*:

    Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

  • Value must be more than just the URL scheme (i.e. more than just 'http://').

book_buy_link_text:

Deprecated since MP 3.x:

Please use the field book_buy_urls.

(also see ChangeLog)

optional

Values must not be longer than 50

Additional parameters for type: review_location

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

optional

section_uuid:

The UUID of the section the content object is associated with (None if content object resides outside any section).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Section with the given UUID must exist in the Metro Publisher instance.

location_uuid:

The location UUID associated with this content object.

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Location with the given UUID must exist in the Metro Publisher instance.

blog_uuid:

The UUID of the blog the content object is associated with (None if content object is not part of a blog).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • Blog with the given id must exist in the Metro Publisher instance.

  • Content Type must be allowed in a blog

rating:

The rating for the object that is being reviewed.

optional

Values must be any of the following

0:

0 of 5 stars

0.5:

½ of 5 stars

1:

1 of 5 stars

1.5:

1 ½ of 5 stars

2:

2 of 5 stars

2.5:

2 ½ of 5 stars

3:

3 of 5 stars

3.5:

3 ½ of 5 stars

4:

4 of 5 stars

4.5:

4 ½ of 5 stars

5:

5 of 5 stars

Additional parameters for type: review_movie

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

optional

section_uuid:

The UUID of the section the content object is associated with (None if content object resides outside any section).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Section with the given UUID must exist in the Metro Publisher instance.

rating:

The rating for the object that is being reviewed.

optional

Values must be any of the following

0:

0 of 5 stars

0.5:

½ of 5 stars

1:

1 of 5 stars

1.5:

1 ½ of 5 stars

2:

2 of 5 stars

2.5:

2 ½ of 5 stars

3:

3 of 5 stars

3.5:

3 ½ of 5 stars

4:

4 of 5 stars

4.5:

4 ½ of 5 stars

5:

5 of 5 stars

movie_title:

The title of the movie that is being reviewed.

optional

movie_image_uuid:

The UUID of the movie cover.

optional

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

movie_issued:

The date when the movie was / is going to be published. This can be some general text, such as 'October 2014', or a date as a string, such as '2014-06-05'.

optional

movie_provider_urls:

A list of Amazon or iTunes urls.

optional

Example value: ['http://www.amazon.fr/gp/product/B00I9NJG96/', 'http://itunes.apple.com/app/id426698291&mt=8']

Every element of the list must obey all the conditions

  • obey all the conditions

    • match the following regular expression:

      ^[A-Za-z][-A-Za-z0-9+\.]*:

      Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

    • Value must be more than just the URL scheme (i.e. more than just 'http://').

  • must be an Amazon or iTunes url

movie_buy_urls:

A list of dictionaries with url / link text to websites where the movie can be bought.

New in MP 3.x:

Object Reviews (album, book, product) can now have multiple non-provider buy urls.

(also see ChangeLog)

optional

Example value: [{'link_text': 'Buy at SomePlace', 'url': 'http://www.someplace.com/product/12345.html'}]

Every element of the list is a dictionary, each consisting of the following fields:

url:

URL to a page where the website visitor can buy the reviewed object. If the url is to a provider supported by Metro Publisher, use the *_provider_urls parameter.

required

Example value: "http://www.someplace.com/product/12345.html"

Values must obey all the conditions

  • match the following regular expression:

    ^[A-Za-z][-A-Za-z0-9+\.]*:

    Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

  • Value must be more than just the URL scheme (i.e. more than just 'http://').

link_text:

The link text used for the url link.

required

Example value: "Buy at SomePlace"

Values must not be longer than 50

movie_duration:

The movie duration, in minutes.

optional

Additional parameters for type: review_product

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

optional

section_uuid:

The UUID of the section the content object is associated with (None if content object resides outside any section).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Section with the given UUID must exist in the Metro Publisher instance.

blog_uuid:

The UUID of the blog the content object is associated with (None if content object is not part of a blog).

optional

Example value: '12345678-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • Blog with the given id must exist in the Metro Publisher instance.

  • Content Type must be allowed in a blog

rating:

The rating for the object that is being reviewed.

optional

Values must be any of the following

0:

0 of 5 stars

0.5:

½ of 5 stars

1:

1 of 5 stars

1.5:

1 ½ of 5 stars

2:

2 of 5 stars

2.5:

2 ½ of 5 stars

3:

3 of 5 stars

3.5:

3 ½ of 5 stars

4:

4 of 5 stars

4.5:

4 ½ of 5 stars

5:

5 of 5 stars

product_title:

The title of the product that is being reviewed.

optional

product_image_uuid:

The UUID of the product image.

optional

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

product_issued:

The date when the product was / is going to be released. This can be some general text, such as 'October 2014', or a date as a string, such as '2014-06-05'.

optional

product_provider_urls:

A list of Amazon or iTunes urls.

optional

Example value: ['http://www.amazon.fr/gp/product/B00I9NJG96/', 'http://itunes.apple.com/app/id426698291&mt=8']

Every element of the list must obey all the conditions

  • obey all the conditions

    • match the following regular expression:

      ^[A-Za-z][-A-Za-z0-9+\.]*:

      Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

    • Value must be more than just the URL scheme (i.e. more than just 'http://').

  • must be an Amazon or iTunes url

product_buy_urls:

A list of dictionaries with url / link text to websites where the product can be bought.

New in MP 3.x:

Object Reviews (album, book, product) can now have multiple non-provider buy urls.

(also see ChangeLog)

optional

Example value: [{'link_text': 'Buy at SomePlace', 'url': 'http://www.someplace.com/product/12345.html'}]

The parameters product_buy_urls and product_buy_url/product_buy_link_text are mutually exclusive.

Every element of the list is a dictionary, each consisting of the following fields:

url:

URL to a page where the website visitor can buy the reviewed object. If the url is to a provider supported by Metro Publisher, use the *_provider_urls parameter.

required

Example value: "http://www.someplace.com/product/12345.html"

Values must obey all the conditions

  • match the following regular expression:

    ^[A-Za-z][-A-Za-z0-9+\.]*:

    Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

  • Value must be more than just the URL scheme (i.e. more than just 'http://').

link_text:

The link text used for the url link.

required

Example value: "Buy at SomePlace"

Values must not be longer than 50

product_buy_url:

Deprecated since MP 3.x:

Please use the field product_buy_urls.

(also see ChangeLog)

optional

Values must obey all the conditions

  • match the following regular expression:

    ^[A-Za-z][-A-Za-z0-9+\.]*:

    Info: The value should be a URL with a scheme. The regular expression does a simple check to make sure the value starts with a letter, is followed by zero or more letters, numbers, or the plus-sign (+), minus-sign (-) or dot (.), and then a colon (:).

  • Value must be more than just the URL scheme (i.e. more than just 'http://').

product_buy_link_text:

Deprecated since MP 3.x:

Please use the field product_buy_urls.

(also see ChangeLog)

optional

Values must not be longer than 50

Additional parameters for type: roundup_content

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

optional

roundup_location_tour_type:

Default type for the Google Directions Service

optional

Values must be any of the following

cycle:

by bicycle

drive:

by car

walk:

walking

roundup_content_targets:

The list of content targets for this roundup.

optional

Every element of the list is a dictionary, each consisting of the following fields:

target_uuid:

The UUID of this roundup content.

required

Example value: '12345678-1234-1234-1234-123456789abc'

Content with the given UUID must exist in the Metro Publisher instance.

roundup_numbering:

The sorting of the list.

optional

Values must be any of the following

ascending:

Numbers appear as 1, 2, 3,...

descending:

Numbers appear as 5, 4, 3,...

Additional parameters for type: roundup_location

evergreen:

The content is an evergreen, i.e. it was not created due to current events and can be read at any time, independent of its issue date.

optional

roundup_locations:

The list of locations for this roundup.

optional

Every element of the list is a dictionary, each consisting of the following fields:

location_uuid:

The UUID of this roundup location.

required

Example value: '12345678-1234-1234-1234-123456789abc'

Location with the given UUID must exist in the Metro Publisher instance.

title:

Override title to be used within the roundup instead of the original location title.

optional

Default: None

description:

Override description to be used within the roundup instead of the original location description.

optional

Default: None

XML-compliant HTML, see Content-XML for restrictions on HTML tags

image_uuid:

UUID of a linked image

optional

Default: None

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

roundup_location_tour_type:

Default type for the Google Directions Service

optional

Values must be any of the following

cycle:

by bicycle

drive:

by car

walk:

walking

roundup_location_hide_map:

optional

roundup_numbering:

The sorting of the list.

optional

Values must be any of the following

ascending:

Numbers appear as 1, 2, 3,...

descending:

Numbers appear as 5, 4, 3,...

/{iid}/content/{uuid}/info

GET

Get additional information about a content object.

New in MP 2.9.

(also see ChangeLog)

Sample Call

>>> GET("/123/content/2e06fa2e-008e-11e0-9a76-001ec21bff9e/info")
{'public_url': 'http://123.metropublisher.net/sample-section/video-01/'}

/{iid}/content/{uuid}/tags

GET

Get all tags for a content object.

Sample Call

>>> GET("/123/content/799d6c73-fe75-11df-837b-001ec21bff9e/tags")
{'items': [{'predicate': 'describes',
            'title': 'Sample Tag',
            'url': 'https://api.metropublisher.com/123/tags/60183d70-a998-11e1-afa6-0800200c9a66',
            'uuid': '60183d70-a998-11e1-afa6-0800200c9a66'},
           {'predicate': 'authored',
            'title': 'Jane Doe',
            'url': 'https://api.metropublisher.com/123/tags/7fbbe910-a998-11e1-afa6-0800200c9a66',
            'uuid': '7fbbe910-a998-11e1-afa6-0800200c9a66'}]}

Parameters

state:

optional

Default: 'approved' if the user is a public user else None.

Values must be any of the following

internal:

Only internal tags

Access is restricted to users with these roles:

approved:

Only approved tags

provisional:

Only provisional tags

Access is restricted to users with these roles:

/{iid}/content/{uuid}/tags/{predicate}

GET

Get the tags for a content object that represent a specific tag/content relationship, defined by 'predicate'.

See also tag predicates.

Sample Call

Retrieve the author tags, i.e. the tags that define a "tag" -> "authored" -> "object" relationship:

>>> GET("/123/content/799d6c73-fe75-11df-837b-001ec21bff9e/tags/authored")
{'items': [{'predicate': 'authored',
            'title': 'Jane Doe',
            'url': 'https://api.metropublisher.com/123/tags/7fbbe910-a998-11e1-afa6-0800200c9a66',
            'uuid': '7fbbe910-a998-11e1-afa6-0800200c9a66'}]}

Retrieve the tags that define a "tag" -> "describes" -> "object" relationship:

>>> GET("/123/content/799d6c73-fe75-11df-837b-001ec21bff9e/tags/describes")
{'items': [{'predicate': 'describes',
            'title': 'Sample Tag',
            'url': 'https://api.metropublisher.com/123/tags/60183d70-a998-11e1-afa6-0800200c9a66',
            'uuid': '60183d70-a998-11e1-afa6-0800200c9a66'}]}

Parameters

state:

optional

Default: 'approved' if the user is a public user else None.

Values must be any of the following

internal:

Only internal tags

Access is restricted to users with these roles:

approved:

Only approved tags

provisional:

Only provisional tags

Access is restricted to users with these roles:

/{iid}/content/{uuid}/slots

GET

Get the settings of a content object's slots.

New in MP 2.9:

With MP 2.9, Articles, reviews and events can have multiple media attached to it.

(also see ChangeLog)

Sample Call

>>> GET("/123/content/2e06fa2e-008e-11e0-9a76-001ec21bff9e/slots")
{'items': [{'display': 'carousel',
            'relevance': 'inline',
            'url': 'https://api.metropublisher.com/123/content/2e06fa2e-008e-11e0-9a76-001ec21bff9e/slots/11111111-1111-1111-1111-111111111111',
            'uuid': '11111111-1111-1111-1111-111111111111'},
           {'relevance': 'aside',
            'url': 'https://api.metropublisher.com/123/content/2e06fa2e-008e-11e0-9a76-001ec21bff9e/slots/22222222-2222-2222-2222-222222222222',
            'uuid': '22222222-2222-2222-2222-222222222222'}]}

/{iid}/content/{uuid}/slots/{slot_uuid}

GET

Retrieve settings of one specific slot.

Sample Call

>>> GET("/123/content/11111111-1111-1111-1111-111111111111/slots/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa")
{'content_url': 'https://api.metropublisher.com/123/content/11111111-1111-1111-1111-111111111111',
 'content_uuid': '11111111-1111-1111-1111-111111111111',
 'display': 'gallery',
 'relevance': 'inline',
 'url': 'https://api.metropublisher.com/123/content/11111111-1111-1111-1111-111111111111/slots/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa',
 'uuid': 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'}

Return Value

content_url:The URL to the content object.
content_uuid:UUID of the content object the slot is used in.
display:Display type of the slot.
relevance:Relevance of the slot, i.e. how prominently it should be displayed within the content.
url:The URL to the slot.
uuid:slot id

/{iid}/content/{uuid}/slots/{slot_uuid}

PUT

Create/update the information of a slot.

Sending data to this resource does one of two things:

  • creates a new slot for the content object if no slot with the given slot id was found for the content object, or
  • updates the slot settings for the slot.

Sample Call

>>> PUT("/123/content/11111111-1111-1111-1111-111111111111/slots/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
...                   {"relevance": "inline",
...                    "display": "carousel"})
{'content_uuid': '11111111-1111-1111-1111-111111111111',
 'slot_uuid': 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa',
 'url': 'https://api.metropublisher.com/123/content/11111111-1111-1111-1111-111111111111/slots/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'}

Parameters

relevance:

Relevance of the slot, i.e. how prominently it should be displayed within the content.

optional

Default: 'aside'

Values must be any of the following

aside:
inline:
display:

Display type of the slot.

optional

Note

required

if the parameter relevance is set to 'inline'.

Values must be any of the following

gallery:
carousel:

/{iid}/content/{uuid}/slots/{slot_uuid}

DELETE

Deletes a slot.

Deleting a slot will also:

  • remove any <slot> tags for the given slot id from the content object's content, and
  • remove all media information inside the slot.

Sample Call

>>> DELETE("/123/content/11111111-1111-1111-1111-111111111111/slots/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa")
{'msg': 'deleted'}

/{iid}/content/{uuid}/slots/{slot_uuid}/media

GET

Get the media of the slot.

Sample Call

>>> GET("/123/content/11111111-1111-1111-1111-111111111111/slots/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa/media")
{'items': [{'content': '<p>This is an image of the Colosseum.</p>',
            'file_mimetype': 'audio/mpeg',
            'file_url': 'https://api.metropublisher.com/123/files/a1234567-7255-38bf-83d2-2223728662ae',
            'file_uuid': 'a1234567-7255-38bf-83d2-2223728662ae',
            'image_mimetype': 'image/jpeg',
            'image_url': 'https://api.metropublisher.com/123/files/d16f1ded-7255-38bf-83d2-2223728662ae',
            'image_uuid': 'd16f1ded-7255-38bf-83d2-2223728662ae',
            'slot_uuid': 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa',
            'thumb_mimetype': 'image/jpeg',
            'thumb_url': 'https://api.metropublisher.com/123/files/5a778106-5e32-3af2-9bb6-97aeacf01c8e',
            'thumb_uuid': '5a778106-5e32-3af2-9bb6-97aeacf01c8e',
            'title': 'Media 1',
            'type': 'file'},
           {'content': None,
            'slot_uuid': 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa',
            'thumb_mimetype': None,
            'thumb_url': None,
            'thumb_uuid': None,
            'title': 'Media 3',
            'type': 'external',
            'url': 'http://youtu.be/OSGv2VnC0go',
            'url_type': 'youtube'}]}

/{iid}/content/{uuid}/slots/{slot_uuid}/media

POST

Create new media inside a specific slot of a content object.

This resource creates new media and appends it to the existing list of media in a specific slot of the content object.

New in MP 2.9:

With MP 2.9, Articles, reviews and events can have multiple media attached to it.

(also see ChangeLog)

Sample Call

Adding a file (image) from the Metro Publisher instance's file library:

>>> POST("/123/content/27ba6f3a-ec4a-11e1-82db-001b63a90f63/slots/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa/media",
...                      {"type": "file",
...                       "title": "Media 1",
...                       "content": "<p>This is an image of the Colosseum.</p>",
...                       "thumb_uuid": "5a778106-5e32-3af2-9bb6-97aeacf01c8e",
...                       "image_uuid": "d16f1ded-7255-38bf-83d2-2223728662ae"})
{'msg': 'media added'}

Adding a file (audio) from the Metro Publisher instance's file library:

>>> POST("/123/content/27ba6f3a-ec4a-11e1-82db-001b63a90f63/slots/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa/media",
...                      {"type": "file",
...                       "title": "Media 1",
...                       "content": "<p>This is an image of the Colosseum.</p>",
...                       "thumb_uuid": "5a778106-5e32-3af2-9bb6-97aeacf01c8e",
...                       "file_uuid": "a1234567-7255-38bf-83d2-2223728662ae"})
{'msg': 'media added'}

Adding an embed (here: YouTube embed code):

>>> POST("/123/content/27ba6f3a-ec4a-11e1-82db-001b63a90f63/slots/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa/media",
...                      {"type": "embed",
...                       "title": "Media 2",
...                       "embed_code": '<iframe width="420" height="315" src="//www.youtube.com/embed/OSGv2VnC0go" frameborder="0" allowfullscreen></iframe>'})
{'msg': 'media added'}

Adding an external asset (here: YouTube link):

>>> POST("/123/content/27ba6f3a-ec4a-11e1-82db-001b63a90f63/slots/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa/media",
...                      {"type": "external",
...                       "title": "Media 3",
...                       "url_type": "youtube",
...                       "url": "http://youtu.be/OSGv2VnC0go"})
{'msg': 'media added'}

Adding an external asset of the type 'audio' with a list of urls to the audio file in different encodings:

>>> POST("/123/content/27ba6f3a-ec4a-11e1-82db-001b63a90f63/slots/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa/media",
...                      {"type": "external",
...                       "title": "Media 4",
...                       "url_type": "audio",
...                       "urls": [{"url": "http://www.w3schools.com/html/horse.mp3"},
...                                {"url": "http://www.w3schools.com/html/horse.ogg",
...                                 "mimetype": "audio/ogg"}]
...                      })
{'msg': 'media added'}

Parameters

type:

The type of the media slot, also please note that there are additional parameters depending on the type specified here

required

Example value: "file"

Values must be any of the following

embed:

embed code

external:

external asset

file:

a file from the MP instance's file library

title:

The slide title

optional

Default: None

Example value: "The Colosseum"

content:

see HTML-XML

optional

Default: None

Example value: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.<p>"

Values must obey all the conditions

  • Value must not contain unicode characters x00-x08 or x0b-x1f

  • XML-compliant HTML, see HTML-XML for restrictions on HTML tags

thumb_uuid:

UUID of the thumb image.

optional

Default: None

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing file UUID

  • be UUID or None

Additional parameters for type: embed

embed_code:

optional

Note

required

if the parameter type is set to 'embed'.

Default: None

Additional parameters for type: external

image_uuid:

Note

Required if type is 'file' and file_uuid is None. If type is 'external', only applies if url_type is 'audio', 'video' or 'youtube'.

optional

Default: None

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

url_type:

The type of the external asset, also please note that there are additional parameters depending on the url type specified here

optional

Note

required

if the parameter type is set to 'external'.

Default: None

Example value: "youtube"

Values must be any of the following

audio:

a (list of) audio resource(s)

soundcloud:

a Soundcloud file

video:

a (list of) video resource(s)

vimeo:

a Vimeo video

youtube:

a YouTube video

url:

optional

Note

required

if the parameter url_type is set to 'youtube', 'vimeo' or 'soundcloud'.

Default: None

Example value: "http://youtu.be/OSGv2VnC0go"

urls:

optional

Note

required

if the parameter url_type is set to 'audio' or 'video'.

Default: None

Every element of the list is a dictionary, each consisting of the following fields:

url:

required

must be an absolute URL

mimetype:

optional

Default: None

Additional parameters for type: file

image_uuid:

Note

Required if type is 'file' and file_uuid is None. If type is 'external', only applies if url_type is 'audio', 'video' or 'youtube'.

optional

Default: None

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

file_uuid:

Note

Required if type is 'file' and image_uuid is None.

optional

Default: None

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing audio file UUID

  • be UUID or None

/{iid}/content/{uuid}/slots/{slot_uuid}/media

PUT

Create/update the media inside the slot.

This resource creates/replaces the media inside the slot.

Sample Call

Set the media for the specific slot:

>>> PUT("/123/content/11111111-1111-1111-1111-111111111111/slots/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa/media",
...            {'items': [{"type": "file",
...                        "title": "Media 1",
...                        "content": "<p>This is an image of the Colosseum.</p>",
...                        "image_uuid": "d16f1ded-7255-38bf-83d2-2223728662ae",
...                        "thumb_uuid": "5a778106-5e32-3af2-9bb6-97aeacf01c8e"},
...                       {"type": "file",
...                        "title": "Audio 1",
...                        "content": "<p>This is a short audio file.</p>",
...                        "file_uuid": "a1234567-7255-38bf-83d2-2223728662ae",
...                        "thumb_uuid": "5a778106-5e32-3af2-9bb6-97aeacf01c8e"},
...                       {"type": "external",
...                        "title": "Media 3",
...                        "url_type": "youtube",
...                        "url": "http://youtu.be/OSGv2VnC0go"}]})
{'msg': 'media updated'}

Remove all media from the specific slot:

>>> PUT("/123/content/11111111-1111-1111-1111-111111111111/slots/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa/media",
...            {'items': []})
{'msg': 'media updated'}

Parameters

items:

required

Every element of the list is a dictionary, each consisting of the following fields:

type:

The type of the media slot, also please note that there are additional parameters depending on the type specified here

required

Example value: "file"

Values must be any of the following

embed:

embed code

external:

external asset

file:

a file from the MP instance's file library

title:

The slide title

optional

Default: None

Example value: "The Colosseum"

content:

see HTML-XML

optional

Default: None

Example value: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.<p>"

Values must obey all the conditions

  • Value must not contain unicode characters x00-x08 or x0b-x1f

  • XML-compliant HTML, see HTML-XML for restrictions on HTML tags

thumb_uuid:

UUID of the thumb image.

optional

Default: None

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing file UUID

  • be UUID or None

Additional parameters for type: embed

embed_code:

optional

Note

required

if the parameter type is set to 'embed'.

Default: None

Additional parameters for type: external

image_uuid:

Note

Required if type is 'file' and file_uuid is None. If type is 'external', only applies if url_type is 'audio', 'video' or 'youtube'.

optional

Default: None

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

url_type:

The type of the external asset, also please note that there are additional parameters depending on the url type specified here

optional

Note

required

if the parameter type is set to 'external'.

Default: None

Example value: "youtube"

Values must be any of the following

audio:

a (list of) audio resource(s)

soundcloud:

a Soundcloud file

video:

a (list of) video resource(s)

vimeo:

a Vimeo video

youtube:

a YouTube video

url:

optional

Note

required

if the parameter url_type is set to 'youtube', 'vimeo' or 'soundcloud'.

Default: None

Example value: "http://youtu.be/OSGv2VnC0go"

urls:

optional

Note

required

if the parameter url_type is set to 'audio' or 'video'.

Default: None

Every element of the list is a dictionary, each consisting of the following fields:

url:

required

must be an absolute URL

mimetype:

optional

Default: None

Additional parameters for type: file

image_uuid:

Note

Required if type is 'file' and file_uuid is None. If type is 'external', only applies if url_type is 'audio', 'video' or 'youtube'.

optional

Default: None

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

file_uuid:

Note

Required if type is 'file' and image_uuid is None.

optional

Default: None

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing audio file UUID

  • be UUID or None

/{iid}/content/{uuid}/path_history

GET

Get the path history of a content object.

Sample Call

>>> GET("/123/content/2e06fa2e-008e-11e0-9a76-001ec21bff9e/path_history")
{'items': [{'path': '/a-01/'},
           {'path': '/section-1/a-01/'},
           {'path': '/section-1/subsection-1-1/a-01/'}]}

/{iid}/content/{uuid}/path_history

POST

Create new path history entry for the content object.

This resource creates a new path history entry and adds it to the existing list of path history entries for the content object.

Sample Call

Add a new path history entry:

>>> POST("/123/content/2e06fa2e-008e-11e0-9a76-001ec21bff9e/path_history",
...                      {"path": "/old/path/to/content/index.html"})
{'msg': 'path added'}

Parameters

path:

The unquoted, utf-8-decoded old path to the content object.

required

Example value: "/old/path/to/content/index.html"

must be an absolute path

/{iid}/content/{uuid}/path_history

PUT

Create/update the path_history of the content object.

This resource creates/replaces the path_history of the content object.

Sample Call

Set the path history of a content object:

>>> PUT("/123/content/27ba6f3a-ec4a-11e1-82db-001b63a90f63/path_history",
...            {'items': [{"path": "/articles/my_article.html"},
...                       {"path": "/section/subsection/article/"}]})
{'msg': 'path history updated'}

Remove a content object's path history:

>>> PUT("/123/content/27ba6f3a-ec4a-11e1-82db-001b63a90f63/path_history",
...            {'items': []})
{'msg': 'path history updated'}

Parameters

items:

required

Every element of the list is a dictionary, each consisting of the following fields:

path:

The unquoted, utf-8-decoded old path to the content object.

required

Example value: "/old/path/to/content/index.html"

must be an absolute path