Logo Help Center

Creating Digital articles using the API of Content Station Aurora

Creating Digital articles using the API of Content Station Aurora

Info: This feature requires Content Station 11.3 or higher.

This article describes how the Content Station API can be used by 3rd-party integrations for creating Digital articles.

Supported file format versions

The currently supported file format for Digital articles is version 2.0. The previous version was version 1.2.

When during the process of handling existing Digital articles an older version is encountered, it is automatically converted to the supported version.

Note: The version of the file format that is currently supported can be found in the CS_DIGITAL_ARTICLE_VERSION setting in the Enterprise/plugins/ContentStation/config.php file of the Content Station Server plug-in.

Creating a Digital article object

Invoked Web services: CreateObjects.

To create a Digital article object, a custom object property named C_CS_FILEFORMATVERSION should be provided and should match the version field in the article JSON file:

Note: When the version is not provided, the Content Station Server plug-in will decode the file to obtain the version. This negatively affects the processing time.

{
    "method": "CreateObjects",
    "id": "1",
    "params": {
        "req": {
            ...
            "Objects": [
                {
                    "MetaData": {
                        ...
                        "ExtraMetaData": [
                            {
                                "Property": "C_CS_FILEFORMATVERSION",
                                "Values": [
                                    "2.0"
                                ],
                                "__classname__": "ExtraMetaData"
                            }
                        ],
                        "__classname__": "MetaData"
                    },
                    ...
                    "Files": [
                        {
                            "Rendition": "native",
                            "Type": "application\/ww-digital+json",
                            "Content": null,
                            "FilePath": null,
                            "FileUrl": "http:\/\/127.0.0.1\/Ent102x\/transferindex.php?fileguid=9b2bd5be-9aa8-4529-044d-507d47ad277a\u0026format=application%2Fww-digital%2Bjson",
                            "EditionId": null,
                            "ContentSourceFileLink": null,
                            "__classname__": "Attachment"
                        }
                    ],
                    ...
                    "__classname__": "Object"
                }
            ],
            ...
            "__classname__": "WflCreateObjectsRequest"
        }
    },
    "jsonrpc": "2.0"
} 

Creating a Digital article template

Digital article templates can be created in the same way that a Digital article is created. However, a file format version other than the currently supported version is not accepted by the Content Station Server plug-in and therefore it invokes the Enterprise Cloud Services to convert the template to the currently supported file format version on-the-fly.

Example: After uploading a version 1.2 template, a version 2.0 template is stored in the file store for template object version 0.1.

Saving a Digital article

Invoked Web services: SaveObjects.

Saving a Digital article or Digital article template works identical to the WflCreateObjectsRequest described above, but now a WflSaveObjectsRequest is used. The same rules and limitations as for a Digital article apply.

Getting a Digital article

Invoked Web services: GetObjects.

To retrieve a native Digital article file, a special RequestInfo parameter should be provided named DigitalArticleFileFormatVersion.

It should have the following notation:

DigitalArticleFileFormatVersion:<version>

where <version> stands for the desired file format version of the Digital article file.

The following example shows how to request a 2.0 version:

{
    "method": "GetObjects",
    "id": "1",
    "params": {
        "req": {
            "Ticket": "...",
            "IDs": [
                "123"
            ],
            "Lock": true,
            "Rendition": "native",
            "RequestInfo": [
                "DigitalArticleFileFormatVersion:2.0",
                ...
            ],
            ...
            "__classname__": "WflGetObjectsRequest"
        }
    },
    "jsonrpc": "2.0"
}

Notes:

  • When DigitalArticleFileFormatVersion is omitted, it is assumed that version 1.2 is wanted.
  • When version 1.2 is present in the file store and version 2.0 is requested, the Content Station Server plug-in will request the Enterprise Cloud Services to convert the version 1.2 article to version 2.0.
  • When version 2.0 is present and version 1.2 is requested, it will fail because conversion to 1.2 is not supported.
  • Digital article templates can be retrieved in the same way as Digital articles. The same rules and limitations as for a Digital article apply.

Deleting and restoring from the Trash Can

Invoked Web services: DeleteObjects and RestoreObjects

Digital articles (and templates) can be sent to the Trash Can and restored from the Trash Can in the usual way.

When the Digital article template has a different file format version than the current version the Content Station Server plug-in, an error will appear when running the Health Check, even when the file is found in the Trash Can. Such files have to be permanently deleted (removed from the Trash Can).

Restoring Digital article object versions

Invoked Web services: RestoreVersion, GetVersion and ListVersions.

Older versions of Digital article objects can be restored. Note that an old version may have an old file format version.

Example:

Suppose version v0.1 has format 1.2 and version v0.2 has format 2.0. By restoring version v0.1 of this article, a copy of that version is made as the actual version v0.3 which has format 1.2.

When restoring a Digital article template, the Content Station Server plug-in will prevent an older file format version to become the most active one. If that is about to happen, the plug-in invokes the Enterprise Could Service to convert the restored template on-the-fly to the currently supported file format version.

Creating a print variant from a Digital article

Invoked Web services: InstantiateTemplate, CreateObjectOperation.

A print variant of a Digital article can be created in the following ways:

  • Through the context menu of a Digital article listed in the search results
  • By dragging a Digital article onto a layout preview

For detailed information, see Creating a print variant of a Digital article.

In both cases, when the file format version of the Digital article is not the currently supported version, the Content Station Server plug-in invokes the Enterprise Cloud Services to convert the article to the current version on-the-fly.

However, this does not result in a new version for the Digital article, but it is used as input to create the print variant. In other words: the Digital article remains untouched (even when it has an older file format version) yet a print variant is created.

For the end user there is no difference in the system response, nor is there for Content Station a need to act differently; it is all handled by the back-end.

Was this article helpful?
0 out of 0 found this helpful / Created: / Updated:
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.