GSD REST API Serialization API documentation

General


Field Type Pattern Possible Default
getSize? boolean false
If set on true, the document size is returned.
getSecurity? enums.securityRights

Full


Type of serialization. Default DOCUframe serialization.

Field Type Pattern Possible Default
type string full

Examples

1
2
3
{
  "type": "full"
}

Empty


Type of serialization. Only OID and class.

Field Type Pattern Possible Default
type string empty

Examples

1
2
3
4
{
  "type": "empty",
  "getSize": true
}

Oid


Type of serialization. Only OID.

Field Type Pattern Possible Default
type string oid

Examples

1
2
3
{
  "type": "oid"
}

Macro


Type of serialization

Field Type Pattern Possible Default
type string macro
macro string
Name of macro which is handling serialization
macroLevel? enums.macroLevel

Examples

1
2
3
4
5
{
  "type": "macro",
  "macro": "SerializationEventMacro",
  "macroLevel": 1
}

Class


Type of serialization

Field Type Pattern Possible Default
type string class
style string preview,detailview
annotations? object
getRestricted? boolean
getEmpty? boolean
// object
Class name
type string
inherit boolean
merge boolean

Examples

1
2
3
4
5
6
7
8
9
{
  "type": "class",
  "style": "detailview",
  "Vorgang": {
    "type": "full",
    "inherit": true,
    "merge": true
  }
}

Custom


Type of serialization.

Field Type Pattern Possible Default
type string custom
custom CustomSerialization

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{
  "type": "custom",
  "getSize": true,
  "custom": {
    "type": "empty",
    "fieldList": [
      "Name1",
      "Name2"
    ]
  }
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
{
  "type": "custom",
  "custom": {
    "type": "empty",
    "fieldList": [
      "Name1",
      "Name2",
      "ActivityLog"
    ],
    "fieldCustom": {
      "ActivityLog": {
        "page": 0,
        "perPage": 5
      }
    }
  }
}

Docs


Type of serialization.

Field Type Pattern Possible Default
type string docs
path? string
Default path for all objects.
deep? boolean
Indicates whether search in subfolders of given path, or just on the path level
page? enums.page
perPage? enums.perPage
query? object
Query which will filter found documents.
custom? DocsSerialization
DocsSerialization[] - array

Examples

1
2
3
4
{
  "type": "docs",
  "getSize": true
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
{
  "type": "docs",
  "path": "",
  "deep": true,
  "getSize": true,
  "custom": [
    {
      "oid": "45TU",
      "path": "Folder",
      "deep": false
    },
    {
      "oid": "45TW",
      "path": "Folder",
      "deep": true
    }
  ],
  "page": 0,
  "perPage": 10
}

Table


Since DOCUframe module version 1.1.0.68
Type that allows to combine serializers. It is an array of serializers. If the second serializer sets the same field as the first, the data will be overwritten.

Field Type Pattern Possible Default
- array

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
[
  {
    "type": "custom",
    "getSize": true,
    "custom": {
      "type": "empty",
      "fieldList": [
        "Name1",
        "Name2"
      ]
    }
  },
  {
    "type": "macro",
    "macro": "SerializationEventMacro",
    "macroLevel": 1
  }
]

CustomSerialization


Field Type Pattern Possible Default
type string empty,full,oid
Full - all fields are added to JSON, fields from fieldList are excluded.
Empty – only fields in fieldList are added to JSON.
Oid - only Oids in fieldList are added to JSON
fieldList? array
string[] - List of field names.
fieldCustom? FieldCustomObject

FieldCustomObject


Field Type Pattern Possible Default
//? FieldCustom

FieldCustom


Field Type Pattern Possible Default
page? enums.page
perPage? enums.perPage
serialization? [object Object]

DocsSerialization


Definition of path depth and query for specific object in which documents should be searched for.

Field Type Pattern Possible Default
oid string
OID of the object.
path? string
Path for the object.
deep? boolean
Indicates whether search in subfolders of given path, or just on the path level.
query? string
Query which will filter found documents.

page


Page number.

Field Type Pattern Possible Default
- integer 0

perPage


The number of items displayed per page.

Field Type Pattern Possible Default
- integer 10

securityRights


The information about security right for an object is stored in a number. The individual bits of this number correspond to the set or unset rights.

BitAreaDescription
1ObjectRead
2ObjectWrite
3ObjectCreate
4ObjectDelete
5Change security
6-
7-
8-
9ContentRead
10ContentWrite
11ContentInsert
12ContentRemove

Field Type Pattern Possible Default
- boolean false

macroLevel


Event macro level.

ValueDOCUframe ConstantDescription
-1UL_NOOVERRIDENo overwrite
0UL_ENDUSEREnd user
1UL_OEMPARTNEROEM-Partner
2UL_GSDGSD

Field Type Pattern Possible Default
- integer -1,0,1,2 2