Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Replace "value" with "data" dictionary
Excerpt

Add tagged content to the system. The content must be pushed using endpoint 9003: Publish content before it can be accessed.

 

:JSON :Optional fields::value: numeric value::"contentbase64 encoded content string",value6.8

Endpoint ID:

9001

Method:

Image Modified

URL:

POST /user/content/

Request body:

JSON data with information about the content to be created.

Required fields:
 

tags

An 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-_]*
Optional fields:
 

content

The content, formatted as a base64 encoded text string.

 contentType
The content mime-type, i.e. "image/gif" or "text/plain". If omitted, the content type is set to "text/html" if content is included, or "application/json" if data is included.
 
data

A dictionary of strings or decimal

values. These values can be used for search filtering.

Note

String data values will only be compared with string filter values, and numeric data values will only be compared with numeric filter values. So ensure that numeric values are entered as numbers, i.e. 5.9 not "5.9".

Numeric values are not culture-specific. Use period "." as decimal separator, and do not use thousand separators.

 titleA title string.
 activeFrom

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

 activeTo

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

Code Block
titleExample 1
{
   "tags": [ "tag1", "tag2" ],
   "content": "PGh0bWw+PGJvZHk+TW9yZSBIVE1MIGNvbnRlbnQ8L2JvZHk+PC9odG1sPg==",
   "contentType": "text/html",
   
"data": {
      "width": "
300px",
      "height": "50px",
      "
a": 
5.5,
      "b": 15
   },
   "activeFrom": "2014-01-01T01:00Z",
   "activeTo": "2014-03-25T23:00Z"
}
Code Block
titleExample 2
 {
   "tags": [ "tag1", "tag2", "tag3" ],
   "content": "*base64 encoded image*",
   "contentType": "image/png",
   "title": "little image.png"
}

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.

Code Block
titleExample
{
   "contentID": 4567
}

Status codes:

201

     

Content created successfully.

...