2. User Management

2.1. Users

GET /users/

HTTP GET/HEAD rest route. HEAD will be the same result except their will be no body.

Example request:

GET /rest/users/ HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1000
X-Total-Count: 1
X-API-Version: 1.0

{
   "results": [
        {
          "public_id": 1,
          "user_name": "admin",
          "active": true,
          "group_id": 1,
          "registration_time": "2020-01-01 00:00:00.000000",
          "authenticator": "LocalAuthenticationProvider",
          "email": null,
          "password": "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo=",
          "image": null,
          "first_name": null,
          "last_name": null
        }
  ],
  "count": 1,
  "total": 1,
  "parameters": {
    "limit": 10,
    "sort": "public_id",
    "order": 1,
    "page": 1,
    "filter": {},
    "optional": {}
  },
  "pager": {
    "page": 1,
    "page_size": 10,
    "total_pages": 1
  },
  "pagination": {
    "current": "http://datagerry.com/rest/users/",
    "first": "http://datagerry.com/rest/users/?page=1",
    "prev": "http://datagerry.com/rest/users/?page=1",
    "next": "http://datagerry.com/rest/users/?page=1",
    "last": "http://datagerry.com/rest/users/?page=1"
  },
  "response_type": "GET",
  "model": "User",
  "time": "2020-01-01 00:00:00.000000"
}
Query Parameters
  • sort – the sort field name. default is public_id

  • order – the sort order value for ascending or descending. default is 1 for ascending

  • page – the current view page. default is 1

  • limit – max number of results. default is 10

  • filter – a mongodb query filter. default is {} which means everything

Request Headers
Response Headers
Status Codes
GET /users/(int: public_id)

HTTP GET/HEAD rest route for a single resource by its ID.

Example request

GET /rest/users/1 HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 100
X-API-Version: 1.0

{
    "result": {
        "public_id": 1,
        "user_name": "admin",
        "active": true,
        "group_id": 1,
        "registration_time": "2020-01-01 00:00:00.000000",
        "authenticator": "LocalAuthenticationProvider",
        "email": null,
        "password": "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo=",
        "image": null,
        "first_name": null,
        "last_name": null
    },
    "response_type": "GET",
    "model": "User",
    "time": "2020-01-01 00:00:00.000000"
}
Request Headers
Response Headers
Status Codes
POST /users/

HTTP POST route for inserting a new user.

Example request

POST /rest/users/ HTTP/1.1
Host: datagerry.com
Accept: application/json

{
    "user_name": "test",
    "active": true,
    "group_id": 2,
    "password": "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo=",
}

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 100
Location: http://datagerry.com/rest/users/2
X-API-Version: 1.0

{
  "result_id": 2,
  "raw": {
        "public_id": 2,
        "user_name": "test",
        "active": true,
        "group_id": 2,
        "registration_time": "2020-01-01 00:00:00.000000",
        "authenticator": "LocalAuthenticationProvider",
        "email": null,
        "password": "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo=",
        "image": null,
        "first_name": null,
        "last_name": null
    },
  "response_type": "INSERT",
  "model": "User",
  "time": "1970-01-01T00:00:00"
}
Request Headers
Response Headers
Status Codes
PUT /users/(int: public_id)

HTTP PUT/PATCH route for updating a existing user.

Example request

PUT /rest/users/1 HTTP/1.1
Host: datagerry.com
Accept: application/json

{
    "public_id": 1,
    "user_name": "admin",
    "active": false,
    "group_id": 1,
    "registration_time": "2020-01-01 00:00:00.000000",
    "authenticator": "LocalAuthenticationProvider",
    "email": null,
    "password": "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo=",
    "image": null,
    "first_name": null,
    "last_name": null
}

Example response

HTTP/1.1 202 ACCEPTED
Content-Type: application/json
Content-Length: 100
Location: http://datagerry.com/rest/users/1
X-API-Version: 1.0

