Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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
Code Block
{
    "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"
        }
    ]
}


Info
iconfalse

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

Key description

Key

Type

Optionality

Description

Constraints

id

string

Status
colourBlue
titlegenerated

a 16-byte long unique string 

(a-z0-9)

name

string

Status
colourRed
titlerequired

name of the object

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

(a-z0-9_-)

type

string

Status
colourRed
titlerequired

type of the object

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

title

string

Status
colourGreen
titleoptional

human-readable title of the object

(*)

description

string

Status
colourGreen
titleoptional

human-readable description of the object

(*)

origin

string

Status
colourBlue
titlegenerated

URL that indicates the original location of an imported object

(*)

content

object

Status
colourYellow
titlevaries

actual content of the metadata object

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


accessInfo

object

Status
colourBlue
titlegenerated

metadata about the access to the object


links

array

Status
colourBlue
titlegenerated

array containing links identifying the object (self link)


accessInfo

Key

Type

Optionality

Description

Constraints

createdAt

string

Status
colourBlue
titlegenerated

timestamp of the first submission of the object to the project

(*)

createdBy

string

Status
colourBlue
titlegenerated

email of the user who created the object

(a-z0-9_-@)

modifiedAt

string

Status
colourBlue
titlegenerated

timestamp of the last time the object was modified

(*)

modifiedBy

string

Status
colourBlue
titlegenerated

email of the user who last modified the object

(a-z0-9_-@)