 
This section will be about the features of Gentics Mesh. Each will be described in detail including examples and references to relevant parts of the API or related tutorials.
Gentics Mesh provides the means to organize your contents in terms of a content tree, or rather a node tree. Nodes can be hierarchically structured if a container schema is provided. For example, a book node can act as a container for chapter nodes. Alternatively, consider the example in our demo app, where vehicles are structured within categories.
While it is perfectly legitimate to organize your contents in a simple, flat structure with tagging and referencing, content trees come with big a bonus: they inherently allow for automatically generated hierarchical navigation menus, breadcrumbs and pretty URLs. This furthermore means routes are not hard-coded in your app but can be defined dynamically by content editors using the Gentics Mesh user interface.
| To get you started, Gentics Mesh is shipped with a generic folder schema allowing you to follow the well-known file system paradigm for hierarchically organizing your content in a tree. | 
There are two properties when defining a schema for your nodes that are of importance in this respect.
container
segmentField
Let us consider the following example on the basis of our demo app to demonstrate how these properties work together to support navigation menus, breadcrumbs and pretty URLs:
 
Within the demo project vehicles are organized in three different categories. The nodes Automobiles, Aircrafts and Yachts of type category serve as containers for nodes of type vehicle, e.g., the node Ford GT in category Automobiles.
The schema category has the containertruesegmentFieldslugpath/automobiles
The schema vehicle has the containerfalsesegmentFieldslugpath/automobiles/ford-gt
Instead of relying on UUIDs to link your content, you can use pretty URLs like https://yourapp.com/automobiles/ford-gt. For each node, Gentics Mesh will provide you with a human readable path. Likewise, you can query your content using WebRoot paths instead of using UUIDs (see WebRoot API).
The segmentField/automobiles/ford-gt
 
The pathlanguagesPath/api/v2/projectName/nodes/:nodeUuidresolveLinks/api/v2/:projectName/webroot/:path
You can also specify dedicated paths for nodes using the urlFieldsurlFields
| Try the examplehttps://demo.getmesh.io/api/v2/demo/webroot/cars/outatime | 
| Description | API endpoint | 
|---|---|
| Get the node with the given UUID. | 
 | 
| Try the examplehttps://demo.getmesh.io/api/v2/demo/nodes/fc3c85be82584ae2bc85be82588ae2b0?resolveLinks=short | 
{
  "uuid" : "fc3c85be82584ae2bc85be82588ae2b0",
  "creator" : {
    "uuid" : "e5861ba26b914b21861ba26b91ab211a"
  },
  "created" : "2018-02-23T16:30:44Z",
  "editor" : {
    "uuid" : "e5861ba26b914b21861ba26b91ab211a"
  },
  "edited" : "2018-03-16T15:28:04Z",
  "language" : "en",
  "availableLanguages" : {
    "en" : {
      "published" : true,
      "version" : "3.0",
      "publisher" : {
        "uuid" : "e5861ba26b914b21861ba26b91ab211a"
      },
      "publishDate" : "2018-03-16T15:28:04Z"
    }
  },
  "languagePaths" : {
    "en" : "/automobiles/ford-gt"
  },
  "parentNode" : {
    "projectName" : "demo",
    "uuid" : "ca6c7df3f45b48d4ac7df3f45ba8d42f",
    "displayName" : "Automobiles",
    "path" : "/automobiles",
    "schema" : {
      "name" : "category",
      "uuid" : "2ca2362b041247c4a2362b041227c4da"
    }
  },
  "tags" : [ {
    "name" : "Gasoline",
    "uuid" : "1c51487f8e8043c291487f8e8053c2c1",
    "tagFamily" : "Fuels"
  }, {
    "name" : "Blue",
    "uuid" : "6e6f1d9f055447d2af1d9f055417d289",
    "tagFamily" : "Colors"
  }, {
    "name" : "White",
    "uuid" : "94fec98d6f114e81bec98d6f118e81cc",
    "tagFamily" : "Colors"
  } ],
  "project" : {
    "name" : "demo",
    "uuid" : "217f8c981ada4642bf8c981adaa642c3"
  },
  "childrenInfo" : { },
  "schema" : {
    "name" : "vehicle",
    "uuid" : "2aa83a2b3cba40a1a83a2b3cba90a1de",
    "version" : "3.0"
  },
  "container" : false,
  "displayField" : "name",
  "displayName" : "Ford GT",
  "fields" : {
    "slug" : "ford-gt",
    "name" : "Ford GT",
    "weight" : 1520,
    "SKU" : 1,
    "price" : 4.1E49,
    "stocklevel" : 20,
    "description" : "The Ford GT is an American mid-engine two-seater sports car that was produced by Ford for the 2005 through 2006 model years.",
    "vehicleImage" : {
      "uuid" : "df8beb3922c94ea28beb3922c94ea2f6",
      "path" : "/images/ford-gt.jpg",
      "languagePaths" : {
        "en" : "/images/ford-gt.jpg"
      }
    },
    "somedate" : "2018-03-16T11:05:00Z"
  },
  "path" : "/automobiles/ford-gt",
  "breadcrumb" : [ {
    "projectName" : "demo",
    "uuid" : "688f7beae8d240bf8f7beae8d2a0bf2e",
    "path" : "/",
    "schema" : {
      "name" : "folder",
      "uuid" : "3021de5632e94fe8a1de5632e95fe87c"
    }
  }, {
    "projectName" : "demo",
    "uuid" : "ca6c7df3f45b48d4ac7df3f45ba8d42f",
    "displayName" : "Automobiles",
    "path" : "/automobiles",
    "schema" : {
      "name" : "category",
      "uuid" : "2ca2362b041247c4a2362b041227c4da"
    }
  }, {
    "projectName" : "demo",
    "uuid" : "fc3c85be82584ae2bc85be82588ae2b0",
    "displayName" : "Ford GT",
    "path" : "/automobiles/ford-gt",
    "schema" : {
      "name" : "vehicle",
      "uuid" : "2aa83a2b3cba40a1a83a2b3cba90a1de"
    }
  } ],
  "version" : "3.1",
  "permissions" : {
    "create" : false,
    "read" : true,
    "update" : false,
    "delete" : false,
    "publish" : false,
    "readPublished" : true
  }
}When organizing your content in terms of a node tree, Gentics Mesh offers two ways of generating a nested navigation response.
The API endpoint /api/v2/:projectName/nodes/:nodeUuid/navigation/api/v2/:projectName/navroot/:path
By default, only container nodes are included in a navigation response. The includeAll query parameter will include all nodes, if set to true.
The maxDepth parameter may be used to limit the navigation depth. In order to include the path property in the navigation response, the resolveLinks query parameter can be used.
 
The demo app includes a navigation object showing just the top-level elements Automobiles, Aircraft, and Yachts as well as the Home link. All the elements can be easily queried using the available navigation endpoints. In particular, the example uses the /api/v2/:projectName/navroot/:path:path/?maxDepth
| Description | API endpoint | 
|---|---|
| Returns a navigation object for the provided node. | 
 | 
| Return a navigation for the node which is located using the given path. | 
 | 
