Building Blocks

This part of the documentation will be about the core concepts of Gentics Mesh.

You will learn:

  • What is needed to setup a project?

  • What are the core concepts and most relevant parts of the API to get started?

  • How to design your content model?

  • How to manage users and permissions?

Project

In Gentics Mesh a project is the place to organize all the contents and media assets for a given project, e.g. a product catalogue website, your blog, your company intranet, an e-commerce website, a social community app - you name it. You can create as many projects as you would like.

A project represents the base element of your content structure, which includes your actual content items called nodes as well as tag families. The tags for tagging content items are grouped in tag families and are defined for a specific project. Schemas are assigned to projects in order to specify what types of nodes can be created. Users have access to a project and its contained content items depending on the role(s) they’ve been assigned.

Gentics Mesh creates a root or base node for each project. As you will learn soon, each node needs to have a schema it follows. Hence, when creating a new project you need to name a schema. You can use the folder schema which is shipped with Gentics Mesh.

API endpoints

Description API endpoint

Create a project

POST /api/v2/projects/

Get all projects

GET /api/v2/projects/

Get a project

GET /api/v2/projects/:projectUuid

Update a project

POST /api/v2/projects/:projectUuid

Delete a node

DELETE /api/v2/projects/:projectUuid

Response Sample

{
  "uuid" : "d3b1840b01464b54b1840b0146cb54f5",
  "creator" : {
    "firstName" : "Joe",
    "lastName" : "Doe",
    "uuid" : "589319933be24ec79319933be24ec7fe"
  },
  "created" : "2018-10-12T14:15:06.024Z",
  "editor" : {
    "firstName" : "Joe",
    "lastName" : "Doe",
    "uuid" : "589319933be24ec79319933be24ec7fe"
  },
  "edited" : "2018-11-20T20:12:01.084Z",
  "name" : "New project name",
  "rootNode" : {
    "uuid" : "adaf48da8c124049af48da8c12a0493e"
  },
  "permissions" : {
    "create" : true,
    "read" : true,
    "update" : false,
    "delete" : true,
    "publish" : false,
    "readPublished" : false
  }
}

Node

Content items in Gentics Mesh are called nodes and represent the main structural building blocks for your content. A node is a specific piece of content within your project. The type of a node is always defined by the assigned schema. For example, in a product catalogue website you would create content types like product, product categories, product images, and product manuals.

In Gentics Mesh every content item is a node, there is no separate concept for media assets such as images, videos, and documents. Instead content types for them can be defined individually giving you the freedom to store any metadata with your assets. For your convenience Gentics Mesh is shipped with four default schemas - image, video, audio and document to be customized to your needs and liking!

Nodes can be hierarchically structured if the schema is allowing this. They can be tagged by any number of tags. Furthermore, nodes can be translated into other languages, thus supporting multiple locales.

It is important to understand that a node is just a container for language variants. These language variants will store the actual fields. You can query individual language variants by appending the ?lang query parameter. The language json property within an update or create request will be used to identify which language variant should be created or updated.

API endpoints

Description API endpoint

Create a new node

POST /api/v2/:projectName/nodes

Get all nodes of a project

GET /api/v2/:projectName/nodes

Get a node

GET /api/v2/:projectName/nodes/:nodeUuid

Update a node

POST /api/v2/:projectName/nodes/:nodeUuid

Delete a node

DELETE /api/v2/:projectName/nodes/:nodeUuid

Update an image, video, or document

POST /api/v2/:projectName/nodes/:nodeUuid/binary/:fieldName

Get an image, video, or document - Crop & resize images

GET /api/v2/:projectName/nodes/:nodeUuid/binary/:fieldName

Crop & resize and update an image

POST /api/v2/:projectName/nodes/:nodeUuid/binaryTransform/:fieldName

Get all child nodes

GET /api/v2/:projectName/nodes/:nodeUuid/children

Delete the language specific content of a node

DELETE /api/v2/:projectName/nodes/:nodeUuid/language/:language

Get the publish status for the given language of a node

GET /api/v2/:projectName/nodes/:nodeUuid/language/:language/published

Move a node

POST /api/v2/:projectName/nodes/:nodeUuid/moveTo/:toUuid

Get a navigation object

GET /api/v2/:projectName/nodes/:nodeUuid/navigation

Get the published status of a node

GET /api/v2/:projectName/nodes/:nodeUuid/published

Publish a node

POST /api/v2/:projectName/nodes/:nodeUuid/published

