Hub Import API
The Purple Hub offers a REST API for importing articles with all connected metadata. For each Hub cluster, this data is required to perform the call:
Hub cluster domain
Determines the Hub cluster, data is imported to
Determines the Hub instance, data is imported to
Securing the call to import data
References the feed, data is imported to
The call is performed with the parameters above:
Request POST https://<hub-cluster-domain>/<hub-identifier>/wp-json/purple/v3/import
Headers Authorization: <authorization-token>
Post-Parameters post: <post-data>
Where post data is a JSON structure containing post content and metadata. The publication ID is also part of the post data, as outlined below.
The property „assets“ is a list of URLs referencing assets (images, etc.) that appear in the content and have to be copied to the Purple HUB.
The actual content structure is reflected by the code view of the article in the Purple Hub, except for any unique purpleId attribute, which is not expected to be given.
400 An unexpected error occurred while updating/inserting post: <error>
401 No authorization token was provided.
401 The authorization token is incorrect.
400 No JSON string was provided.
400 Could not decode JSON. Please check if the provded JSON is valid.
400 The JSON string contains no data. Nothing to do.
400 Missing post data.
400 Missing post title.
400 Missing post status.
400 The provided post status does not exist.
400 Missing post type.
400 The provided post type does not exist.
In order to make sure, that the Input transferred through the API is correct, please use this json-schema attached here as a download.