Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

Create content

 

Endpoint ID:

9001

Method:

URL:

POST /user/content/

Request body:

JSON data with information about the content to be created.

Required fields:
 

tags:

JSON array of Tags. At least one Tag must be present in the array. Tags must be url-safe, conforming to Regular Expression pattern:

[a-zA-Z]+[a-zA-Z0-9-_]*
 

content:

The content, formatted as a base64 encoded text string.

Optional fields:
 contentType:The content mime-type, i.e. "image/gif" or "text/plain". If omitted, the content type is set to "text/html".
 value:A decimal numeric value.
 activeFrom:

A UTC date specifying the start of the content availability period.

 activeTo:

A UTC date specifying the end of the content availability period.

Example
{
   "tags": [ "tag1", "tag2" ],
   "contentType": "text/html",
   "content": "base64 encoded content string",
   "value": 6.8,
   "activeFrom": "2014-01-01T01:00Z",
   "activeTo": "2014-03-25T23:00Z"
}

Response body:


A JSON object containing the "contentID" of the newly created content. This identifier is used to publish content, and to connect entities to private content.

Example
{
   "contentID": 4567
}

Status codes:

201

Content created successfully.

 

 



  • No labels