Retrieving a navigation object using the projects root node /
The same can be achieved using the node specific navigation endpoint. In this case you can specify the root node of your navigation by providing the node uuid.
| Try the examplehttps://demo.getmesh.io/api/v2/demo/nodes/688f7beae8d240bf8f7beae8d2a0bf2e/navigation?resolveLinks=short&maxDepth=1 | 
{
  "uuid" : "688f7beae8d240bf8f7beae8d2a0bf2e",
  "node" : {
    "uuid" : "688f7beae8d240bf8f7beae8d2a0bf2e",
    "creator" : {
      "uuid" : "e5861ba26b914b21861ba26b91ab211a"
    },
    "created" : "2018-07-02T10:48:53Z",
    "editor" : {
      "uuid" : "e5861ba26b914b21861ba26b91ab211a"
    },
    "edited" : "2018-07-02T10:49:13Z",
    "language" : "en",
    "availableLanguages" : {
      "en" : {
        "published" : true,
        "version" : "1.0",
        "publisher" : {
          "uuid" : "e5861ba26b914b21861ba26b91ab211a"
        },
        "publishDate" : "2018-07-02T10:49:13Z"
      }
    },
    "languagePaths" : {
      "en" : "/"
    },
    "tags" : [ ],
    "project" : {
      "name" : "demo",
      "uuid" : "217f8c981ada4642bf8c981adaa642c3"
    },
    "childrenInfo" : {
      "folder" : {
        "schemaUuid" : "839ef8b50bf9493e9ef8b50bf9e93e24",
        "count" : 1
      },
      "category" : {
        "schemaUuid" : "2ca2362b041247c4a2362b041227c4da",
        "count" : 3
      }
    },
    "schema" : {
      "name" : "folder",
      "uuid" : "839ef8b50bf9493e9ef8b50bf9e93e24",
      "version" : "1.0"
    },
    "container" : true,
    "displayField" : "name",
    "fields" : { },
    "path" : "/",
    "breadcrumb" : [ {
      "projectName" : "demo",
      "uuid" : "688f7beae8d240bf8f7beae8d2a0bf2e",
      "path" : "/",
      "schema" : {
        "name" : "folder",
        "uuid" : "839ef8b50bf9493e9ef8b50bf9e93e24"
      }
    } ],
    "version" : "1.0",
    "permissions" : {
      "create" : false,
      "read" : true,
      "update" : false,
      "delete" : false,
      "publish" : false,
      "readPublished" : true
    }
  },
  "children" : [ {
    "uuid" : "15d5ef7a9abf416d95ef7a9abf316d68",
    "node" : {
      "uuid" : "15d5ef7a9abf416d95ef7a9abf316d68",
      "creator" : {
        "uuid" : "e5861ba26b914b21861ba26b91ab211a"
      },
      "created" : "2018-07-02T10:49:04Z",
      "editor" : {
        "uuid" : "e5861ba26b914b21861ba26b91ab211a"
      },
      "edited" : "2018-07-02T10:49:13Z",
      "language" : "en",
      "availableLanguages" : {
        "en" : {
          "published" : true,
          "version" : "1.0",
          "publisher" : {
            "uuid" : "e5861ba26b914b21861ba26b91ab211a"
          },
          "publishDate" : "2018-07-02T10:49:13Z"
        }
      },
      "languagePaths" : {
        "en" : "/images"
      },
      "parentNode" : {
        "projectName" : "demo",
        "uuid" : "688f7beae8d240bf8f7beae8d2a0bf2e",
        "path" : "/",
        "schema" : {
          "name" : "folder",
          "uuid" : "839ef8b50bf9493e9ef8b50bf9e93e24"
        }
      },
      "tags" : [ ],
      "project" : {
        "name" : "demo",
        "uuid" : "217f8c981ada4642bf8c981adaa642c3"
      },
      "childrenInfo" : {
        "vehicleImage" : {
          "schemaUuid" : "b12272150db4490ea272150db4190e72",
          "count" : 11
        }
      },
      "schema" : {
        "name" : "folder",
        "uuid" : "839ef8b50bf9493e9ef8b50bf9e93e24",
        "version" : "1.0"
      },
      "container" : true,
      "displayField" : "name",
      "displayName" : "Vehicle Images",
      "fields" : {
        "slug" : "images",
        "name" : "Vehicle Images"
      },
      "path" : "/images",
      "breadcrumb" : [ {
        "projectName" : "demo",
        "uuid" : "688f7beae8d240bf8f7beae8d2a0bf2e",
        "path" : "/",
        "schema" : {
          "name" : "folder",
          "uuid" : "839ef8b50bf9493e9ef8b50bf9e93e24"
        }
      }, {
        "projectName" : "demo",
        "uuid" : "15d5ef7a9abf416d95ef7a9abf316d68",
        "displayName" : "Vehicle Images",
        "path" : "/images",
        "schema" : {
          "name" : "folder",
          "uuid" : "839ef8b50bf9493e9ef8b50bf9e93e24"
        }
      } ],
      "version" : "1.0",
      "permissions" : {
        "create" : false,
        "read" : true,
        "update" : false,
        "delete" : false,
        "publish" : false,
        "readPublished" : true
      }
    }
  }, {
    "uuid" : "ca6c7df3f45b48d4ac7df3f45ba8d42f",
    "node" : {
      "uuid" : "ca6c7df3f45b48d4ac7df3f45ba8d42f",
      "creator" : {
        "uuid" : "e5861ba26b914b21861ba26b91ab211a"
      },
      "created" : "2018-07-02T10:49:08Z",
      "editor" : {
        "uuid" : "e5861ba26b914b21861ba26b91ab211a"
      },
      "edited" : "2018-07-02T10:49:13Z",
      "language" : "en",
      "availableLanguages" : {
        "en" : {
          "published" : true,
          "version" : "1.0",
          "publisher" : {
            "uuid" : "e5861ba26b914b21861ba26b91ab211a"
          },
          "publishDate" : "2018-07-02T10:49:13Z"
        }
      },
      "languagePaths" : {
        "en" : "/automobiles"
      },
      "parentNode" : {
        "projectName" : "demo",
        "uuid" : "688f7beae8d240bf8f7beae8d2a0bf2e",
        "path" : "/",
        "schema" : {
          "name" : "folder",
          "uuid" : "839ef8b50bf9493e9ef8b50bf9e93e24"
        }
      },
      "tags" : [ ],
      "project" : {
        "name" : "demo",
        "uuid" : "217f8c981ada4642bf8c981adaa642c3"
      },
      "childrenInfo" : {
        "vehicle" : {
          "schemaUuid" : "2aa83a2b3cba40a1a83a2b3cba90a1de",
          "count" : 6
        }
      },
      "schema" : {
        "name" : "category",
        "uuid" : "2ca2362b041247c4a2362b041227c4da",
        "version" : "1.0"
      },
      "container" : true,
      "displayField" : "name",
      "displayName" : "Automobiles",
      "fields" : {
        "name" : "Automobiles",
        "slug" : "automobiles"
      },
      "path" : "/automobiles",
      "breadcrumb" : [ {
        "projectName" : "demo",
        "uuid" : "688f7beae8d240bf8f7beae8d2a0bf2e",
        "path" : "/",
        "schema" : {
          "name" : "folder",
          "uuid" : "839ef8b50bf9493e9ef8b50bf9e93e24"
        }
      }, {
        "projectName" : "demo",
        "uuid" : "ca6c7df3f45b48d4ac7df3f45ba8d42f",
        "displayName" : "Automobiles",
        "path" : "/automobiles",
        "schema" : {
          "name" : "category",
          "uuid" : "2ca2362b041247c4a2362b041227c4da"
        }
      } ],
      "version" : "1.0",
      "permissions" : {
        "create" : false,
        "read" : true,
        "update" : false,
        "delete" : false,
        "publish" : false,
        "readPublished" : true
      }
    }
  }, {
    "uuid" : "21203632520b4d19a03632520b2d19c1",
    "node" : {
      "uuid" : "21203632520b4d19a03632520b2d19c1",
      "creator" : {
        "uuid" : "e5861ba26b914b21861ba26b91ab211a"
      },
      "created" : "2018-07-02T10:49:12Z",
      "editor" : {
        "uuid" : "e5861ba26b914b21861ba26b91ab211a"
      },
      "edited" : "2018-07-02T10:49:13Z",
      "language" : "en",
      "availableLanguages" : {
        "en" : {
          "published" : true,
          "version" : "1.0",
          "publisher" : {
            "uuid" : "e5861ba26b914b21861ba26b91ab211a"
          },
          "publishDate" : "2018-07-02T10:49:13Z"
        }
      },
      "languagePaths" : {
        "en" : "/aircrafts"
      },
      "parentNode" : {
        "projectName" : "demo",
        "uuid" : "688f7beae8d240bf8f7beae8d2a0bf2e",
        "path" : "/",
        "schema" : {
          "name" : "folder",
          "uuid" : "839ef8b50bf9493e9ef8b50bf9e93e24"
        }
      },
      "tags" : [ ],
      "project" : {
        "name" : "demo",
        "uuid" : "217f8c981ada4642bf8c981adaa642c3"
      },
      "childrenInfo" : {
        "vehicle" : {
          "schemaUuid" : "2aa83a2b3cba40a1a83a2b3cba90a1de",
          "count" : 3
        }
      },
      "schema" : {
        "name" : "category",
        "uuid" : "2ca2362b041247c4a2362b041227c4da",
        "version" : "1.0"
      },
      "container" : true,
      "displayField" : "name",
      "displayName" : "Aircraft",
      "fields" : {
        "name" : "Aircraft",
        "slug" : "aircrafts"
      },
      "path" : "/aircrafts",
      "breadcrumb" : [ {
        "projectName" : "demo",
        "uuid" : "688f7beae8d240bf8f7beae8d2a0bf2e",
        "path" : "/",
        "schema" : {
          "name" : "folder",
          "uuid" : "839ef8b50bf9493e9ef8b50bf9e93e24"
        }
      }, {
        "projectName" : "demo",
        "uuid" : "21203632520b4d19a03632520b2d19c1",
        "displayName" : "Aircraft",
        "path" : "/aircrafts",
        "schema" : {
          "name" : "category",
          "uuid" : "2ca2362b041247c4a2362b041227c4da"
        }
      } ],
      "version" : "1.0",
      "permissions" : {
        "create" : false,
        "read" : true,
        "update" : false,
        "delete" : false,
        "publish" : false,
        "readPublished" : true
      }
    }
  }, {
    "uuid" : "eb2ebdcc0e894a9eaebdcc0e896a9e1d",
    "node" : {
      "uuid" : "eb2ebdcc0e894a9eaebdcc0e896a9e1d",
      "creator" : {
        "uuid" : "e5861ba26b914b21861ba26b91ab211a"
      },
      "created" : "2018-07-02T10:49:13Z",
      "editor" : {
        "uuid" : "e5861ba26b914b21861ba26b91ab211a"
      },
      "edited" : "2018-07-02T10:49:13Z",
      "language" : "en",
      "availableLanguages" : {
        "en" : {
          "published" : true,
          "version" : "1.0",
          "publisher" : {
            "uuid" : "e5861ba26b914b21861ba26b91ab211a"
          },
          "publishDate" : "2018-07-02T10:49:13Z"
        }
      },
      "languagePaths" : {
        "en" : "/yachts"
      },
      "parentNode" : {
        "projectName" : "demo",
        "uuid" : "688f7beae8d240bf8f7beae8d2a0bf2e",
        "path" : "/",
        "schema" : {
          "name" : "folder",
          "uuid" : "839ef8b50bf9493e9ef8b50bf9e93e24"
        }
      },
      "tags" : [ ],
      "project" : {
        "name" : "demo",
        "uuid" : "217f8c981ada4642bf8c981adaa642c3"
      },
      "childrenInfo" : {
        "vehicle" : {
          "schemaUuid" : "2aa83a2b3cba40a1a83a2b3cba90a1de",
          "count" : 2
        }
      },
      "schema" : {
        "name" : "category",
        "uuid" : "2ca2362b041247c4a2362b041227c4da",
        "version" : "1.0"
      },
      "container" : true,
      "displayField" : "name",
      "displayName" : "Yachts",
      "fields" : {
        "name" : "Yachts",
        "slug" : "yachts"
      },
      "path" : "/yachts",
      "breadcrumb" : [ {
        "projectName" : "demo",
        "uuid" : "688f7beae8d240bf8f7beae8d2a0bf2e",
        "path" : "/",
        "schema" : {
          "name" : "folder",
          "uuid" : "839ef8b50bf9493e9ef8b50bf9e93e24"
        }
      }, {
        "projectName" : "demo",
        "uuid" : "eb2ebdcc0e894a9eaebdcc0e896a9e1d",
        "displayName" : "Yachts",
        "path" : "/yachts",
        "schema" : {
          "name" : "category",
          "uuid" : "2ca2362b041247c4a2362b041227c4da"
        }
      } ],
      "version" : "1.0",
      "permissions" : {
        "create" : false,
        "read" : true,
        "update" : false,
        "delete" : false,
        "publish" : false,
        "readPublished" : true
      }
    }
  } ]
}Each node in Gentics Mesh provides information on where it is located within the node tree in terms of its breadcrumb
In our demo app example, the breadcrumb
 