{
    "result": {
        "public_id": 1,
        "user_name": "admin",
        "active": false,
        "group_id": 1,
        "registration_time": "2020-01-01 00:00:00.000000",
        "authenticator": "LocalAuthenticationProvider",
        "email": null,
        "password": "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo=",
        "image": null,
        "first_name": null,
        "last_name": null
    },
    "response_type": "UPDATE",
    "model": "User",
    "time": "2020-01-01 00:00:00.000000"
}
Request Headers
Response Headers
Status Codes
DELETE /users/(int: public_id)

HTTP DELETE route for deleting a existing user.

Example request

DELETE /rest/users/1 HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response

HTTP/1.1 202 ACCEPTED
Content-Type: application/json
Content-Length: 100
X-API-Version: 1.0

{
    "deleted_entry": {
        "public_id": 1,
        "user_name": "admin",
        "active": false,
        "group_id": 1,
        "registration_time": "2020-01-01 00:00:00.000000",
        "authenticator": "LocalAuthenticationProvider",
        "email": null,
        "password": "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo=",
        "image": null,
        "first_name": null,
        "last_name": null
    },
  "response_type": "DELETE",
  "model": "User",
  "time": "2020-01-01 00:00:00.000000"
}
Request Headers
Response Headers
Status Codes

2.2. Groups

GET /groups/

HTTP GET/HEAD rest route. HEAD will be the same result except their will be no body.

Example request:

GET /rest/groups/ HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1000
X-Total-Count: 1
X-API-Version: 1.0

{
   "results": [
        {
            "public_id": 1,
            "name": "admin",
            "label": "Administrator",
            "rights": [
                {
                    "level": 0,
                    "name": "base.*",
                    "label": "base.*",
                    "description": "Base application right",
                    "is_master": true
                }
            ]
        }
  ],
  "count": 1,
  "total": 1,
  "parameters": {
    "limit": 10,
    "sort": "public_id",
    "order": 1,
    "page": 1,
    "filter": {},
    "optional": {}
  },
  "pager": {
    "page": 1,
    "page_size": 10,
    "total_pages": 1
  },
  "pagination": {
    "current": "http://datagerry.com/rest/groups/",
    "first": "http://datagerry.com/rest/groups/?page=1",
    "prev": "http://datagerry.com/rest/groups/?page=1",
    "next": "http://datagerry.com/rest/groups/?page=1",
    "last": "http://datagerry.com/rest/groups/?page=1"
  },
  "response_type": "GET",
  "model": "Group",
  "time": "2020-01-01 00:00:00.000000"
}
Query Parameters
  • sort – the sort field name. default is public_id

  • order – the sort order value for ascending or descending. default is 1 for ascending

  • page – the current view page. default is 1

  • limit – max number of results. default is 10

  • filter – a mongodb query filter. default is {} which means everything

Request Headers
Response Headers
Status Codes
GET /groups/(int: public_id)

HTTP GET/HEAD rest route for a single resource by its ID.

Example request

GET /rest/groups/1 HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 100
X-API-Version: 1.0

{
    "result": {
        "public_id": 1,
        "name": "admin",
        "label": "Administrator",
        "rights": [
            {
                "level": 0,
                "name": "base.*",
                "label": "base.*",
                "description": "Base application right",
                "is_master": true
            }
        ]
    },
    "response_type": "GET",
    "model": "Group",
    "time": "2020-01-01 00:00:00.000000"
}
Request Headers
Response Headers
Status Codes
POST /groups/

HTTP POST route for inserting a new group.

Example request

POST /rest/groups/ HTTP/1.1
Host: datagerry.com
Accept: application/json

{
    "name": "test",
    "label": "test",
    "rights": [
        "base.framework.object.*"
    ]
}

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 100
Location: http://datagerry.com/rest/groups/3
X-API-Version: 1.0

{
    "result_id": 3,
    "raw": {
        "public_id": 3,
        "name": "test",
        "label": "test",
        "rights": [
            {
                "level": 10,
                "name": "base.framework.object.*",
                "label": "object.*",
                "description": "Manage objects from framework",
                "is_master": true
            }
        ]
    },
    "response_type": "INSERT",
    "model": "Group",
    "time": "2020-01-01 00:00:00.000000"
}
Request Headers
Response Headers
Status Codes
PUT /groups/(int: public_id)

