Up - API Reference - Home
A class is a collection of related fields, that can quickly be included in a definition.
The returned dictionary with classes uses the global identifier (gid
) as a key.
When you make changes to a class, you'll get a working copy. This is a temporary work in progress, where you make changes to a class without committing them yet (the original class is still active, and users will not see the work-in-progress changes yet). Once you're happy with the updated class, you can commit it (updating all definitions that include it), or save it as a new class, that can then be used by other definitions. If you're unhappy instead, you can revert it and you'll get the unmodified class again.
{
…,
"data": {
"classes": {
"db0cc42a-e928-4ba0-9e4b-c691c48899f9": {
"gid": "db0cc42a-e928-4ba0-9e4b-c691c48899f9",
"original": null,
"name": "catalog",
"label": {
"nl": "Catalogus",
"en": "Catalog"
},
"fields": [
"e1c2cd8c-c052-4ee1-a16a-b8f3f8b95a47",
"99102ad0-cc00-4c50-aec6-24dfbba230e4",
"3c7564d2-8298-445b-8173-9095bcedc8d7",
"53985be8-120f-40e2-85c6-ecdd7cfcf5b6",
"d461bc39-ce4b-4905-be66-5ce012840779"
],
"layout": "031688e7-e388-4233-b471-1e76479e6ed6",
"metadata": {},
"is_new": false,
"is_working_copy": false
}
}
}
}
gid
global identifier
original
for working copies, this points to the original class gid
name
name to be used in code, should be variable-name compatible (letters, numbers, underscores - no dashes, spaces, punctuation)
label
a localized label
fields
a list, in order, of the field gids that are part of the definition
layout
the layout gid
metadata
a dictionary of user-definable metadata fields, see metadata
is_new
indicates a newly created class that has never been committed.
is_working_copy
indicates a new or modified class that has not been committed.