Unicat API Reference

Up - API Reference - Home


data cc.projects

A project is a collection of records, their definitions, and assets. The product catalog, if you will.

We store the languages, channels, orderings, fieldlists, and backups related to the project here.

Project data comes in two forms, a complete version for the current project, and a short version for other projects for this user.

The returned dictionary uses the global identifier (gid) as a key.

Short projects data

{
    ,
    "data": {
        "cc.projects": {
            "84a1b5e4-fb5d-4ad6-a497-a3cf5eaf29b1": {
                "gid": "84a1b5e4-fb5d-4ad6-a497-a3cf5eaf29b1",
                "name": "Documentation Catalog",
                "icon": "84a1b5e4-fb5d-4ad6-a497-a3cf5eaf29b1.jpg",
                "owner": "d05ba499-df89-4de3-9d83-c68b64c3856b",
                "status": "active",
            }
        }
    }
}

Complete projects data

{
    ,
    "data": {
        "cc.projects": {
            "84a1b5e4-fb5d-4ad6-a497-a3cf5eaf29b1": {
                "gid": "84a1b5e4-fb5d-4ad6-a497-a3cf5eaf29b1",
                "name": "Documentation Catalog",
                "icon": "84a1b5e4-fb5d-4ad6-a497-a3cf5eaf29b1.jpg",
                "owner": "d05ba499-df89-4de3-9d83-c68b64c3856b",
                "status": "active",
                "options": {
                    "timezone": "Europe/Amsterdam",
                    "languages": [
                        "en"
                    ],
                    "channels": {
                        "__all__": "[all records]",
                        "650ebd0f-eab5-41d7-87c1-1dc5334af872": "Webshop",
                        "4782d5f5-b62b-4ecb-bf71-5be637a15dc5": "Catalog",
                        "23d17876-e3cb-4acf-8eeb-a0154ca83a75": "Pricelist"
                    },
                    "orderings": {
                        "87b53a4e-359d-45c7-81cb-5e1c3ef444ec": "Catalog",
                        "f6c547a3-23ec-4e70-92bc-1826ae53570a": "Pricelist"
                    },
                    "fieldlists": {
                        "31cbd8ac-4f13-4ac3-8924-752ea94d1c65": "Stentor Webshop",
                        "350988c6-22ce-4a74-a2b7-1c25b23eea27": "Catalogger Catalog"
                    },
                    "imageserver": {
                        "type": "ccdam",
                        "options": {}
                    },
                    "orderedchannels": [
                        "__all__",
                        "650ebd0f-eab5-41d7-87c1-1dc5334af872",
                        "4782d5f5-b62b-4ecb-bf71-5be637a15dc5",
                        "23d17876-e3cb-4acf-8eeb-a0154ca83a75"
                    ],
                    "orderedorderings": [
                        "87b53a4e-359d-45c7-81cb-5e1c3ef444ec",
                        "f6c547a3-23ec-4e70-92bc-1826ae53570a"
                    ],
                    "orderedfieldlists": [
                        "31cbd8ac-4f13-4ac3-8924-752ea94d1c65",
                        "350988c6-22ce-4a74-a2b7-1c25b23eea27"
                    ]
                },
                "backups": {
                    "versions": [
                        {
                            "version": 1,
                            "name": "Initial snapshot",
                            "created_by": "Unicat",
                            "timestamp": 1704987463.573794
                        }
                    ],
                    "next_version": 2
                },
                "build": 88
            }
        }
    }
}

Project properties

gid¹ global identifier
name¹ project's name
icon¹ project's icon
owner¹ the gid of the user that owns this project
status¹ only active projects can be accessed
options a collection of additional values, described below
build whenever the underlying search engine requires a rebuild, this number is increased (managed automatically)
backups keep track of backups (by version), described below

¹ These are public properties

options

timezone the timezone used to display date/time values for the project - backend storage is always in UTC - this differs from the user's timezone option because the project date/time display can be used in a generated catalog, independent of user
languages a list, in order, of the languages the project uses
channels a dictionary that holds the user-defined (and system) channels - the __all__ key is for the system-defined channel that has all the records
orderedchannels a list, in order, of the channel keys
orderings a dictionary that holds the user-defined orderings
orderedorderings a list, in order, of the ordering keys
fieldlists a dictionary that holds the user-defined fieldlists
orderedfieldlists a list, in order, of the fieldlist keys
imageserver the service we use for the assets - for now we only support the internal ccdam service

backups

next_version the version number used if we create the next backup
versions a list of all available backups

A single backup has fields:

version the version number
name a user-defined name for the backup, defaults to 'Backup {version}'
created_by the name of the user or system or module that created the backup
timestamp a server-side timestamp when the backup was created

Publishing

For any publication you can pick and choose which of the languages, channels, orderings, and fieldlists you apply.

languages

Localize your product information. Your product description will be different in another language, while the length may be language-independent.

channels

Control which records are published. You can also use this to define a Spring Collection or something similar. A record will only have the channel key in its channel property if it is active in the channel.

orderings

Manually control the order in which records are published. For each of the defined orderings, a record will have a numeric value that indicates its position relative to its siblings.

fieldlists

Control which extra fields are published. All articles have e.g. article number and price fields, but for some you may want to publish extra length and width fields. For each of the defined fieldlists, a definition will have a list of fields, in order, that should be published besides the regular fields.