HTTP PUT/PATCH route for updating a existing user.

Example request

PUT /rest/groups/3 HTTP/1.1
Host: datagerry.com
Accept: application/json

{
    "public_id": 3,
    "name": "test",
    "label": "Test",
    "rights": [
        "base.framework.object.*"
    ]
}

Example response

HTTP/1.1 202 ACCEPTED
Content-Type: application/json
Content-Length: 100
Location: http://datagerry.com/rest/groups/3
X-API-Version: 1.0

{
    "result": {
        "public_id": 3,
        "name": "test",
        "label": "Test",
        "rights": [
            "base.framework.object.*"
        ]
    },
    "response_type": "UPDATE",
    "model": "Group",
    "time": "2020-01-01 00:00:00.000000"
}
Request Headers
Response Headers
Status Codes
DELETE /groups/(int: public_id)

HTTP DELETE route for deleting a existing user.

Note

Group with PublicID 1 (Admin) & 2 (User) can not be deleted!

Example request

DELETE /rest/groups/3 HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response

HTTP/1.1 202 ACCEPTED
Content-Type: application/json
Content-Length: 100
X-API-Version: 1.0

{
    "deleted_entry":  {
        "public_id": 3,
        "name": "test",
        "label": "Test",
        "rights": [
            {
                "level": 10,
                "name": "base.framework.object.*",
                "label": "object.*",
                "description": "Manage objects from framework",
                "is_master": true
            }
        ]
    },
    "response_type": "DELETE",
    "model": "Group",
    "time": "2020-01-01 00:00:00.000000"
}
Query Parameters
  • action – Parameter of GroupDeleteMode. MOVE will push all users in this group to passed group_id and DELETE will delete all users in this group.

  • group_id – The PublicID of the group which the MOVE action will be use.

Request Headers
Response Headers
Status Codes

2.3. Rights

Note

The right routes are static.

GET /rights/

HTTP GET/HEAD rest route. HEAD will be the same result except their will be no body.

Example request:

GET /rest/rights/ HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response:

HTTP/1.1 202 ACCEPTED
Content-Type: application/json
Content-Length: 100
X-API-Version: 1.0

{
    "results": [{
         "level": 0,
         "name": "base.*",
         "label": "base.*",
         "description": "Base application right",
         "is_master": true
    }],

    "count": 1,
    "total": 62,
    "parameters": {
        "limit": 1,
        "sort": "name",
        "order": 1,
        "page": 1,
        "filter": {},
        "optional": {
            "view": "list"
        }
   },
   "pager":{
        "page": 1,
        "page_size": 1,
        "total_pages": 62
   },
   "pagination": {
        "current": "http://datagerry.com/rest/rights/",
        "first": "http://datagerry.com/rest/rights/?page=1",
        "prev": "http://datagerry.com/rest/rights/?page=1",
        "next": "http://datagerry.com/rest/rights/?page=2",
        "last": "http://datagerry.com/rest/rights/?page=62"
   },
   "response_type": "GET",
   "model": "Right",
   "time": "2020-01-01 00:00:00.000000"
}
Query Parameters
  • sort – the sort field name. default is name.

  • order – the sort order value for ascending or descending. default is 1 for ascending

  • page – the current view page. default is 1

  • limit – max number of results. default is 10

  • filter – a mongodb query filter. default is {} which means everything

  • optionalview parameter. Default is list.

Request Headers
Response Headers
Status Codes
GET /rights/(str: name)

HTTP GET/HEAD rest route for a single resource by its name.

Example request

GET /rest/rights/base.* HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 100
X-API-Version: 1.0

{
    "result": {
        "level": 0,
        "name": "base.*",
        "label": "base.*",
        "description": "Base application right",
        "is_master": true
    },
    "response_type": "GET",
    "model": "Right",
    "time": "2020-01-01 00:00:00.000000"
}
Request Headers
Response Headers
Status Codes
GET /rights/levels

HTTP GET/HEAD rest route for a all security levels.

Example request

