Skip to content

Content Management

Jean-Sébastien Sevestre edited this page Nov 16, 2018 · 18 revisions

Obtain the api object using the authentification method explained in Getting Started or in Authentication and connection

Content Listing

contents = api.get_call("content", "list", body={"lang":"en"})

Content details

content = api.get_call("content", "get",uid=5386179638984704)

Content creation

new_content = {"type": "page",
               "template": content[template], # from existing content or template
               "customContentType": content["customContentType"],
               "customer": content["customer"],
               "instance": content["instance"],
               "feedKeys": content["feedKeys"], 
               "publicationDate": content[publicationDate],
               "title": {"en": "created content from api"},
               "slug": {"en": "create-content-from-api"}, # WARNING : unique
               "metadata": [], # if any
           }

new_content_saved = api.get_call("content","save",body=new_content)

Clone this wiki locally