Unpublish a node

DELETE /api/v2/:projectName/nodes/:nodeUuid/published

Get the tag list of a node

GET /api/v2/:projectName/nodes/:nodeUuid/tags

Update the tag list of a node

POST /api/v2/:projectName/nodes/:nodeUuid/tags

Tag a node

POST /api/v2/:projectName/nodes/:nodeUuid/tags/:tagUuid

Remove a tag from a node

DELETE /api/v2/:projectName/nodes/:nodeUuid/tags/:tagUuid

Response Sample

{
  "uuid" : "c5ac82fa1a9c43b6ac82fa1a9ca3b61c",
  "creator" : {
    "firstName" : "Joe",
    "lastName" : "Doe",
    "uuid" : "589319933be24ec79319933be24ec7fe"
  },
  "created" : "2018-10-12T14:15:06.024Z",
  "editor" : {
    "firstName" : "Joe",
    "lastName" : "Doe",
    "uuid" : "589319933be24ec79319933be24ec7fe"
  },
  "edited" : "2018-11-20T20:12:01.084Z",
  "parentNode" : {
    "uuid" : "688f7beae8d240bf8f7beae8d2a0bf2e",
    "displayName" : "parentNodeDisplayName"
  },
  "tags" : [ {
    "name" : "red",
    "uuid" : "2e1c9ac190fe49d69c9ac190fee9d6fe",
    "tagFamily" : "colors"
  }, {
    "name" : "green",
    "uuid" : "8931caed445d4d1cb1caed445d0d1c8c",
    "tagFamily" : "colors"
  }, {
    "name" : "car",
    "uuid" : "c5ac82fa1a9c43b6ac82fa1a9ca3b61c",
    "tagFamily" : "vehicles"
  }, {
    "name" : "ship",
    "uuid" : "86c0a2b6435d434280a2b6435da34247",
    "tagFamily" : "vehicles"
  } ],
  "schema" : {
    "name" : "content",
    "uuid" : "e287e8a7497940ac87e8a7497940ac82",
    "version" : "1.0"
  },
  "fields" : {
    "name" : "Name for language tag en",
    "filename" : "dummy-content.en.html",
    "teaser" : "Dummy teaser for en",
    "content" : "Content for language tag en"
  },
  "breadcrumb" : [ {
    "uuid" : "ca6c7df3f45b48d4ac7df3f45ba8d42f",
    "displayName" : "Automobiles",
    "path" : "/automobiles"
  }, {
    "uuid" : "adaf48da8c124049af48da8c12a0493e",
    "displayName" : "DeLorean DMC-12",
    "path" : "/automobiles/delorean-dmc-12"
  } ],
  "permissions" : {
    "create" : true,
    "read" : true,
    "update" : false,
    "delete" : false,
    "publish" : false,
    "readPublished" : false
  }
}

Schema

Typically, each project will require a set of different content types. Together they can be considered the content model of your project. Staying with the example of a product catalogue website: a product, product category, product image, and product manual each represent a separate content type. In Gentics Mesh, a schema is used to define such content types in terms of a couple of standard fields (e.g. uuid, name, description, version, etc.) and an arbitrary number of custom fields. Available field types are string, number, HTML, date, binary, list, node, micronode, boolean. You can think of a schema as a blueprint for new content items.

Using the container property, a schema can be configured to allow for hierarchically structuring nodes. Nodes based on a such a schema may contain child nodes. This is the basis for building content trees in Gentics Mesh and leveraging the power of automatic navigation menus, breadcrumbs and pretty URLs.

API endpoints

Description API endpoint

Create a schema

POST /api/v2/schemas/

Get all schemas

GET /api/v2/schemas/

Get a schema

GET /api/v2/schemas/:schemaUuid

Update a schema

POST /api/v2/schemas/:schemaUuid

Delete a schema

DELETE /api/v2/schema/:schemaUuid

Create a changeset for migrating a schema and all affected nodes

POST /api/v2/schema/:schemaUuid/diff

Migrate a schema and all affected nodes with a set of changes

POST /api/v2/schema/:schemaUuid/changes

Response Sample