The breadcrumbresolveLink
| Description | API endpoint | 
|---|---|
| Get all nodes of a project and return a paged list response. | 
 | 
| Get the node with the given UUID. | 
 | 
| Load the node or the node’s binary data, which is located using the provided path. | 
 | 
| Try the examplehttps://demo.getmesh.io/api/v2/demo/nodes/fc3c85be82584ae2bc85be82588ae2b0?resolveLinks=short | 
{
  "uuid" : "fc3c85be82584ae2bc85be82588ae2b0",
  "creator" : {
    "uuid" : "e5861ba26b914b21861ba26b91ab211a"
  },
  "created" : "2018-07-02T10:49:09Z",
  "editor" : {
    "uuid" : "e5861ba26b914b21861ba26b91ab211a"
  },
  "edited" : "2018-07-02T10:49:13Z",
  "language" : "en",
  "availableLanguages" : {
    "en" : {
      "published" : true,
      "version" : "1.0",
      "publisher" : {
        "uuid" : "e5861ba26b914b21861ba26b91ab211a"
      },
      "publishDate" : "2018-07-02T10:49:13Z"
    }
  },
  "languagePaths" : {
    "en" : "/automobiles/ford-gt"
  },
  "parentNode" : {
    "projectName" : "demo",
    "uuid" : "ca6c7df3f45b48d4ac7df3f45ba8d42f",
    "displayName" : "Automobiles",
    "path" : "/automobiles",
    "schema" : {
      "name" : "category",
      "uuid" : "2ca2362b041247c4a2362b041227c4da"
    }
  },
  "tags" : [ {
    "name" : "Gasoline",
    "uuid" : "1c51487f8e8043c291487f8e8053c2c1",
    "tagFamily" : "Fuels"
  }, {
    "name" : "Blue",
    "uuid" : "6e6f1d9f055447d2af1d9f055417d289",
    "tagFamily" : "Colors"
  }, {
    "name" : "White",
    "uuid" : "94fec98d6f114e81bec98d6f118e81cc",
    "tagFamily" : "Colors"
  } ],
  "project" : {
    "name" : "demo",
    "uuid" : "217f8c981ada4642bf8c981adaa642c3"
  },
  "childrenInfo" : { },
  "schema" : {
    "name" : "vehicle",
    "uuid" : "2aa83a2b3cba40a1a83a2b3cba90a1de",
    "version" : "1.0"
  },
  "container" : false,
  "displayField" : "name",
  "displayName" : "Ford GT",
  "fields" : {
    "slug" : "ford-gt",
    "name" : "Ford GT",
    "weight" : 1520,
    "SKU" : 1,
    "price" : 139995,
    "stocklevel" : 20,
    "description" : "The Ford GT is an American mid-engine two-seater sports car that was produced by Ford for the 2005 through 2006 model years.",
    "vehicleImage" : {
      "uuid" : "df8beb3922c94ea28beb3922c94ea2f6",
      "path" : "/images/ford-gt.jpg",
      "languagePaths" : {
        "en" : "/images/ford-gt.jpg"
      }
    }
  },
  "path" : "/automobiles/ford-gt",
  "breadcrumb" : [ {
    "projectName" : "demo",
    "uuid" : "688f7beae8d240bf8f7beae8d2a0bf2e",
    "path" : "/",
    "schema" : {
      "name" : "folder",
      "uuid" : "839ef8b50bf9493e9ef8b50bf9e93e24"
    }
  }, {
    "projectName" : "demo",
    "uuid" : "ca6c7df3f45b48d4ac7df3f45ba8d42f",
    "displayName" : "Automobiles",
    "path" : "/automobiles",
    "schema" : {
      "name" : "category",
      "uuid" : "2ca2362b041247c4a2362b041227c4da"
    }
  }, {
    "projectName" : "demo",
    "uuid" : "fc3c85be82584ae2bc85be82588ae2b0",
    "displayName" : "Ford GT",
    "path" : "/automobiles/ford-gt",
    "schema" : {
      "name" : "vehicle",
      "uuid" : "2aa83a2b3cba40a1a83a2b3cba90a1de"
    }
  } ],
  "version" : "1.0",
  "permissions" : {
    "create" : false,
    "read" : true,
    "update" : false,
    "delete" : false,
    "publish" : false,
    "readPublished" : true
  }
}The WebRoot API is an alternative way for fetching content from Gentics Mesh. Other than accessing nodes with their UUID, one can use the way more intuitive WebRoot paths.
 
This functionality builds on top of the schema segmentFieldurlFields
WebRoot paths of arbitrary depth can be created, in combination with organizing content hierarchically in terms of a content tree by specifying nodes to be containerssegment to the full path via the referenced segmentField.
In addition to segmentFieldurlFieldsstring and string list fields within your schema using the property.
Gentics Mesh will only make sure that there are no collisions between custom paths of other nodes. Saving a node which uses the same urlField value would cause a conflict error.
Those fields can in turn contain a custom path to your node. It is important to note that conflicts between custom url field values and existing paths which are build using the segmentPath property will not cause a conflict. You can use this in order to override an existing path to a node using a custom path.
Custom paths via the urlFields property will always be resolved first and thus overrule the segmentField paths.
Note that the custom path must start with a forward slash, otherwise it will be ignored.
For example, the following will not work:
{
  "fields": {
    "myUrlField": "hello-world/example-page.html"
  }
}| Request | API endpoint | Response code | 
|---|---|---|
| GET | /api/v2/docs/hello-world/example-page.html | 404 | 
By prepending the path with a forward slash, the same request will resolve the node correctly:
{
  "fields": {
    "myUrlField": "/hello-world/example-page.html"
  }
}| Request | API endpoint | Response code | 
|---|---|---|
| GET | /api/v2/docs/hello-world/example-page.html | 200 | 
Possible applications for the urlFields property are:
Short URL support
Nice URL handling
Redirection handling
Using the WebRoot API it is possible to easily integrate Gentics Mesh with many known routing frameworks.
| Framework | Language | Example | 
|---|---|---|
| PHP | ||
| JS | ||
| Java,JS,Ceylon | ||
| Ruby | - | 
| Description | API endpoint | 
|---|---|
| Load the node or the node’s binary data, which is located using the provided path. | 
A WebRoot path may consist of multiple path segments, each corresponding to a node within the content tree. The segmentField
| Each segment of the URL must be URL-encoded. A node’s contents must provide different path segment in order to guarantee unique paths. | 
| Try the examplehttps://demo.getmesh.io/api/v2/demo/nodes/fc3c85be82584ae2bc85be82588ae2b0?resolveLinks=short | 
Loading the node with the given UUID using API endpoint GET /api/v2/:projectName/nodes/:nodeUuid
The WebRoot API, furthermore, directly supports delivering binary content (e.g., images, documents, etc.) using the fileNamebinary
| The header can be used to differentiate between binary and node responses. The values of this header can  be eitheror. This allows to differentiate between binary content withand typical node responses also delivered with. | 
| Downloads of resized images currently do not support byte range requests. | 
| Try the examplehttps://demo.getmesh.io/api/v2/demo/nodes/df8beb3922c94ea28beb3922c94ea2f6/binary/image | 
Downloading a node’s binary field with the given name using API endpoint GET /api/v2/:projectName/nodes/:nodeUuid/binary/:fieldName
| Try the examplehttps://demo.getmesh.io/api/v2/demo/webroot/images/ford-gt.jpg | 
| When using a routing framework, in order to find out if a requested resource is binary data or JSON data you need to check the HTTP Content-Disposition response header. If it is set, it’s binary data. | 
In case, the binary data is an image, the WebRoot API allows to directly perform Image Manipulation such as cropping and resizing.
| Try the examplehttps://demo.getmesh.io/api/v2/demo/webroot/images/ford-gt.jpg?rect=10,100,800,400&w=300&crop=rect | 
Find out more about this topic in our blog post about Gentics Mesh’s Image Manipulation API and Interface.
Link resolving represents the counterpart of the WebRoot API - a node UUID can be resolved into a WebRoot path.
 
