Content Creation URL Structure

A content creation URL must have the following overall structure:

http://your-cue-host/cue-web/#/main?parameter-list"

where your-cue-host is the host name (and possibly the port number) of your CUE host and parameter-list is a sequence of three URL parameters separated by & characters:

uri=source-id&mimetype=mime-type&extra=content-definition

These parameters must contain the following values:

uri=source-id

A source ID is a unique string used to identify a content item. The example script generates an ID from the current date and time, but you can use whatever method you choose to supply a unique string.

mimetype=mime-type

You must specify the MIME type x-ece/new-content; type=story.

extra=content-definition

content-definition is a JSON value with the following structure:

{
  "modelURI": {
    "string": "model-uri",
    "$class":"URI"
  },
  "homeSectionUri":"home-section-uri",
  "values": "content-item-field-values"
}

where:

model-uri

Is the web service URI of the content model for the content item you want to create. For more about this, see ??

home-section-uri

Is the web service URI of the section to which you want to add the new content item. For more about this, see ??

values

Is an array of field values defining the content you want to add to the new content item. You can leave this array empty if you don't want any of the fields in the new content item to be predefined, for example:

"values": {}

The fields must be identified by their names as specified in the Escenic content-type resource, not by the labels displayed in CUE. To predefine values for the title and body fields of a content item, you would need to specify:

"values": {
  "title": "This is the title",
  "body": "<p>This is the body.</p>"
}

Note that all the field names and values in the JSON structure must be enclosed in quotes, otherwise the URL will not be accepted by CUE.

The values of the three URL parameters must all be URL-encoded.