{
  "uuid" : "c5ac82fa1a9c43b6ac82fa1a9ca3b61c",
  "displayField" : "name",
  "segmentField" : "name",
  "container" : false,
  "description" : "Example schema description",
  "name" : "ExampleSchema",
  "fields" : [ {
    "name" : "name",
    "label" : "Name",
    "required" : false,
    "noIndex" : false,
    "type" : "string"
  }, {
    "name" : "number",
    "label" : "Number",
    "required" : false,
    "noIndex" : false,
    "type" : "number"
  }, {
    "name" : "html",
    "label" : "Teaser",
    "required" : false,
    "noIndex" : false,
    "type" : "html"
  }, {
    "name" : "list",
    "label" : "List of nodes",
    "required" : false,
    "noIndex" : false,
    "listType" : "node",
    "type" : "list",
    "allow" : [ "content", "video" ]
  }, {
    "name" : "node",
    "required" : false,
    "noIndex" : false,
    "type" : "node",
    "allow" : [ "content", "video", "image" ]
  }, {
    "name" : "location",
    "label" : "Location",
    "required" : false,
    "noIndex" : false,
    "type" : "micronode",
    "allow" : [ "geolocation" ]
  }, {
    "name" : "locationlist",
    "label" : "List of Locations",
    "required" : false,
    "noIndex" : false,
    "listType" : "micronode",
    "type" : "list",
    "allow" : [ "geolocation" ]
  } ],
  "microschema" : false,
  "permissions" : {
    "create" : true,
    "read" : true,
    "update" : true,
    "delete" : true,
    "publish" : false,
    "readPublished" : false
  }
}

Schema Field

Gentics Mesh allows you to define custom content types with a set of schema fields. A field is defined by an object which must have the following properties:

  • name A unique name to identify the field.

  • type The type of data to be stored in this field.

The following optional properties may be applied to any type of field:

  • required If true, this field may not be left empty.

  • label A human-readable label for the field to be used as a form label in the Gentics Mesh User Interface. If not defined, the name field would be used.

  • elasticsearch The Elasticsearch custom mapping options of the field.

In addition to the above, certain types expose additional properties with which to configure the field. Such additional properties are defined in the Schema Field Types section.

Elasticsearch integration

The elasticsearch property of a schema field can be used to fine-tune the Elasticsearch integration. The property can contain additional options which can be used to influence how the field information is added to the search index.

A typical example is the addition of a raw field. Sometimes it may be useful to store a field in the Elasticsearch index without being tokenized first. This is useful for term queries which are used to find the exact term specified in the query.

By default no raw field will be added to the search index. You can however use the elasticsearch property to add this field to the index.

The raw field can be added by specifying a custom field mapping. The JSON of the custom mapping will be added to the full index mapping which Gentics Mesh is generating via the schema. You can read more about how to define field mappings in the fields mapping documentation of Elasticsearch.

{
  "name": "dummySchema",
  "displayField": "name",
  "fields": [
    {
      "name": "name",
      "label": "Name",
      "required": true,
      "type": "string",
      "elasticsearch": {
        "raw": {
          "index": "not_analyzed",
          "type": "string"
        }
      }
    }
  ]
}
Raw field values which exceed 32KB in size will automatically be truncated to be indexable.

The elasticsearch property can also be used to add field mappings which utilize custom analyzers. You can define custom analyzers and tokenizers within the top level elasticsearch property of the schema. Once a new analyzer has been defined in the toplevel elasticsearch property it can be referenced by custom field mappings which can now be added to each field.

Schema Field Types

Typical example for a string schema field:

{
    "name" : "name",
    "label" : "Name",
    "required" : true,
    "type" : "string",
    "allow": ["red", "green", "blue"],
    "elasticsearch": {
        "raw": {
            "index": "not_analyzed",
            "type": "string"
        }
    }
}
String

A string field type is used for textual content, like title, names or paragraphs of text. The required property indicates if the field is mandatory or not. The optional allow property acts as a whitelist for allowed field values.

Number

The number field type is used for whole and decimal numbers. The required property indicates if the field is mandatory or not.

The optional min property specifies the lowest permitted value.

The optional max property represents the greatest permitted value.

The optional step property allows specifying the size of the permitted increment in value.

Date

The date field type stores a date as ISO8601 formatted date string. The required property indicates if the field is mandatory or not.

Boolean

The boolean field type doesn’t have any specific configuration settings. The required property indicates if the field is mandatory or not.

HTML

The html field type stores HTML data. The required property indicates if the field is mandatory or not.

Micronode

A micronode field type stores a single micronode. A micronode is similar to a node. Typically they do not exist on their own but are tied to their (parent) node, e.g. a caption to be used in a image node. For a detailed description see our definition of Micronode & Microschema. The required property indicates if the field is mandatory or not.

