Common syntax

All metadata object types are based on a common template.

The keys in this template are necessary to uniquely identify the object and store it in a database. Most of these keys are automatically generated by the application.

Syntax example

Common metadata object syntax
{
    "id": "abcdefgh12345678",
    "name": "my_view",
    "type": "view",
    "title": "My view",
    "description": "In this view, you'll see a lot of interesting things.",
    "origin": "https://secure.clevermaps.io/rest/projects/$projectId/md/datasets?name=view_name",
    "content": {
       ...
    },
    "accessInfo": {
        "createdAt": "2017-01-01T00:00:00Z",
        "createdBy": "tomas.schmidl@clevermaps.io",
        "modifiedAt": "2017-01-02T00:00:00Z"
        "modifiedBy": "tomas.schmidl@clevermaps.io"
    },
	"links": [
        {
            "rel": "self",
            "href": "/rest/projects/$projectId/md/views/abcdefgh12345678"
        }
    ]
}

(lightbulb)  The example above is a view object that has been imported by CleverMaps Shell.

Key description

KeyTypeOptionalityDescriptionConstraints
idstring

GENERATED

a 16-byte long unique string 

(a-z0-9)
namestring

REQUIRED

name of the object

must be unique across the project, must be the same as the .json filename

(a-z0-9_-)
typestring

REQUIRED

type of the object

[dashboard, dataPermissiondataset, exportindicator, indicatorDrill, marker, markerSelector, metric, projectSettings, shareview]
titlestring

OPTIONAL

human-readable title of the object(*)

description

stringOPTIONALhuman-readable description of the object(*)
originstringGENERATEDURL that indicates the original location of an imported object(*)
contentobjectVARIES

actual content of the metadata object

mandatory in all object types except datasets, they have a ref key


accessInfoobjectGENERATEDmetadata about the access to the object
linksarrayGENERATED

array containing links identifying the object (self link)


accessInfo

KeyTypeOptionalityDescriptionConstraints
createdAtstringGENERATEDtimestamp of the first submission of the object to the project(*)
createdBystringGENERATEDemail of the user who created the object(a-z0-9_-@)
modifiedAtstringGENERATED

timestamp of the last time the object was modified

(*)
modifiedBystringGENERATEDemail of the user who last modified the object(a-z0-9_-@)