GET /rest/rights/levels HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 100
X-API-Version: 1.0

{
  "result": {
    "CRITICAL": 100,
    "DANGER": 80,
    "SECURE": 50,
    "PROTECTED": 30,
    "PERMISSION": 10,
    "NOTSET": 0
  },
  "response_type": "GET",
  "model": "Security-Level",
  "time": "2020-01-01 00:00:00.000000"
}
Request Headers
Response Headers
Status Codes
  • 200 OK – Everything is fine.

2.4. Settings

GET /users/(int: user_id)/settings/

HTTP GET/HEAD rest route. HEAD will be the same result except their will be no body.

Example request:

GET /rest/users/1/settings/ HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1000
X-Total-Count: 1
X-API-Version: 1.0

{
  "results": [
    {
      "identifier": "test",
      "user_id": 1,
      "payload": {},
      "setting_type": "GLOBAL"
    }
  ],
  "response_type": "GET",
  "model": "UserSetting",
  "time": "2020-01-01 00:00:00.000000"
}
Request Headers
Response Headers
Status Codes
GET /users/(int: public_id)/settings/(str: identifier)

HTTP GET/HEAD rest route for a single resource by the UserID and the setting identifier.

Example request

GET /rest/users/1/settings/test HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 100
X-API-Version: 1.0

{
  "results": [
    {
      "identifier": "test",
      "user_id": 1,
      "payload": {},
      "setting_type": "GLOBAL"
    }
  ],
  "response_type": "GET",
  "model": "UserSetting",
  "time": "2020-01-01 00:00:00.000000"
}
Request Headers
Response Headers
Status Codes
POST /users/(int: public_id)/settings/

HTTP POST route for inserting a new setting.

Example request

POST /rest/users/1/settings/ HTTP/1.1
Host: datagerry.com
Accept: application/json

{
    "identifier" : "test",
    "user_id" : 1,
    "payload" : {},
    "setting_type" : "GLOBAL"
}

Example response

HTTP/1.1 201 CREATED
Content-Type: application/json
Content-Length: 100
Location: http://datagerry.com/rest/users/1/settings/test
X-API-Version: 1.0

{
  "result_id": "test",
  "raw": {
    "identifier": "test",
    "user_id": 1,
    "payload": {},
    "setting_type": "GLOBAL"
  },
  "response_type": "INSERT",
  "model": "UserSetting",
  "time": "2020-01-01 00:00:00.000000"
}
Request Headers
Response Headers
Status Codes
PUT /users/(int: public_id)/settings/(str: identifier)

HTTP PUT/PATCH route for updating a setting.

Example request

PUT /rest/users/1/settings/test HTTP/1.1
Host: datagerry.com
Accept: application/json

{
    "identifier" : "test",
    "user_id" : 1,
    "payload" : {},
    "setting_type" : "GLOBAL"
}

Example response

HTTP/1.1 202 ACCEPTED
Content-Type: application/json
Content-Length: 100
Location: http://datagerry.com/rest/users/1/settings/test
X-API-Version: 1.0

{
    "result": {
        "identifier": "test",
        "user_id": 1,
        "payload": {},
        "setting_type": "GLOBAL"
    },
    "response_type": "UPDATE",
    "model": "UserSetting",
    "time": "2020-01-01 00:00:00.000000"
}
Request Headers
Response Headers
Status Codes
DELETE /users/(int: public_id)/settings/(str: identifier)

HTTP DELETE route for deleting a existing setting.

Example request

DELETE /rest/users/1/settings/test HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response

HTTP/1.1 202 ACCEPTED
Content-Type: application/json
Content-Length: 100
X-API-Version: 1.0

{
    "deleted_entry": {
        "identifier": "test",
        "user_id": 1,
        "payload": {},
        "setting_type": "APPLICATION"
    },
    "response_type": "DELETE",
    "model": "UserSetting",
    "time": "2020-01-01 00:00:00.000000"
}
Request Headers
Response Headers
Status Codes
1. Framework — DATAGERRY feature-NET-1074_exception-handling-bulk-changes-b204f7ed21c09010b5276b2c0a07e17aa6cdcb0d documentation