A micronode field type must have an allow property that acts as a whitelist for allowed microschemas. If allow is an empty array, any type of micronode may be used.

Node

A node field type is used to specify a structural relationship between nodes. This kind of reference represents a 1:1 relationship. The required property indicates if the field is mandatory or not.

A node field type must have an allow property, which acts as a whitelist for schemas which may be used. If allow is an empty array, any type of node may be used.

List

A list field type allows for specifying a list with elements on the basis of other field types and thus represents a powerful mechanism for building your content model:

(1) Within a node you can have simple lists of arbitrary length. The listType property then has to be of type string, number, date, boolean, or HTML. E.g. handling your recipe nodes of your food blog will be a breeze with string-typed lists for ingredients.

(2) You can unleash the power of micronodes, by specifying a list with the listType property set to micronode, and the allow property set to the allowed microschemas. For example, besides having title, teaser, date and author fields, your blog post schema could define a content field of type list allowing to insert any of your microschemas (e.g. YouTube Video, Image, Text, Galleries, Google Maps, etc.).

(3) Furthermore, a list field type can be used to specify a structural relationship between nodes. In this case, the listType property has to be of type node. This kind of reference represents a 1:n relationship. E.g., in your movie database app, you might want to list all actors of a movie. The required property indicates if the field is mandatory or not.

A micronode/node listType must have an allow property, which acts as a whitelist for microschemas/schemas which may be used. If allow is an empty array, any type of node may be used.

Binary

The binary field type is used to store binary data, e.g., image, video, audio and documents. Depending on the actual data and configuration, Gentics Mesh will store related metadata e.g., fileName, fileSize, mimeType, sha512sum and for images specifically width, height, and dominantColor. Gentics Mesh will set values for all metadata properties automatically when uploading an image. The meta data properties mimeType, dominantColor and fileName can be changed on subsequent update requests. See the file upload documentation for more information.

The required property indicates if the field is mandatory or not.

