Schema
All data in Zaius is stored within collections called Objects (what many think of as a database table).
Objects are composed of Fields.
Fields link objects together via Relations.

Objects

Object Definition
1
{
2
"name": "object_name",
3
"display_name": "Display Name",
4
"alias": "object_alias",
5
"fields": [],
6
"relations": []
7
}
Copied!
property
description
name
plural name for the object
display_name
user-friendly name shown within Zaius
alias
singular name for the object
fields
collection of Field objects constituting the Object
relations
collection of Relation objects
post
https://api.zaius.com/v3
/schema/objects
Create Object
Example Payload
1
{
2
"name": "objects",
3
"display_name": "Object",
4
"alias": "object",
5
"fields": [
6
{
7
"name": "object_id",
8
"display_name": "New Object Identifier",
9
"type": "string",
10
"primary": true
11
},{
12
"name": "another_field",
13
"display_name": "Another Fields",
14
"type": "string"
15
},{
16
"name": "child_id",
17
"display_name": "Child Identifier",
18
"type": "number"
19
}
20
],
21
"relations": [
22
{
23
"name": "my_relation",
24
"display_name": "My Relationship",
25
"child_object": "child",
26
"join_fields": [{
27
"parent": "child_id",
28
"child": "child_id"
29
}]
30
}
31
]
32
}
Copied!
get
https://api.zaius.com/v3
/schema/objects
List Objects
Example Request
1
curl -iX GET \
2
'https://api.zaius.com/v3/schema/objects' \
3
-H 'x-api-key: example.apiKey'
Copied!
get
https://api.zaius.com/v3
/schema/objects/{object_name}
Get Object
Example Request
1
curl -iX GET \
2
'https://api.zaius.com/v3/schema/objects/myobject' \
3
-H 'x-api-key: example.apiKey'
Copied!

Fields

1
{
2
"name": "field_name",
3
"type": "number",
4
"auto": true,
5
"display_name": "Display Name",
6
"description": "Description of field",
7
"created_by": "zaius",
8
"primary_key": true
9
}
Copied!
property
description
name
name of the field
type
field data type. options are number, timestamp, text, boolean
auto
(read only) marks the field as one that is auto populated by Zaius
display_name
the user-friendly name used within Zaius
description
description of the field
created_by
(read only) specifies what/who created the field. current values as zaius and account
primary_key
marks the field as identifying for the containing object. only allowed during object creation.
post
https://api.zaius.com/v3
/schema/objects/{object_name}/fields
Create Field
Example Payload
1
{
2
"name": "field_name",
3
"type": "number",
4
"display_name": "Display Name",
5
"description": "Description of field"
6
}
Copied!

Identifier Fields

If you are attempting to create an identifier (e.g. an address for messaging or an internal reference to a customer record similar to an email, phone number or token), refer to the Identifier API documentation:
get
https://api.zaius.com/v3
/schema/objects/{object_name}/fields
List Fields
Example Payload
1
{
2
"name": "my_relation",
3
"display_name": "My Relationship",
4
"child_object": "child",
5
"join_fields": [{
6
"parent": "child_id",
7
"child": "child_id"
8
}]
9
}
Copied!
Example Request
1
curl -iX GET \
2
'https://api.zaius.com/v3/schema/objects/{object_name}/fields' \
3
-H 'x-api-key: example.apiKey'
Copied!
get
https://api.zaius.com/v3
/schema/objects/{object_name}/fields/{field_name}
Get Field
Example Request
1
curl -iX GET \
2
'https://api.zaius.com/v3/schema/objects/{object_name}/fields/{field_name}' \
3
-H 'x-api-key: example.apiKey'
Copied!

Relationships

Representation describing a relationship between two objects. The Object containing the Relation definition is the parent object.
1
{
2
"name": "relation_name",
3
"display_name": "Relation Display Name",
4
"child_object": "child_object_name",
5
"join_fields": [{
6
"parent": "child_id",
7
"child": "child_id"
8
}]
9
}
Copied!
property
description
name
name for the relation
display_name
user-friendly name shown within Zaius
child_object
child Object name
join_fields
collection of parent child pairs. parent is the field name (foreign key) on the owning Object and child is the related Objects primary key. Multiple are allowed to support objects with compound primary keys.
post
https://api.zaius.com/v3
/schema/objects/{object_name}/relations
Create Relationship
get
https://api.zaius.com/v3
/schema/objects/{object_name}/relations
List Relations
Example Request
1
curl -iX GET \
2
'https://api.zaius.com/v3/schema/objects/{object_name}/relations' \
3
-H 'x-api-key: example.apiKey'
Copied!
get
https://api.zaius.com/v3
/schema/objects/{object_name}/relations/{relation_name}
Get Relation
Example Request
1
curl -iX GET \
2
'https://api.zaius.com/v3/schema/objects/{object_name}/relations/{relation_name}' \
3
-H 'x-api-key: example.apiKey'
Copied!
Last modified 2yr ago