Import data options¶
There are multiple ways on how data can be imported to the RebelMouse platform. The most popular and fastest way is to provide us with data if a format described in this section.
Here are base definitions:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://rebelmouse.com/schemas/base.json",
"definitions": {
"tags": {
"type": "array",
"items": {"type": "string"},
"uniqueItems": true,
"maxLength": 100
},
"authors": {
"description": "List of authors slugs to be used as keys to describe a set of authors",
"type": "array",
"items": {"$ref": "base.json#/definitions/slug"},
"uniqueItems": true,
"maxLength": 10
},
"sections": {
"description": "List of sections defined by their full path. Use '/' for frontpage.",
"type": "array",
"items": {"$ref": "base.json#/definitions/full_path"},
"uniqueItems": true
},
"timestamp": {
"type": "string",
"format": "date-time"
},
"html": {
"description": "HTML field",
"type": "string"
},
"full_path": {
"description": "Absolute path part of the URL.",
"type": "string",
"format": "iri-reference"
},
"slug": {
"type": "string",
"pattern": "[a-z0-9-]{2,100}"
},
"metadata": {
"description": "An object containing additional data that may be required for a model",
"type": "object",
"example": {"field_is_member": true}
}
}
}
Here are entities you need to consider:
Assets / Images¶
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://rebelmouse.com/schemas/image.json",
"title": "Image",
"description": "Describes image object with related caption, credit and alt fields",
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "Full URL to image file",
"format": "iri",
"maxLength": 500
},
"caption": {
"type": "string",
"maxLength": 1000
},
"credit": {
"type": "string",
"maxLength": 1000
},
"alt": {
"type": "string",
"maxLength": 500
}
},
"required": ["url"],
"additionalProperties": false
}
Posts / Articles¶
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://rebelmouse.com/schemas/post.json",
"title": "Post",
"description": "Describes basic post object",
"type": "object",
"properties": {
"social_teaser": {"$ref": "image.json"},
"teaser": {"$ref": "image.json"},
"lead_image": {"$ref": "image.json"},
"authors": {"$ref": "base.json#/definitions/authors"},
"sections": {"$ref": "base.json#/definitions/sections"},
"primary_section": {"$ref": "base.json#/definitions/full_path"},
"tags": {"$ref": "base.json#/definitions/tags"},
"internal_tags": {"$ref": "base.json#/definitions/tags"},
"created_ts": {"$ref": "base.json#/definitions/timestamp"},
"scheduled_at": {"$ref": "base.json#/definitions/timestamp"},
"body": {"$ref": "base.json#/definitions/html"},
"brief": {"$ref": "base.json#/definitions/html"},
"basename": {"$ref": "base.json#/definitions/slug"},
"video": {
"description": "Full URL to supported video",
"type": "string",
"format": "iri",
"maxLength": 500
},
"status": {"enum": ["publish", "draft", "deleted"]},
"original_id": {
"description": "Id of the original post. Useful for debugging purposes for ease search between original and imported posts",
"type": "string"
},
"headline": {"type": "string"},
"subheadline": {"type": "string"},
"frontpage_headline": {"type": "string"},
"page_title": {"type": "string"},
"layout_name": {"type": "string"},
"metadata": {"$ref": "base.json#/definitions/metadata"}
"exclude_from_search_results": {
"type": "boolean",
"default": false
}
},
"required": ["headline", "basename", "created_ts", "status"],
"additionalProperties": false
}
Sections / Categories¶
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://rebelmouse.com/schemas/section.json",
"title": "Section",
"type": "object",
"description": "Describes section object with basic fields",
"properties": {
"full_path": {
"$ref": "base.json#/definitions/full_path",
"description": "Full path part of the section. Slash is used when you want to describe a path to a nested section",
"examples": ["news", "news/politics", "animals/cats"]
},
"title": {
"type": "string",
"maxLength": 100
},
"status": {
"enum": ["private", "public", "unlisted"]
},
"about": {
"$ref": "base.json#/definitions/html",
"description:": "Short HTML description of the section",
"maxLength": 1024
},
"tags": {"$ref": "base.json#/definitions/tags"}
},
"required": ["full_path", "title", "status"],
"additionalProperties": false
}