The checkServiceUrl (string) property indicates whether binaries must be checked by an external service before being available for download. When the property is set, new binaries will have a check status of `POSTPONED until the check service sets the status to either ACCEPTED or DENIED. Requests for binaries with a status other than ACCEPTED will result in a 404 Not Found response with the information that the binary has not been accepted (yet). Mesh will regularly send requests to the configured check service to validate the uploaded binary data, which is expected to send the result to the binary check callback endpoint. See the file upload documentation for more information.

The extract property controls how Gentics Mesh will extract data from the uploaded binary.

extract.content (boolean)

Extracts and sends plain text content to Elasticsearch if available.

extract.metadata (boolean)

Extracts and sends metadata to Elasticsearch. An example for metadata is exif data from JPGs.

Example of a complete binary field schema:

{
    "name" : "binary_content",
    "label" : "Binary Content",
    "required" : false,
    "type" : "binary",
    "checkServiceUrl": "http://localhost:3000/check",
    "extract": {
        "content": true,
        "metadata": false
    }
}

Setting the extract object will override the global configurations for parsing (upload.parser) and indexing (search.includeBinaryFields) uploads for this field.

Setting the global metadata whitelist (upload.metadataWhitelist) will filter the parsed metadata accordingly.

Micronode & Microschema

A micronode is similar to a node. It also follows a schema - a microschemaModel. It is bound to a node and thus is not directly accessible from within the project node tree structure.

With micronodes it is possible to build complex object data structures as they are basically representing subnodes of nodes.

Typical use cases for micronodes are content items that do not exist on their own but are tied to their (parent) node, e.g., media elements of your blog post such as YouTube videos, image galleries, Google maps, image captions, vcards, quotes, text paragraphs. As another example consider a recipe having a list of ingredients which in turn consist of a name and a quantity.

Nodes can contain micronodes. Micronodes, however, can not contain further micronodes, thus limiting the nesting level to one.

API endpoints

Description API endpoint

Create a microschemaModel

POST /api/v2/microschemas/

Get all microschemas

GET /api/v2/microschemas/

Get a microschemaModel

GET /api/v2/microschemas/:microschemaUuid

Update a microschemaModel

POST /api/v2/microschemas/:microschemaUuid

Delete a microschemaModel

DELETE /api/v2/microschemas/:microschemaUuid

Create a changeset for migrating a microschemaModel and all affected nodes

POST /api/v2/microschemas/:microschemaUuid/diff

Migrate a microschemaModel and all affected nodes with a set of changes

POST /api/v2/microschemas/:microschemaUuid/changes

Properties

Microschemas share the same properties as schemas except for the properties displayField, container, and segmentField, which are not available in a microschemaModel.

Schema Field Types

In comparison to nodes, micronodes can be built with schema field types String, Number, Date, Boolean, HTML, Node, and Lists.

Fields of type list in micronodes can be of type: String, Number, Date, Boolean, HTML, and Node.

Example

Tag

Gentics Mesh allows tagging of nodes and content branches. Tags of a specific kind are always part of a tag family.

A typical example would be:

The tags red, green, blue belong to the tag family colors.

Tags can’t be hierarchically structured, are not translatable and can only applied to nodes and branches.

If you don’t want to work with uuids you can also specify the tags within the node update or node create request. The given tag list will automatically be applied to the node. Any missing tags in the list will be removed from the node.

API endpoints

Description API endpoint

Get the tag list of a node

GET /api/v2/:projectName/nodes/:nodeUuid/tags

Update the tag list of a node

POST /api/v2/:projectName/nodes/:nodeUuid/tags

Tag a node

POST /api/v2/:projectName/nodes/:nodeUuid/tags/:tagUuid

Remove a tag from a node

DELETE /api/v2/:projectName/nodes/:nodeUuid/tags/:tagUuid

Response Sample

{
  "uuid" : "8931caed445d4d1cb1caed445d0d1c8c",
  "creator" : {
    "firstName" : "Joe",
    "lastName" : "Doe",
    "uuid" : "589319933be24ec79319933be24ec7fe"
  },
  "created" : "2018-10-12T14:15:06.024Z",
  "editor" : {
    "firstName" : "Joe",
    "lastName" : "Doe",
    "uuid" : "589319933be24ec79319933be24ec7fe"
  },
  "edited" : "2018-11-20T20:12:01.084Z",
  "tagFamily" : {
    "name" : "colors",
    "uuid" : "1898428398164d9a9842839816ed9a3d"
  },
  "name" : "Red",
  "permissions" : {
    "create" : true,
    "read" : true,
    "update" : true,
    "delete" : true,
    "publish" : false,
    "readPublished" : false
  }
}

Tag Family

Tags that semantically belong together are grouped in a tag family, allowing to handle disambiguation.

Example tags and tag families:

Tag Family Tags

Fruit

Apple, Pear, Orange

Company

Apple, Microsoft, Google, Amazon

A tag family is defined as part of a project. Tag families can’t be nested.

Response Sample

{
  "creator" : {
    "firstName" : "Joe",
    "lastName" : "Doe",
    "uuid" : "589319933be24ec79319933be24ec7fe"
  },
  "created" : "2018-10-12T14:15:06.024Z",
  "editor" : {
    "firstName" : "Joe",
    "lastName" : "Doe",
    "uuid" : "589319933be24ec79319933be24ec7fe"
  },
  "edited" : "2018-11-20T20:12:01.084Z",
  "name" : "Nicer colors",
  "permissions" : {
    "create" : true,
    "read" : true,
    "update" : false,
    "delete" : true,
    "publish" : false,
    "readPublished" : false
  }
}

User

Gentics Mesh users can be physical persons or client apps interacting with elements in Gentics Mesh. Both have a user object counterpart in Gentics Mesh. This user object has a standard set of properties, e.g.firstname, lastname, username, and emailAddress , which can be extended by referencing a custom user object.

Gentics Mesh supports user management for your apps! The property nodeReference is used for storing additional user-related data based on a schema you define, thus allowing for extensible user profiles.

In order to be able to store and retrieve content, a user needs to authenticate using one of the available authentication mechanisms.

API endpoints

Description API endpoint

Get all users

GET /api/v2/users/

Create a user

POST /api/v2/users/

Get a user

GET /api/v2/users/:userUuid

Update a user

POST /api/v2/users/:userUuid

Deactivate a user

DELETE /api/v2/users/:userUuid

Read user permissions on elements

GET /api/v2/users/:userUuid/permissions/:path

Return a one time token to update a user

POST /api/v2/users/:userUuid/reset_token

Return an API token

POST /api/v2/users/:userUuid/token

Invalidate an API token

DELETE /api/v2/users/:userUuid/token

Response Sample

{
  "uuid" : "589319933be24ec79319933be24ec7fe",
  "creator" : {
    "firstName" : "Joe",
    "lastName" : "Doe",
    "uuid" : "589319933be24ec79319933be24ec7fe"
  },
  "created" : "2018-10-12T14:15:06.024Z",
  "editor" : {
    "firstName" : "Joe",
    "lastName" : "Doe",
    "uuid" : "589319933be24ec79319933be24ec7fe"
  },
  "edited" : "2018-11-20T20:12:01.084Z",
  "lastname" : "Doe",
  "firstname" : "Joe",
  "username" : "jdoe",
  "emailAddress" : "j.doe@nowhere.com",
  "nodeReference" : {
    "projectName" : "dummy",
    "uuid" : "adaf48da8c124049af48da8c12a0493e",
    "displayName" : "DeLorean DMC-12",
    "schema" : {
      "name" : "vehicle",
      "uuid" : "e287e8a7497940ac87e8a7497940ac82",
      "version" : "1.0"
    }
  },
  "enabled" : true,
  "groups" : [ {
    "name" : "editors",
    "uuid" : "e728c2fc5a0146a2a8c2fc5a0186a28d"
  } ],
  "permissions" : {
    "create" : true,
    "read" : true,
    "update" : true,
    "delete" : true,
    "publish" : false,
    "readPublished" : false
  }
}

Group

Groups are used to organize users and efficiently grant them permissions by assigning relevant roles to groups. Groups ca not be nested. Instead, a user can be part of several groups.

API endpoints

Description API endpoint

Get all groups

GET /api/v2/groups/

Create a group

POST /api/v2/groups/

Get a group

GET /api/v2/group/:groupUuid

Update a group

POST /api/v2/group/:groupUuid

Delete a group

DELETE /api/v2/group/:groupUuid

Get all roles assigned to a group

GET /api/v2/group/:groupUuid/roles

Assign a role to a group

POST /api/v2/group/:groupUuid/roles/:rolesUuid

Remove a role from a group

DELETE /api/v2/group/:groupUuid/roles/:rolesUuid

Get all users assigned to a group

GET /api/v2/group/:groupUuid/users

Add user to a group

POST /api/v2/group/:groupUuid/users/:userUuid

Remove user from a group

DELETE /api/v2/group/:groupUuid/users/:userUuid

Response Sample

{
  "uuid" : "25ba1622a1f7458fba1622a1f7658fea",
  "creator" : {
    "firstName" : "Joe",
    "lastName" : "Doe",
    "uuid" : "589319933be24ec79319933be24ec7fe"
  },
  "created" : "2018-10-12T14:15:06.024Z",
  "editor" : {
    "firstName" : "Joe",
    "lastName" : "Doe",
    "uuid" : "589319933be24ec79319933be24ec7fe"
  },
  "edited" : "2018-11-20T20:12:01.084Z",
  "name" : "New group name",
  "permissions" : {
    "create" : true,
    "read" : true,
    "update" : true,
    "delete" : true,
    "publish" : false,
    "readPublished" : false
  },
  "roles" : [ {
    "name" : "admin",
    "uuid" : "cc9999a4194d4f069999a4194d1f06d7"
  } ]
}

Role

Roles are used to manage permissions between the role and other elements in Gentics Mesh (i.e., nodes, schemas, users, roles, etc.). Roles can be assigned to groups. Thus, a user of a group with roles inherits the permissions that are bound to these roles. Roles can’t be nested.

API endpoints

Description API endpoint

Get all roles

GET /api/v2/roles/

Create a role

POST /api/v2/roles/

Get a role

GET /api/v2/roles/:roleUuid

Update a role

POST /api/v2/roles/:roleUuid

Delete a role

DELETE /api/v2/roles/:roleUuid

Read role permissions on elements

GET /api/v2/roles/:roleUuid/permissions/:path

Set role permissions on elements

POST /api/v2/roles/:roleUuid/permissions/:path

Response Sample

{
  "uuid" : "ddcddceb33d648318ddceb33d618314f",
  "creator" : {
    "firstName" : "Joe",
    "lastName" : "Doe",
    "uuid" : "589319933be24ec79319933be24ec7fe"
  },
  "created" : "2018-10-12T14:15:06.024Z",
  "editor" : {
    "firstName" : "Joe",
    "lastName" : "Doe",
    "uuid" : "589319933be24ec79319933be24ec7fe"
  },
  "edited" : "2018-11-20T20:12:01.084Z",
  "name" : "New role name",
  "permissions" : {
    "create" : true,
    "read" : true,
    "update" : true,
    "delete" : true,
    "publish" : false,
    "readPublished" : false
  },
  "groups" : [ ]
}