Typically, editors create content including internal links to other nodes. When fetching content for your apps, however, Gentics Mesh will resolve these internal links for you and return a WebRoot path.
For example, {{mesh.link("2f2de9297c8143e8ade9297c8193e8fc", "en")}}/api/v2/demo/webroot/images/ford-gt.jpg?resolveLinks=full
The ?resolveLinks
off -  links will not be resolved. This is the default.
full - the resolved links will contain the WebRoot prefix and project name (/api/v2/:projectName/webRoot/:path
medium - the resolved links will contain the project name (/:projectName/:path
short - will contain neither WebRoot prefix nor project name, just the path (:path
The ?resolveLinks
In some cases it may be desirable to be able to create links which point to nodes within different projects. In these situations the link should no longer be relative but instead contain the domain and protocol which is used by the project of the referenced node.
You can specify the hostname and ssl flag when creating a project. This will in turn store this information within the created branch of the project. Gentics Mesh will make use of this information once you render a foreign node’s link using the short type.
The links will automatically start with https:// if the ssl flag of the branch has been set to true. You can update the hostname/ssl flag at any time by updating the branch of the project.
| Foreign links can only be rendered using the ?resolveLinks=short type. Other resolver types do not support this mechanism. | 
It is also possible to specify a branch as a third parameter of the mesh link. Both the UUID and branch name can be used to resolve the branch. If the uuid or branch name cannot be found for the linked node, the latest branch will be used instead.
Examples:
{{mesh.link("2f2de9297c8143e8ade9297c8193e8fc", "en", "winter")}}
{{mesh.link("2f2de9297c8143e8ade9297c8193e8fc", "en", "e007a9f6f6c8404fbd81f96489764401")}}
| Description | API endpoint | 
|---|---|
| Get all nodes of a project and return a paged list response. | 
 | 
| Get the node with the given UUID. | 
 | 
| Load the node or the node’s binary data, which is located using the provided path. | 
 | 
| Get a navigation object for the provided node. | 
 | 
| Return a navigation for the node which is located using the given path. | 
 | 
In addition to the above, Gentics Mesh offers the /api/v2/utilities/linkResolver
It’s necessary to send the content in which links should get resolved to the API endpoint in plain text or JSON. The query parameter ?resolveLinks
Valid links:
{{mesh.link("2f2de9297c8143e8ade9297c8193e8fc", "en")}}
{{mesh.link('2f2de9297c8143e8ade9297c8193e8fc', 'en')}}
{{mesh.link(\"2f2de9297c8143e8ade9297c8193e8fc\", \"en\")}}
{{mesh.link(2f2de9297c8143e8ade9297c8193e8fc, en)}}
{{mesh.link("2f2de9297c8143e8ade9297c8193e8fc")}} (link to default language)
{{mesh.link(2f2de9297c8143e8ade9297c8193e8fc)}} (link to default language)
Binary data can be attached to node binary fields. The /api/v2/nodes/:uuid/binary/:fieldName
| This endpoint is accepting , only. | 
It is required to specify the version and language within the update request. This is similar to regular node update requests in which these information must be added to the JSON object.
----------Geg2Oob
Content-Disposition: form-data; name="version"
1.0
----------Geg2Oob
Content-Disposition: form-data; name="language"
en
----------Geg2Oob
Content-Disposition: form-data; name="shohY6d"; filename="somefile.bin"
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
fileData
----------Geg2Oob--The mimeType of binaries which don’t have a mimeType property will be automatically be determined via the file extension as a fallback mechanism.
Gentics Mesh stores all binary files on the filesystem. The default directory data/binaryfilesmesh.yml
The upload limit can be configured in bytes using the uploadOptions.byteLimit
For more information on available settings have a look at the administration guide.
Metadata information of uploads will automatically be extracted and added the metadata object of the binary field.
You can disable this feature in the global options by setting upload.parser to false.
You can also disable this feature per field. See binary schema field documentation for more information.
You can set a whitelist of allowed metadata (upload.metadataWhitelist
Currently the following mime-types are supported:
Doc:
application/pdf
application/msword
application/vnd.openxmlformats-officedocument.wordprocessingml.document
Image:
image/jpeg
image/jpg
image/png
Audio:
audio/flac
audio/mp3
audio/ogg
audio/x-matroska
Video:
video/ogg
video/mp4
video/x-matroska
The GPS information of images will be processed and provided in a location object. A geopoint will automatically be stored for the document in the search index. This way it is possible to run geo search queries to locate images within a specific area.
Example response:
{
…
  "fields" : {
    "binary" : {
      "binaryUuid" : "304a132ca8e740f68a132ca8e710f60d",
      "fileName" : "android-africa-gps.jpg",
      "width" : 200,
      "height" : 150,
      "sha512sum" : "0dbd4fcfc27be88aae7f78848b75e55f30983b0bccdf187f483e3c1e28d11b697e765254c1b52ea79a2c1cfa6fb6b749c4500baceb5ed70ee22646515fff94e7",
      "fileSize" : 29354,
      "mimeType" : "image/jpeg",
      "dominantColor" : "#a5a4a1",
      "metadata" : {
        "location" : {
          "lon" : 18.408889,
          "lat" : -33.961111
        },
        "date" : "2018-07-17T13:16:37",
        "exif_ExposureTime" : "0.016666666666666666",
        "Compression" : "JPEG (old-style)",
        "Image_Height" : "376 pixels",
        "Resolution_Units" : "inch",
        "Thumbnail_Width_Pixels" : "0",
        "File_Size" : "29354 bytes",
        "White_Balance_Mode" : "Auto white balance",
        "Focal_Length_35" : "26 mm",
        "tiff_YResolution" : "72.0",
        "Exif_Image_Height" : "150 pixels",
        "Max_Aperture_Value" : "f/1.7",
        "Metering_Mode" : "Center weighted average",
        "F-Number" : "f/1.7",
        "tiff_BitsPerSample" : "8",
        "modified" : "2018-07-17T13:16:37",
        "w_comments" : "Komischer Hamser",
        "tiff_Make" : "samsung",
        "Exif_Version" : "2.20",
        "Exif_Image_Width" : "200 pixels",
        "Scene_Capture_Type" : "Standard",
        "YCbCr_Positioning" : "Center of pixel array",
        "Date/Time_Original" : "2018:02:17 18:03:22",
        "Creation-Date" : "2018-02-17T19:03:22",
        "Make" : "samsung",
        "Orientation" : "Top, left side (Horizontal / normal)",
        "Exposure_Program" : "Program normal",
        "ISO_Speed_Ratings" : "64",
        "exif_Flash" : "false",
        "meta_creation-date" : "2018-02-17T19:03:22",
        "Focal_Length" : "4.2 mm",
        "tiff_ResolutionUnit" : "Inch",
        "Number_of_Components" : "3",
        "Resolution_Unit" : "Inch",
        "Exposure_Mode" : "Auto exposure",
        "Number_of_Tables" : "2 Huffman tables",
        "GPS_Latitude_Ref" : "S",
        "dcterms_created" : "2018-02-17T19:03:22",
        "Software" : "GIMP 2.8.18",
        "FlashPix_Version" : "1.00",
        "exif_DateTimeOriginal" : "2018-02-17T19:03:22",
        "Date/Time_Digitized" : "2018:02:17 18:03:22",
        "Data_Precision" : "8 bits",
        "exif_IsoSpeedRatings" : "64",
        "Last-Modified" : "2018-07-17T13:16:37",
        "tiff_ImageWidth" : "200",
        "Last-Save-Date" : "2018-07-17T13:16:37",
        "tiff_Software" : "GIMP 2.8.18",
        "File_Modified_Date" : "Tue Jul 17 14:06:48 +02:00 2018",
        "Image_Width" : "504 pixels",
        "tiff_ImageLength" : "150",
        "tiff_Orientation" : "1",
        "GPS_Latitude" : "-33° 57' 40\"",
        "Compression_Type" : "Progressive, Huffman",
        "GPS_Longitude_Ref" : "E",
        "Thumbnail_Offset" : "886 bytes",
        "Flash" : "Flash did not fire",
        "exif_FocalLength" : "4.2",
        "Exposure_Time" : "1/60 sec",
        "Makernote" : "[98 values]",
        "Comments" : "Animal in africa",
        "tiff_Model" : "SM-G955F",
        "Y_Resolution" : "72 dots per inch",
        "Date/Time" : "2018:07:17 11:16:37",
        "Thumbnail_Height_Pixels" : "0",
        "Component_1" : "Y component: Quantization table 0, Sampling factors 1 horiz/1 vert",
        "Thumbnail_Length" : "4435 bytes",
        "JPEG_Comment" : "Animal in africa",
        "exif_FNumber" : "1.7",
        "X_Resolution" : "72 dots per inch",
        "Component_3" : "Cr component: Quantization table 1, Sampling factors 1 horiz/1 vert",
        "dcterms_modified" : "2018-07-17T13:16:37",
        "Component_2" : "Cb component: Quantization table 1, Sampling factors 1 horiz/1 vert",
        "Color_Space" : "sRGB",
        "Model" : "SM-G955F",
        "GPS_Longitude" : "18° 24' 32\"",
        "comment" : "Animal in africa",
        "Unique_Image_ID" : "F12LLJA00SM F12LLKG01GM",
        "meta_save-date" : "2018-07-17T13:16:37",
        "tiff_XResolution" : "72.0"
      }
    }
  },
…
}The metadata of a binary field can also be updated in order to remove, add new or update existing meta attributes.
| The metadata within the image data itself will not be updated. | 
| Uploading a binary to a field will override any custom metadata with the freshly parsed metadata of the upload. | 
Example response:
{
…
  "fields" : {
    "binary" : {
      "binaryUuid" : "304a132ca8e740f68a132ca8e710f60d",
      "fileName" : "android-africa-gps.jpg",
      "width" : 200,
      "height" : 150,
      "sha512sum" : "0dbd4fcfc27be88aae7f78848b75e55f30983b0bccdf187f483e3c1e28d11b697e765254c1b52ea79a2c1cfa6fb6b749c4500baceb5ed70ee22646515fff94e7",
      "fileSize" : 29354,
      "mimeType" : "image/jpeg",
      "dominantColor" : "#a5a4a1",
      "metadata" : {
        "location" : {
          "lon" : 18.408889,
          "lat" : -33.961111
        },
        "description": "Image of an angry animal in africa",
        "animal_name": "Procavia capensis"
      }
    }
  },
…
}Uploaded documents (PDF, Doc, Docx) will automatically be parsed to extract the the plain text content. The upload.parserLimit configuration in the mesh.yml can be used to limit the parser output. By default a limit of 40.000 characters has been configured.
The plainText can be accessed via the plainText field in GraphQL. The same field is also included in the REST response of a binary field. This field can be modified via REST.
| The parser limit of documents also affects the metadata extraction. In-line attributes of PDF files will only be added to the list of metadata when the parser limit is set high enough. A parserLimitof-1can be used to fully parse documents and to ensure that all attributes are identified. | 
When the schema for a binary field contains the checkServiceUrl property, new binaries are created with a check status of POSTPONED. Mesh will regularly send a request for each postponed binary to the respective check service with the following payload:
Example check request payload:
{
  "filename" : "test.zip",
  "mimeType" : "application/zip",
  "downloadUrl" : "http://MESH_HOST:MESH_PORT/api/v1/Test/nodes/a881e329c6de4fccb4dce5fa69e32aaa/binary/binaryTest?secret=979be709e3a94467bdeece6fece6d858&lang=en&branch=f339e2a7f4ce4fee86e07a5f981a10a6&version=0.2",
  "callbackUrl" : "http://MESH_HOST:MESH_PORT/api/v1/Test/nodes/a881e329c6de4fccb4dce5fa69e32aaa/binary/binaryTest/checkCallback?secret=979be709e3a94467bdeece6fece6d858&lang=en&branch=f339e2a7f4ce4fee86e07a5f981a10a6&version=0.2"
}The check service can use the given downloadUrl to download the binary to perform the actual check. The check service must send the result to the callback URL by posting a JSON with the fields status (must be ACCEPTED or DENIED) and reason which contains the reason a file was denied.
Example check result payload:
{
    "status": "DENIED",
    "reason": "Maximum filesize exceeded"
}Mesh will set the status of the binary accordingly and if the status is DENIED will delete the actual binary data for that file. The file itself is not deleted but truncated to length zero.
A simple example check service is available in the Platforms & Clients section.
| The check result request to Mesh must be authenticated as a user that has permission to actually change the binary. | 
Gentics Mesh comes with multi-language support out of the box. In particular, a node serves as a container for one or more contents. These contents will store the actual content fields.
You can query individual contents by appending the ?langlanguage
Requests for nodes should contain the requested languages (as comma separated list)as query parameter:
Endpoint: /api/v2/:projectName/nodes/:uuid?lang=en,de
If the requested node is available in any of the languages, the response will contain the fields in that language (first language found).
Gentics Mesh allows to configure a defaultLanguagemesh.yml
the lang
the requested content is not available in the specified language.
This fallback mechanism works when fetching nodes but also when requesting navigation objects or breadcrumb information.
| In order to work properly, the fallback mechanism requires all nodes to have a language variant for the specified . | 
Permissions allow to equip different groups of users with access to the content of your project.
In Gentics Mesh, we distinguish the concepts of user, group, and role for managing different needs of access.
A user represents a physical person or a client app that needs to interact with your content.
Groups are used to gather users of same content needs and access levels, e.g. administrators, editors, and users of your app.
A role describes a set of permissions on other elements in Gentics Mesh, e.g. nodes, tags, schemas, users.
By assigning a role to a group, the role’s permissions are efficiently granted to a set of users.
| For reasons of readability, we will describe granting permissions to users though technically, permissions are granted to a specific role and applied to users via groups. | 
| Permission | Description | 
|---|---|
| create | grants the right to create instances of the element | 
| read | grants read access to the element | 
| update | grants the right to update the element | 
| delete | grants the right to delete the element | 
| publish | grants the right to publish/unpublish a node | 
| readPublished | grants the right to read the published version of the node | 
| The andpermissions are specifically available for node elements. | 
Most API responses within Gentics Mesh contain a list of permissions. This list indicates which permissions the requesting user has been granted on the returned element(s).
| Try the examplePermission of user on nodehttps://demo.getmesh.io/api/v2/demo/nodes/fc3c85be82584ae2bc85be82588ae2b0?version=published | 
// permissions for node https://demo.getmesh.io/api/v2/demo/nodes/fd58237c79d64bf198237c79d6bbf107?version=published
...
  "permissions" : {
    "create" : false,        //create other nodes
    "read" : false,          //read all versions of the node
    "update" : false,        //update the node
    "delete" : false,        //delete the node
    "publish" : false,       //publish or unpublish the node
    "readPublished" : true   //read the published version of the node
  }
...The example above shows that the requesting user anonymousreadPublish
Furthermore the user is not allowed to
create
read
update
delete
publishunpublish
| Gentics Mesh by default returns the version of nodes. This means for supporting theuser and public content, you need to add thequery parameter on all requests for nodes to avoid "Missing permissions on object" errors. Find out more in the Versioning section. | 
Following, we will discuss how to query, assign and revoke permissions in Gentics Mesh including the available API endpoints:
| Description | API endpoint | 
|---|---|
| Read the user permissions on element(s) that can be located by the specified path. | |
| Load the permissions between given role and the targeted element(s). | |
| Set the permissions between role and the targeted element(s). | 
The examples provided subsequently, rely on our demo project.
There are dedicated API endpoints for querying permissions on elements.
| The following example links, require prior authentication with user (credentials: admin/admin). Please refer to the authentication section to learn about the different authentication mechanisms provided by Gentics Mesh. The Insomnia REST client can be used to build and invoke requests from your browser to Gentics Mesh. | 
The GET /api/v2/roles/:roleUuid/permissions/:path
For example, the authenticated adminPublic Userfc3c85be82584ae2bc85be82588ae2b0
| Try the example with user https://demo.getmesh.io/api/v2/roles/10447951fd264e6a847951fd266e6ae6/permissions/projects/217f8c981ada4642bf8c981adaa642c3/nodes/88fac3fbc61041c1bac3fbc610d1c182
Note, that a request with user will yield a Missing object permissions error response. | 
GET https://demo.getmesh.io/api/v2/roles/10447951fd264e6a847951fd266e6ae6/permissions/projects/217f8c981ada4642bf8c981adaa642c3/nodes/88fac3fbc61041c1bac3fbc610d1c182
RESPONSE
{
    "create": false,
    "read": false,
    "update": false,
    "delete": false,
    "publish": false,
    "readPublished": true
}Alternatively, you can use query the element using the respective API endpoint (e.g. GET /api/v2/projectName/nodesroleanonymous
| Try the example with user https://demo.getmesh.io/api/v2/demo/nodes/88fac3fbc61041c1bac3fbc610d1c182?role=10447951fd264e6a847951fd266e6ae6  | 
GET https://demo.getmesh.io/api/v2/roles/10447951fd264e6a847951fd266e6ae6/permissions/projects/217f8c981ada4642bf8c981adaa642c3/nodes/88fac3fbc61041c1bac3fbc610d1c182
RESPONSE
...
  "permissions" : { // permissions of requesting user admin
    "create" : true,
    "read" : true,
    "update" : true,
    "delete" : true,
    "publish" : true,
    "readPublished" : true
  },
  "rolePerms" : { // permissions of requested role anonymous
    "create" : false,
    "read" : false,
    "update" : false,
    "delete" : false,
    "publish" : false,
    "readPublished" : true
  }
  ...The endpoint GET /api/v2/users/:userUuid/permissions/:pathanonymousanonymous
The POST /api/v2/roles/:roleUuid/permissions/:path
It is important to note that permissions can be granted on individual elements and onto a set of elements, which is identified by the element path name (e.g.: /users/:uuid/users
Furthermore, the endpoint offers the property recursive
Following, we go through all Gentics Mesh objects that can be subject to permissions.
In order to grant permission on individual or all users, one need to specify the path to be either /users/:uuid/users
Applying permissions on /users
| If you need to grant permission on users of a specific group, please use the element path together with property. | 
The following example shows how to grant the Editor Role/usersrecursive=true
| Links used in the example require prior authentication with user admin (credentials: admin/admin). Please refer to the authentication section to learn about the different authentication mechanisms provided by Gentics Mesh. The Insomnia REST client can be used to build and invoke requests from your browser to Gentics Mesh. | 
POST https://demo.getmesh.io/api/v2/roles/6754d83b086244d894d83b086204d87f/permissions/users
{
  "permissions": {
    "create": false,
    "read": true,
    "update": false,
    "delete": false,
    "publish": false,
    "readPublished": false
  },
  "recursive": true
}{
    "message": "Permission for role Editor Role updated."
}You can query the updated permissions with user admin
All possible role permissions on users are summarized in the following table.
| Role permission | Element path | Permission | Recursive | 
|---|---|---|---|
| Can create new users | 
 | Create | false | 
| Can read all users | 
 | Read | true | 
| Can update all users | 
 | Update | true | 
| Can delete all users | 
 | Delete | true | 
| Can read user | 
 | Read | false | 
| Can update user | 
 | Update | false | 
| Can delete user | 
 | Delete | false | 
Permissions on a single or multiple groups are applied via /groups/:uuid/groups
Granting permissions on /groups
Granting permissions  on /groups/:uuid
The following example shows how to grant the Editor RoleClient Groupwebclientrecursive=trueread
| Links used in the example require prior authentication with user admin (credentials: admin/admin). Please refer to the authentication section to learn about the different authentication mechanisms provided by Gentics Mesh. The Insomnia REST client can be used to build and invoke requests from your browser to Gentics Mesh. | 
POST https://demo.getmesh.io/api/v2/roles/6754d83b086244d894d83b086204d87f/permissions/groups/df81c23d9ff1450081c23d9ff195005e
{
  "permissions": {
    "create": false,
    "read": true,
    "update": false,
    "delete": false,
    "publish": false,
    "readPublished": false
  },
  "recursive": true
}{
    "message": "Permission for role Editor Role updated."
}You can query the updated permissions with user admin
https://demo.getmesh.io/api/v2/roles/6754d83b086244d894d83b086204d87f/permissions/users
or alternatively with https://demo.getmesh.io/api/v2/groups/df81c23d9ff1450081c23d9ff195005e?role=6754d83b086244d894d83b086204d87f https://demo.getmesh.io/api/v2/groups/df81c23d9ff1450081c23d9ff195005e/users?role=6754d83b086244d894d83b086204d87f
All possible role permissions on groups are summarized in the following table.
| Role permission | Element path | Permission | Recursive | 
|---|---|---|---|
| Can create new groups | 
 | Create | false | 
| Can read all groups | 
 | Read | true | 
| Can update all groups | 
 | Update | true | 
| Can delete all groups | 
 | Delete | true | 
| Can read group | 
 | Read | false | 
| Can update group | 
 | Update | false | 
| Can delete group | 
 | Delete | false | 
| Can read group and its users | 
 | Read | true | 
| Can update group and its users | 
 | Update | true | 
| Can delete group and its users | 
 | Delete | true | 
By granting permissions on roles, you effectively grant users the right to change permissions of other users.
Permissions on a single or multiple roles are applied via /roles/:uuid/roles
Granting permissions on /roles
The following example shows how to grant the Editor Rolereadupdatedelete
| Links used in the example require prior authentication with user admin (credentials: admin/admin). Please refer to the authentication section to learn about the different authentication mechanisms provided by Gentics Mesh. The Insomnia REST client can be used to build and invoke requests from your browser to Gentics Mesh. | 
POST https://demo.getmesh.io/api/v2/roles/6754d83b086244d894d83b086204d87f/permissions/roles
{
  "permissions": {
    "create": true,
    "read": false,
    "update": false,
    "delete": false,
    "publish": false,
    "readPublished": false
  },
  "recursive": false
}{
    "message": "Permission for role Editor Role updated."
}You can query the updated permissions with user admin
All possible role permissions on roles are summarized in the following table.
| Role permission | Element path | Permission | Recursive | 
|---|---|---|---|
| Can create new roles | 
 | Create | false | 
| Can read all roles | 
 | Read | true | 
| Can update all roles | 
 | Update | true | 
| Can delete all roles | 
 | Delete | true | 
| Can read role | 
 | Read | false | 
| Can update role | 
 | Update | false | 
| Can delete role | 
 | Delete | false | 
Permissions on a single or multiple schemas are applied via /schemas/:uuid/schemas
Granting permissions on /schemas
Read permissions on a schema are needed for creating nodes based on that schema.
| Role permission | Element path | Permission | Recursive | 
|---|---|---|---|
| Can create new schemas | 
 | Create | false | 
| Can read all schemas, and create nodes | 
 | Read | true | 
| Can update all schemas | 
 | Update | true | 
| Can delete all schemas | 
 | Delete | true | 
| Can read schema, and create nodes | 
 | Read | false | 
| Can update schema | 
 | Update | false | 
| Can delete schema | 
 | Delete | false | 
Permissions on a single or multiple microschemas are applied via /microschemas/:uuid/microschemas
Granting permissions on /microschemas
Read permissions on a microschemaModel are needed for creating, reading, updating, and deleting micronodes based on that schema.
| Role permission | Element path | Permission | Recursive | 
|---|---|---|---|
| Can create new microschemas | 
 | Create | false | 
| Can read all microschemas, and create micronodes | 
 | Read | true | 
| Can update all microschemas | 
 | Update | true | 
| Can delete all microschemas | 
 | Delete | true | 
| Can read microschemas, and create micronodes | 
 | Read | false | 
| Can update microschemas | 
 | Update | false | 
| Can delete microschemas | 
 | Delete | false | 
Permissions on a single or multiple projects are applied via /projects/:uuid/projects
Granting permissions on /projects/:uuid
Granting permissions on /projects
| Role permission | Element path | Permission | Recursive | 
|---|---|---|---|
| Can create new project | 
 | Create | false | 
| Can read all projects and sub elements | 
 | Read | true | 
| Can update all projects and sub elements | 
 | Update | true | 
| Can delete all projects and sub elements | 
 | Delete | true | 
| Can read published nodes and subnodes of all project | 
 | Read Published | true | 
| Can un/publish nodes and subnodes of all project | 
 | Publish | true | 
| Can read project and sub elements | 
 | Read | true | 
| Can update project and sub elements | 
 | Update | true | 
| Can delete project and sub elements | 
 | Delete | true | 
| Can read published nodes and subnodes of project | 
 | Read Published | true | 
| Can un/publish nodes and subnodes of project | 
 | Publish | true | 
In order to grant permission on tag families the /:projectName/tagFamilies
Granting permissions on /:projectName/tagFamilies/:uuidrecursive=true
Granting permissions on /:projectName/tagFamiliesrecursive=true
| Role permission | Element path | Permission | Recursive | 
|---|---|---|---|
| Can create new tag families | 
 | Create | false | 
| Can create new tag families and tags for tagFamilies | 
 | Create | true | 
| Can read all tag families and tags | 
 | Read | true | 
| Can update all tag families and tags | 
 | Update | true | 
| Can delete all tag families and tags | 
 | Delete | true | 
| Can create tags in tag family | 
 | Create | false | 
| Can read tag family | 
 | Read | false | 
| Can update tag family | 
 | Update | false | 
| Can delete tag family | 
 | Delete | false | 
| Can read tag family and tags | 
 | Read | true | 
| Can update tag family and tags | 
 | Update | true | 
| Can delete tag family and tags | 
 | Delete | true | 
In order to grant permission on tags the /:projectName/tagFamilies/:uuid/tags/:projectName/tagFamilies/:uuid/tags/:uuid
Currently, using path /:projectName/tagFamilies/:uuid/tags/:projectName/tagFamilies/:uuid
Granting permissions on /:projectName/tagFamilies/:uuid/tagsrecursive=true
| Role permission | Element path | Permission | Recursive | 
|---|---|---|---|
| Can create tags in tag family | 
 | Create | false | 
| Can read tag family | 
 | Read | false | 
| Can update tag family | 
 | Update | false | 
| Can delete tag family | 
 | Delete | false | 
| Can read tag family and tags | 
 | Read | true | 
| Can update tag family and tags | 
 | Update | true | 
| Can delete tag family and tags | 
 | Delete | true | 
| Can read tag | 
 | Read | false | 
| Can update tag | 
 | Update | false | 
| Can delete tag | 
 | Delete | false | 
Permissions on a single or multiple nodes are applied via /:projectName/nodes/:projectName/nodes/:uuid
/:projectName/nodes/:uuid
/:projectName/nodesrecursive=true
In order to grant permissions on sub trees of the content tree /:projectName/nodes/:uuidrecursive=true
| Role permission | Element path | Permission | Recursive | 
|---|---|---|---|
| Can create new sub nodes in all nodes of the project | 
 | Create | true | 
| Can read all project nodes (and all node versions) | 
 | Read | true | 
| Can update all nodes of the project | 
 | Update | true | 
| Can delete all nodes of the project | 
 | Delete | true | 
| Can read the published version of all project nodes | 
 | ReadPublished | true | 
| Can publish/unpublish all nodes of the project | 
 | Publish | true | 
| Can create new sub nodes in specified node | 
 | Create | false | 
| Can read specified node | 
 | Read | false | 
| Can update specified node | 
 | Update | false | 
| Can delete specified node | 
 | Delete | false | 
| Can read the published version specified node | 
 | ReadPublished | false | 
| Can publish/unpublish specified node | 
 | Publish | false | 
| Can create new sub nodes in specified node & sub nodes | 
 | Create | true | 
| Can read specified node & sub nodes | 
 | Read | true | 
| Can update specified node & sub nodes | 
 | Update | true | 
| Can delete specified node & sub nodes | 
 | Delete | true | 
| Can read the published version specified node & sub nodes | 
 | ReadPublished | true | 
| Can publish/unpublish specified node & sub nodes | 
 | Publish | true | 
Permissions on a single or multiple branches are applied via /api/v2/:projectName/branches/:uuid/api/v2/:projectName/branches
| Branches can not be deleted. Hence, permissions for deleting do not apply. | 
| Role permission | Element path | Permission | Recursive | 
|---|---|---|---|
| Can create new branch | 
 | Create | false | 
| Can read all branches | 
 | Read | true | 
| Can update all branches | 
 | Update | true | 
| Can read the branch | 
 | Read | false | 
| Can update the branch | 
 | Update | false | 
In order to understand the concept of versioning in Gentics Mesh it is important to remember that nodes are containers for language specific contents (see Multi-Language). The content of a node contains the fields and thus stores all the content.
| Versioning within Gentics Mesh only applies to contents and their referenced fields. Other elements such as users, groups, roles, permissions are not versioned. | 
Various content management tasks will have different effects for versioning in Gentics Mesh. Some of them create versions, others don’t. Following, we go through all of these actions which involve versioning.
Once a node has been created the initial version 0.1 will be assigned to its content.
Updating a node’s content may create a minor version 0.2 of that content if changes have been detected within the posted request fields.
No Locks:
It is not required to handle locks in Gentics Mesh. Instead it is required to specify the version in the update request which identifies the version on which the update request was based upon.
Conflict detection:
Gentics Mesh will check whether new versions have been created in the meanwhile. Long running edit operations or multiple concurrent editors may create additional versions.
The detected changes will be compared automatically in order to determine whether the current update request causes a conflict with a newer edit request. Gentics Mesh will return a response which contains information about the conflict in those cases. Other update operations which do not cause a conflict will be stored and the changed fields will be updated.
The latest version which was created using an update request is called the draft
Node contents can be published and taken offline. This is particularly useful if you want to first work on a draft, then review it and publish it at a later point in time.
Publishing requires a POST/api/v2/:projectName/nodes/:uuid/publishedPOST/api/v2/:projectName/nodes/:uuid/languages/:languageTag/published
Gentics Mesh will automatically create a new major version when publishing a node language variant (e.g.: 1.0, 2.0). The draft
Furthermore, it is possible to retrieve information about the published status via a GET/api/v2/:/nodes/:uuid/published
| Publishing node contents requires the user to be assigned to a group with a role which provides the permission. | 
{
  "availableLanguages" : {
    "de" : {
      "published" : false,
      "version" : "0.4"
    },
    "en" : {
      "published" : true,
      "version" : "3.0",
      "publisher" : {
        "firstName" : "Joe",
        "lastName" : "Doe",
        "uuid" : "589319933be24ec79319933be24ec7fe"
      },
      "publishDate" : "2018-11-20T20:12:01.084Z"
    },
    "fr" : {
      "published" : false,
      "version" : "5.2"
    }
  }
}| It is not possible to publish a specific version. Publish always affects the latest draft version of the language variant. | 
Similarly to publishing, the contents of a node can be taken offline via a DELETE/api/v2/:projectName/nodes/:uuid/publishedDELETE /api/v2/:projectName/nodes/:uuid/languages/:languageTag/published
| Taking node contents offline requires the user have permissions on the node. | 
It is possible to fetch older versions by specifying the ?version?version=published?version=draft
| Gentics Mesh by default returns the version of nodes. This means for supporting theuser and public content, you need to add thequery parameter on all requests for nodes to avoid "Missing permissions on object" errors. | 
| Reading published nodes requires the user to be assigned to a role which grants the permission. | 
Versions of a node can be listed via the /api/v2/:projectName/nodes/:uuid/versions
"versions" : {
    "de" : [ {
      "creator" : {
        "firstName" : "Joe",
        "lastName" : "Doe",
        "uuid" : "307cf98b66424db5bcf98b66424db5aa"
      },
      "created" : "2019-05-22T19:04:10Z",
      "version" : "2.0",
      "draft" : true,
      "published" : true,
      "branchRoot" : false
    }
    …
  } ]
}A version can be used as a draft version. This version can also be referenced as a published version when published. The branchRoot flag indicates whether the version is being referenced as root version in a branch. All these three different kind of versions are not purgeable. Versions which have been made in between can be purged.
| Versions are language specific. This means that each language of a node has its dedicated version history. | 
The auto purge mechanism can be used to control the versioning mechanism. The mechanism will automatically purge the previously used version when a new version gets created. This way the version history of a node can be kept small. This will (depending on a chosen RDBMS) reduce database usage and boosts performance. Actions such as update node, upload binary, publish node, take node offline create versions. The auto purge feature can be controlled by a global default setting which can be fine tuned on a per-schema level.
| Defaut setting | Schema setting | Auto Purge | 
|---|---|---|
| true | null | Enabled | 
| true | false | Disabled | 
| false | true | Enabled | 
| false | false | Disabled | 
| Enabling auto purge mechanism will not stop version numbers to increase. Instead the mechanism will automatically purge the previously used version (if possible). | 
| Setting the auto purge flag in a schema will not automatically purge any version. The versions will only be purged when content gets modified. | 
The global autoPurge flag from the mesh.yml configuration file will be used for schemas which don’t have autoPurge property set. Setting the autoPurge property will thus also allow to override the default configuration in the mesh.yml.
content:
  autoPurge: trueVersioning can be controlled on a per-schema basis. The autoPurge property within the schema controls whether additional versions for a content will be kept.
The default behaviour can be configured via the environment variable MESH_CONTENT_AUTO_PURGE or the config file.
The POST /api/v2/projects/:projectUuid/maintenance/purge endpoint can be used to purge older versions from the system.
When invoked a new job will be triggered which purges all possible content versions from the given project.
The ?before query parameter can be used to control what versions should be purged.
The call POST /api/v2/projects/:projectUuid/maintenance/purge?before=2019-04-20T18:00Z will thus only purge versions which are older than the given date. Omitting the parameter will purge all versions.
Draft and publish versions will not be purged since they are still required. Additionally when the initial version of a node can also not be purged since it is bound to the Branch of the node. Gentics Mesh requires this version to keep track of the branch starting point. The version lists endpoint will mark those versions using the branchRoot flag.
The purge operation requires admin role and delete permissions on the project to be executed.
| The version purge mechanism works independently from the auto purge mechanism. | 
So far we learned that node contents can be versioned and published. Additionally Gentics Mesh versioning provides a powerful concept we call Branches. A project branch is very similar to branches in a versioning control system like Git or similar systems.
Branches can be used to restructure your nodes and change the contents within a specific branch without affecting a different branch which provides a different structure/content.
Structural references for nodes always contain branch information. This applies to parent/child relationship or taggings, publish states of nodes. This way branches are completely isolated from each other.
| It is currently not possible to migrate from one branch to another. Nodes of branches can’t be automatically merged to other branches. | 
Typical usecases are:
Updating an existing application installation which uses Gentics Mesh to a new version. The new application version requires new schema versions. By creating a branch and migrating the nodes to the new branch (new schema versions), it is possible to serve content for both application versions. Each application versions chooses the correct branch for getting nodes.
Schema versions must be assigned to the branch. Each project can have multiple branches. An initial branch will automatically be created when creating a project.
All operations to nodes can be scoped to a specific branch by adding the ?branch=name
| Implementations which use mesh should always reference a specific branch. Otherwise the document structure could change without the implementation being aware of these changes. | 
A branch requires an unique name. Existing nodes within the project will automatically be migrated into the branch. Please note the started node migration will be processed asynchronously and thus not all nodes may be directly accessible within the scope of the branch.
This migration is different from a schema version migration. The branch node migration just takes care of making all nodes from the previous branch available in the newly created branch. Unlike the schema migration the node migration will not create new language variant versions.
You can use the eventbus bridge or the dedicated /api/v2/admin/status/migrationsmigrated
Note: Migrated nodes will still have the same uuid as before.
A branch can be renamed and new schema/microschemaModel versions can be assigned to it.
Renaming is useful if you want to change your development branch to be the current production branch.
Assigning schema versions to the branch via a PUT/api/v2/:projectName/branches/:uuid/schemas
{
  "schemas" : [ {
    "name" : "content",
    "uuid" : "39f69bee0baa415eb69bee0baa115e82",
    "version" : "1.0"
  }, {
    "name" : "folder",
    "uuid" : "39f69bee0baa415eb69bee0baa115e82",
    "version" : "1.0"
  }, {
    "name" : "binary-data",
    "uuid" : "39f69bee0baa415eb69bee0baa115e82",
    "version" : "1.0"
  } ]
}It is also possible to assign microschemas via a PUT/api/v2/:projectName/branches/:uuid/microschemas
{
  "microschemas" : [ {
    "name" : "vcard",
    "uuid" : "2715307deafc4ecc95307deafccecc10",
    "version" : "2.0"
  }, {
    "name" : "geolocation",
    "uuid" : "2715307deafc4ecc95307deafccecc10",
    "version" : "1.0"
  } ]
}All nodes which reference the branch via the updated schema version will automatically be migrated to use the newer schema version. Please note the started schema migration will be processed asynchronously and thus not all node contents may be directly accessible within the scope of the branch.
The migration will create new versions for the affected node contents.
| It is note worthy that updating a schema and thus creating new schema version will not automatically affect the branch. Each schema update created a new schema version. This new version must first be assigned to the branch. | 
At the moment it is not possible to delete a branch.
Branches enable Gentics Mesh to setup multiple content project tree structures.
Moving nodes can be scoped to a specific branch using the ?branch
The tag operation is also scoped to a specific branch. This way new tags can be assigned to your nodes for a specific branch without affecting the taggings of nodes within an older branch.
| Tags and tag families are not versioned. Deleting a tag will remove the tag from all nodes that previously referenced this tag. | 
| Taggings to nodes are not versioned. | 
Deleting nodes is also branch specific. Deleting a node via DELETE/api/v2/:projectName/node/:uuid?branch=winter2016
It is also possible to just delete a specific language variant via DELETE/api/v2/:projectName/node/:uuid/languages/en?branch=winter2016
Branches are completely isolated from each other as explained earlier. This also applies to a node’s language variant versions.
Example:
Create project branch summer2016
Create node with language variant de at version 1.0 in branch summer2016
Create project branch winter2016
Update previously created node in branch summer2016 and thus create version 1.1
Branch summer2016 will reference node language variant 1.1 and winter2016 will still reference version 1.0 since the winter2016 branch was created at the specific point of time in which the language variant in branch summer2016 was still at version 1.0.
| It is currently not possible to migrate 1.1 from summer2016 to winter2016. | 
Additionally creating new nodes in summer2016 will not be available in branch winter2016.
| Permissions are not branch specific. | 
The Gentics Mesh User Interface provides a preview button when editing nodes. A post request to a configureable url is being dispatched when the button is triggered. The post request will contain the node JSON data of the current editing state. This way a preview page can be easily rendered by custom frontend implementations.
A user who lost his password is able to recover it using a reset token. This token, typically, is issued by a user or service having permissions to create new users.
The /api/v2/users/:userUuid/reset_token
| A token is valid for 30 minutes and will be invalidated once it has been used. | 
The user can use this token to update his user record by issuing a POST request to the /api/v2/users/:userUuid?token=TOKENCODE
Gentics Mesh provides a changelog like system in order to apply and keep track of schema changes. A schema change may be a single change that adds a new field to the schema or a change which updates the schema properties.
Gentics Mesh supports the following change operations:
| Properties | Description | 
|---|---|
| after | Name of the field after which the new field should be inserted | 
| field | Name of the field that should be added | 
| type | Type of the field | 
| listType | Optional list type | 
{
  "operation" : "ADDFIELD",
  "properties" : {
    "field" : "fieldToBeAdded",
    "elasticsearch" : "{\"settings\":\"value\"}",
    "label" : "Field Label Value",
    "after" : "firstField",
    "type" : "list",
    "listType" : "html"
  }
}| Properties | Description | 
|---|---|
| field | Name of the field to be removed | 
{
  "operation" : "REMOVEFIELD",
  "properties" : {
    "field" : "fieldToBeRemoved"
  }
}| Properties | Description | 
|---|---|
| field | Name of the field to be modified | 
| type | New field type | 
| listType | (Only applies for lists) New list type | 
{
  "operation" : "CHANGEFIELDTYPE",
  "properties" : {
    "field" : "fieldToBeChanged",
    "type" : "html"
  }
}| Properties | Description | 
|---|---|
| field | Field to be updated | 
| label | New field label | 
{
  "operation" : "UPDATEFIELD",
  "properties" : {
    "field" : "fieldToBeUpdated",
    "name" : "newName"
  }
}| Properties | Description | 
|---|---|
| description | New schema description | 
| order | Array of strings that contains the field order | 
| displayFieldname | New displayFieldname value of the schema | 
| segmentFieldname | New segmentFieldname value of the schema | 
| container | New container flag of the schema | 
{
  "operation" : "UPDATESCHEMA",
  "properties" : {
    "container" : "true",
    "segmentFieldname" : "newSegmentField",
    "displayFieldname" : "newSegmentField",
    "description" : "new description",
    "label" : "new label"
  }
}| Properties | Description | 
|---|---|
| description | New microschemaModel description | 
{
  "operation" : "UPDATEMICROSCHEMA",
  "properties" : {
    "description" : "new description",
    "label" : "new label"
  }
}Each change may also provide a migration script. The migration script can be used to modify nodes that were affected by the migration.
Typical usecases for migration scripts are for example dynamic field removal or even custom reformatting of field data. It is also possible to split a single field value into values for two new fields.
The /api/v2/schemas/:uuid/diff/api/v2/microschemas/:uuid/diff
This list of changes can be modified and posted to /api/v2/schemas/:uuid/changes/api/v2/microschemas/:uuid/changes
The SockJS compliant /api/v2/eventbus
Additionally to websocket it is possible to query whether a migration is running via the /api/v2/admin/status/migrations
Sending a schema to /api/v2/schemas:uuidPUT
Please note that by default conflicting data will be removed and this action can only be avoided by specifying a custom migration script.
Sometimes it is desired to overwrite the default migration behaviour.
The following migration script converts the number value from field node.fields[fieldname]node.fields[fieldname]
function migrate(node, fieldname, convert) {
    node.fields[fieldname] = new Date(new Date(node.fields[fieldname]).getTime() + 864000).toISOString();
    return node;
}Migration scripts also allow you to split up a field value into two different fields.
function migrate(node, fieldname, convert) {
    node.fields["fieldA"] = "First field set";
    node.fields["fieldB"] = "Second field set";
    return node;
}The provided converter can be used to convert in between field types. This converter will be used if no custom migration script was specified.
function migrate(node, fieldname, convert) {
    var stringValue = convert.toString(node.fields[fieldname]);
    // It is important to use the Java.from method to convert the java list object into a number array.
    var numberArray    = Java.from(convert.toNumberList(node.fields[fieldname]));
    var micronodeArray = Java.from(convert.toMicronodeList(node.fields[fieldname]));
    var dateArray      = Java.from(convert.toDateList(node.fields[fieldname]));
    var booleanArray   = Java.from(convert.toBooleanList(node.fields[fieldname]));
    var numberValue    = convert.toNumber(node.fields[fieldname]);
    var nodeValue      = convert.toNode(node.fields[fieldname]);
    var micronodeValue = convert.toMicronode(node.fields[fieldname]);
    var dateValue      = convert.toDate(node.fields[fieldname]);
    var booleanValue   = convert.toBoolean(node.fields[fieldname]);
    var binaryValue    = convert.toBinary(node.fields[fieldname]);
    // Delete the field
    delete node.fields[fieldname];
    return node;
}Finally the changes can be applied by sending the request to /api/v2/schemas/:uuid/changes
{
  "changes" : [ {
    "operation" : "ADDFIELD",
    "properties" : {
      "field" : "listFieldToBeAddedField",
      "elasticsearch" : "{\"key\":\"value\"}",
      "label" : "Field Label Value",
      "type" : "list",
      "listType" : "html"
    }
  }, {
    "operation" : "CHANGEFIELDTYPE",
    "properties" : {
      "field" : "fieldToBeUpdated",
      "type" : "string"
    }
  }, {
    "operation" : "REMOVEFIELD",
    "properties" : {
      "field" : "fieldToBeRemoved"
    }
  }, {
    "operation" : "UPDATEFIELD",
    "properties" : {
      "field" : "fieldToBeUpdated",
      "displayFieldname" : "newDisplayField",
      "label" : "newLabel"
    }
  }, {
    "operation" : "UPDATESCHEMA",
    "properties" : { }
  } ]
}Migrations can potentially affect a huge amount of nodes depending on the size of your project. As such the migration could take some time to complete.
This is why we designed migrations in ways that they can be executed asynchronously.
Various operations in Gentics Mesh (e.g. Schema update, assigning versions to branches, creating branches) may trigger migrations.
Before the migration is being executed a job is added to the job queue. You can view the queue via the /api/v2/admin/jobs endpoint.
These jobs will be processed and execute the actual migration.
By default updating a schema will create a new schema version and the nodes will be migrated to that new version.
If you want to defer this operation you can set the updateAssignedBranches query parameter to false when updating a schema/microschemaModel.
This leads to a new schema version being created but the version would not be linked to your current branch and no migration would be invoked.
Once a job has been queued and a migration has been invoked the status can be checked via the /api/v2/admin/status/migrations endpoint.
A job will only be removed from the job list when the job completed without any error. Erroneous jobs will stay in the job list. This way interrupted migrations can be picked up and executed once again.
Intermediate errors may cause a job to fail. In those cases it is possible to reset the error flag of a job by executing DELETE /api/v2/admin/jobs/:jobUuid/error.
The job can run again once the error flag has been cleared. It is possible to invoke POST /api/v2/admin/processJobs to trigger a manual event which will start the job processing.
Jobs which keep failing can be permanently removed from the job queue via the DELETE /api/v2/admin/jobs/:jobUuid endpoint.
Please note that it is only possible to remove jobs which have failed. Jobs which don’t fail will automatically be removed from the list.
Clustering is described in detail in our dedicated clustering documentation.
Mesh supports serving over HTTP/2 out of the box.