1. Framework

1.1. Objects

GET /objects/

Returns a collection of objects in different formats. HTTP GET/HEAD rest route. HEAD will be the same result except their will be no body.

Example request:

GET /rest/objects/ HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
X-Total-Count: 1
X-API-Version: 1.0

{
      "results": [
        {
          "public_id": 1
          "type_id": 1,
          "status": null,
          "version": "1.0.0",
          "creation_time": "1970-01-01T00:00:00.000000",
          "author_id": 1,
          "last_edit_time": "1970-01-01T00:00:00.000000",
          "editor_id": 1,
          "active": true,
          "fields": [
            {
              "name": "example",
              "value": "value"
            }
          ]
        }
      ],
      "count": 1,
      "total": 1,
      "parameters": {
        "limit": 10,
        "sort": "public_id",
        "order": 1,
        "page": 1,
        "filter": {},
        "optional": {}
      },
      "pager": {
        "page": 1,
        "page_size": 10,
        "total_pages": 1
      },
      "pagination": {
        "current": "http://datagerry.com/rest/objects/",
        "first": "http://datagerry.com/rest/objects/?page=1",
        "prev": "http://datagerry.com/rest/objects/?page=1",
        "next": "http://datagerry.com/rest/objects/?page=1",
        "last": "http://datagerry.com/rest/objects/?page=1"
      },
      "response_type": "GET",
      "model": "Object",
      "time": "1970-01-01T00:00:00.000000"
}
Query Parameters
  • view – Return view of the response. Values native or render. Default is native.

  • active – Show only active objects. Could also be set over the filter.

  • sort – the sort field name. default is public_id

  • order – the sort order value for ascending or descending. Default is 1 for ascending.

  • page – the current view page. default is 1

  • limit – max number of results. default is 10

  • filter – a mongodb query filter. default is {} which means everything

  • projection – a mongodb project filter.

Request Headers
Response Headers
Status Codes
GET /objects/(int: public_id)

Returns a rendered object. HTTP GET/HEAD rest route. HEAD will be the same result except their will be no body.

Example request:

GET /rest/objects/1 HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
X-Total-Count: 1
X-API-Version: 1.0

{
    "current_render_time": {
        "$date": 0
    },
    "object_information": {
        "object_id": 1,
        "creation_time": {
          "$date": 0
        },
        "last_edit_time": {
          "$date": 0
        },
        "author_id": 1,
        "author_name": "admin",
        "editor_id": null,
        "editor_name": null,
        "active": true,
        "version": "1.0.0"
    },
    "type_information": {
        "type_id": 1,
        "type_name": "example",
        "type_label": "Example",
        "creation_time": {
          "$date": 0
    },
    "author_id": 1,
    "author_name": "admin",
    "icon": "",
    "active": true,
    "version": "1.0.0",
    "acl": {
        "activated": false,
        "groups": {
            "includes": {}
        }
    },
    "fields": [
        {
            "type": "text",
            "name": "example",
            "label": "Example",
            "value": "value"
        },
    ],
    "sections": [
        {
          "type": "section",
          "name": "example",
          "label": "Example-Section",
          "fields": ["example"]
        }
    ],
    "summaries": [
        {
          "type": "text",
          "name": "example",
          "label": "example",
          "value": "value"
        }
    ],
    "summary_line": "value",
    "externals": [
        {
          "name": "google",
          "href": "http://www.google.de/value",
          "label": "Google Search",
          "icon": "fas fa-external-link",
          "fields": ["example"]
        }
    ]
}
Request Headers
Response Headers
Status Codes
GET /objects/(int: public_id)/native

Returns an object in its native format. HTTP GET/HEAD rest route. HEAD will be the same result except their will be no body.

Example request:

GET /rest/objects/1/native HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
X-Total-Count: 1
X-API-Version: 1.0

{
   "public_id": 1,
   "type_id": 1,
   "status": true,
   "version": "1.0.0",
   "creation_time": {
      "$date": 0
   },
   "author_id": 1,
   "last_edit_time": {
      "$date": 0
   },
   "editor_id": null,
   "active": true,
   "fields": [
      {
         "name": "example",
         "value": "value"
      }
   ],
   "views":0
}
Request Headers
Response Headers
Status Codes
GET /objects/(int: public_id)/references

HTTP GET/HEAD rest route. Returns all objects which reference to the object with the given id.

Example request:

GET /rest/objects/1/references HTTP/1.1
Host: datagerry.com
Accept: application/json
Query Parameters
  • view – Return view of the response. Values native or render. Default is native.

  • active – Show only active objects. Could also be set over the filter.

  • sort – the sort field name. default is public_id

  • order – the sort order value for ascending or descending. Default is 1 for ascending.

  • page – the current view page. default is 1

  • limit – max number of results. default is 10

  • filter – a mongodb query filter. default is {} which means everything

  • projection – a mongodb project filter.

Request Headers
Response Headers
Status Codes
POST /objects/

HTTP POST rest route. Insert a new object.

Example request

POST /rest/objects/ HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 588
Location: http://datagerry.com/rest/objects/1
X-API-Version: 1.0
Request Headers
Response Headers
Status Codes
PUT /objects/(int: public_id)

HTTP PUT/PATCH rest route. Update a existing object.

Example request

PUT /rest/objects/1 HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 588
Location: http://datagerry.com/rest/objects/1
X-API-Version: 1.0
Request Headers
Response Headers
Status Codes
DELETE /objects/(int: public_id)

HTTP DELETE rest route. Delete a existing object.

Example request

DELETE /rest/objects/1 HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 588
Location: http://datagerry.com/rest/objects/1
X-API-Version: 1.0
Request Headers
Response Headers
Status Codes
DELETE /objects/(list: public_ids)

HTTP DELETE rest route. Delete multiple existing object.

Example request

DELETE /rest/objects/1,2,3 HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 588
Location: http://datagerry.com/rest/objects/1
X-API-Version: 1.0
Request Headers
Response Headers
Status Codes
GET /objects/(int: public_id)/state

HTTP GET rest route. Returns the activation state of an object.

Example request:

GET /rest/objects/1/state HTTP/1.1
Host: datagerry.com
Accept: application/json
Request Headers
Response Headers
Status Codes
PUT /objects/(int: public_id)/state

HTTP PUT rest route. Update the activation state of an object.

Example request:

PUT /rest/objects/1/state HTTP/1.1
Host: datagerry.com
Accept: application/json
Request Headers
Response Headers
Status Codes
GET /objects/clean/(int: public_id)

HTTP GET/HEAD rest route. Returns all unstructured/unclean objects form a type. PublicID is the id of the type.

Example request:

GET /rest/objects/clean/1 HTTP/1.1
Host: datagerry.com
Accept: application/json
Request Headers
Response Headers
Status Codes
PUT /objects/clean/(int: public_id)

HTTP PUT rest route. Cleans all unstructured/unclean objects form a type. PublicID is the id of the type.

Example request:

PUT /rest/objects/clean/1 HTTP/1.1
Host: datagerry.com
Accept: application/json
Request Headers
Response Headers
Status Codes

1.2. Types

GET /types/

HTTP GET/HEAD rest route. HEAD will be the same result except their will be no body.

Example request:

GET /rest/types/ HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3311
X-Total-Count: 1
X-API-Version: 1.0

{
    "results": [
      {
        "public_id": 1,
        "name": "example",
        "active": true,
        "author_id": 1,
        "creation_time": "",
        "label": "Example",
        "version": "1.0.0",
        "description": "",
        "render_meta": {
          "icon": "",
          "sections": [
            {
              "type": "section",
              "name": "example",
              "label": "Example",
              "fields": [
                "f"
              ]
            }
          ],
          "externals": [
            {
              "name": "example",
              "href": "https://example.org",
              "label": "Example",
              "icon": "fas fa-external-link-alt",
              "fields": []
            }
          ],
          "summary": {
            "fields": [
              "f"
            ]
          }
        },
        "fields": [
          {
            "type": "text",
            "name": "f",
            "label": "F"
          }
        ]
      }
    ],
    "count": 1,
    "total": 1,
    "parameters": {
      "limit": 10,
      "sort": "public_id",
      "order": 1,
      "page": 1,
      "filter": {},
      "optional": {}
    },
    "pager": {
      "page": 1,
      "page_size": 10,
      "total_pages": 1
    },
    "pagination": {
      "current": "http://datagerry.com/rest/types/",
      "first": "http://datagerry.com/rest/types/?page=1",
      "prev": "http://datagerry.com/rest/types/?page=1",
      "next": "http://datagerry.com/rest/types/?page=1",
      "last": "http://datagerry.com/rest/types/?page=1"
    },
    "response_type": "GET",
    "model": "Type",
    "time": "1970-01-01T00:00:00"
  }
Query Parameters
  • sort – the sort field name. default is public_id

  • order – the sort order value for ascending or descending. default is 1 for ascending

  • page – the current view page. default is 1

  • limit – max number of results. default is 10

  • filter – a mongodb query filter. default is {} which means everything

Request Headers
Response Headers
Status Codes
GET /types/(int: public_id)

HTTP GET/HEAD rest route for a single resource by its ID.

Example request

GET /rest/types/1 HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 588
X-API-Version: 1.0

{
  "result": {
      "public_id": 1,
      "name": "example",
      "active": true,
      "author_id": 1,
      "creation_time": "",
      "label": "Example",
      "version": "1.0.0",
      "description": "",
      "render_meta": {
        "icon": "",
        "sections": [
          {
            "type": "section",
            "name": "example",
            "label": "Example",
            "fields": [
              "f"
            ]
          }
        ],
        "externals": [
          {
            "name": "example",
            "href": "https://example.org",
            "label": "Example",
            "icon": "fas fa-external-link-alt",
            "fields": []
          }
        ],
        "summary": {
          "fields": [
            "f"
          ]
        }
      },
      "fields": [
        {
          "type": "text",
          "name": "f",
          "label": "F"
        }
      ]
    },
    "response_type": "GET",
    "model": "Type",
    "time": "1970-01-01T00:00:00"
}
Request Headers
Response Headers
Status Codes
POST /types/

HTTP Post route for inserting a new type.

Example request

POST /rest/types/ HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 588
Location: http://datagerry.com/rest/types/1
X-API-Version: 1.0

{
  "result_id": 1,
  "raw": {},
  "response_type": "INSERT",
  "model": "Type",
  "time": "1970-01-01T00:00:00"
}
Request Headers
Response Headers
Status Codes
PUT /types/(int: public_id)

HTTP PUT/PATCH route for updating a existing type.

Example request

PUT /rest/types/1 HTTP/1.1
Host: datagerry.com
Accept: application/json

{
}

Example response

HTTP/1.1 202 ACCEPTED
Content-Type: application/json
Content-Length: 170
Location: http://datagerry.com/rest/categories/1
X-API-Version: 1.0

{
  "result": {
  },
  "response_type": "UPDATE",
  "model": "Type",
  "time": "1970-01-01T00:00:00"
}
Request Headers
Response Headers
Status Codes
DELETE /type/(int: public_id)

HTTP DELETE route for deleting a existing type.

Example request

DELETE /rest/types/1 HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response

HTTP/1.1 202 ACCEPTED
Content-Type: application/json
Content-Length: 170
X-API-Version: 1.0

{
  "deleted_entry": {
  },
  "response_type": "DELETE",
  "model": "Type",
  "time": "1970-01-01T00:00:00"
}
Request Headers
Response Headers
Status Codes

1.3. Categories

GET /categories/

HTTP GET/HEAD rest route. HEAD will be the same result except their will be no body.

Example request:

GET /rest/categories/ HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3311
X-Total-Count: 1
X-API-Version: 1.0

{
    "results": [
      {
        "public_id": 1,
        "name": "example",
        "label": "Example",
        "meta": {
          "icon": "",
          "order": null
        },
        "parent": null,
        "types": [1]
      }
    ],
    "count": 1,
    "total": 1,
    "parameters": {
      "limit": 10,
      "sort": "public_id",
      "order": 1,
      "page": 1,
      "filter": {},
      "optional": {
        "view": "list"
      }
    },
    "pager": {
      "page": 1,
      "page_size": 10,
      "total_pages": 1
    },
    "pagination": {
      "current": "http://datagerry.com/rest/categories/",
      "first": "http://datagerry.com/rest/categories/?page=1",
      "prev": "http://datagerry.com0/rest/categories/?page=1",
      "next": "http://datagerry.com/rest/categories/?page=1",
      "last": "http://datagerry.com/rest/categories/?page=1"
    },
    "response_type": "GET",
    "model": "Category",
    "time": "1970-01-01T00:00:00"
  }
Query Parameters
  • sort – the sort field name. default is public_id

  • order – the sort order value for ascending or descending. default is 1 for ascending

  • page – the current view page. default is 1

  • limit – max number of results. default is 10

  • filter – a mongodb query filter. default is {} which means everything

  • view – the category view data-structure. Can be list or tree. default is list

Request Headers
Response Headers
Status Codes
GET /categories/(int: public_id)

The category with the public_id.

Example request

GET /rest/categories/1 HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 588
X-API-Version: 1.0

{
  "result": {
    "public_id": 1,
    "name": "example",
    "label": "Example",
    "meta": {
      "icon": "far fa-folder-open",
      "order": 0
    },
    "parent": null,
    "types": [1]
  },
  "response_type": "GET",
  "model": "Category",
  "time": "1970-01-01T00:00:00"
}
Request Headers
Response Headers
Status Codes
POST /categories/

HTTP Post route for inserting a new category.

Example request

POST /rest/categories/ HTTP/1.1
Host: datagerry.com
Accept: application/json

{
  "name": "example",
  "label": "Example",
  "meta": {
    "icon": "",
    "order": 0
  },
  "parent": null,
  "types": [1]
}

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 588
Location: http://datagerry.com/rest/categories/1
X-API-Version: 1.0

{
  "result_id": 1,
  "raw": {
    "public_id": 1,
    "name": "example",
    "label": "Example",
    "meta": {
      "icon": "",
      "order": 0
    },
    "parent": null,
    "types": [1]
  },
  "response_type": "INSERT",
  "model": "Category",
  "time": "1970-01-01T00:00:00"
}
Request Headers
Response Headers
Status Codes
PUT /categories/(int: public_id)

HTTP PUT/PATCH route for updating a existing category.

Example request

PUT /rest/categories/1 HTTP/1.1
Host: datagerry.com
Accept: application/json

{
  ""public_id": 1,
  "name": "example",
  "label": "Example",
  "meta": {
    "icon": "",
    "order": 0
  },
  "parent": null,
  "types": [1]
}

Example response

HTTP/1.1 202 ACCEPTED
Content-Type: application/json
Content-Length: 170
Location: http://datagerry.com/rest/categories/1
X-API-Version: 1.0

{
  "result": {
    "public_id": 1,
    "name": "example2",
    "label": "Example,
    "meta": {
      "icon": "",
      "order": 0
    },
    "parent": null,
    "types": []
  },
  "response_type": "UPDATE",
  "model": "Category",
  "time": "1970-01-01T00:00:00"
}
Request Headers
Response Headers
Status Codes
DELETE /categories/(int: public_id)

HTTP DELETE route for deleting a existing category.

Example request

DELETE /rest/categories/1 HTTP/1.1
Host: datagerry.com
Accept: application/json

Example response

HTTP/1.1 202 ACCEPTED
Content-Type: application/json
Content-Length: 170
X-API-Version: 1.0

{
  "deleted_entry": {
    "public_id": 1,
    "name": "example",
    "label": "Example",
    "meta": {
      "icon": "",
      "order": 1
    },
    "parent": null,
    "types": [
      1
    ]
  },
  "response_type": "DELETE",
  "model": "Category",
  "time": "1970-01-01T00:00:00"
}
Request Headers
Response Headers
Status Codes