Skip to main content

Admin Actions

Administrative actions create, modify, or delete XINA data structures, perform user management, or other system functions.

Schema Actions

SCHEMA

Returns the complete environment schema as a JSON object.

Property Value Required Default
action "schema" yes

Example

{
  "action" : "schema"
}

The server will return a JSON object:

{
  "groups" : [ ... ]
}

CREATE

The CREATE action is used to create new groups, databases, teams, and users.

CREATE GROUP

Creates a new group.

Property Value Required Default
action "create" yes
create "group" yes
group group definition yes
parent group specifier no
teams group teams association (see below) no

If a parent group is provided, the created group will be a child of the parent; otherwise the group will be a root level group.

The teams property is used to associate the group with one or more teams on creation. This may either be a JSON array of team specifier(s), and the group will be added to those teams with the default group privileges as specified by each team, or may be a JSON object, with each key interpretted as a team specifier, and each value containing a JSON object of group privilege(s) to boolean values, overriding the default team privileges.

CREATE DATABASE

Creates a new database.

Property Value Required Default
action "create" yes
create "database" yes
database database definition yes
parent group specifier yes
teams database teams association (see below) no

The teams property is used to associate the database with one or more teams on creation. This may either be a JSON array of team specifier(s), and the database will be added to those teams with the default database privileges as specified by each team, or may be a JSON object, with each key interpretted as a team specifier, and each value containing a JSON object of database privilege(s) to boolean values, overriding the default team privileges.

CREATE TEAM

Creates a new team.

Property Value Required Default
action "create" yes
create "team" yes
team team definition yes

ALTER

The ALTER action is used to edit group, database, field, team, or user properties.

ALTER GROUP SET

Alters one or more group parameters.

Property Value Required Default
action "alter" yes
alter "group" yes
op "set" yes
set JSON object map of parameter(s) to value(s) yes

ALTER GROUP OBJECTS

Inserts, updates, or deletes group objects.

Property Value Required Default
action "alter" yes
alter "group" yes
op "objects" yes
objects JSON object map of key(s) to object value(s) yes

Any properties in the objects JSON object with a null value will be deleted, if they exist in the group objects.

ALTER GROUP FILES

Inserts, updates, or deletes group files.

Property Value Required Default
action "alter" yes
alter "group" yes
op "files" yes
files JSON object map of key(s) to object ID(s) yes

Any properties in the files JSON object with a null value will be deleted, if they exist in the group files.

ALTER DATABASE SET

Alters one or more database parameters.

Property Value Required Default
action "alter" yes
alter "database" yes
op "set" yes
set JSON object map of parameter(s) to value(s) yes

ALTER DATABASE OBJECTS

Inserts, updates, or deletes database objects.

Property Value Required Default
action "alter" yes
alter "database" yes
op "objects" yes
objects JSON object map of key(s) to object value(s) yes

Any properties in the objects JSON object with a null value will be deleted, if they exist in the database objects.

ALTER DATABASE FILES

Inserts, updates, or deletes database files.

Property Value Required Default
action "alter" yes
alter "database" yes
op "files" yes
files JSON object map of key(s) to object ID(s) yes

Any properties in the files JSON object with a null value will be deleted, if they exist in the database files.

ALTER DATABASE ADD FIELDS

Adds one or more fields to an existing database. This operation modifies the database table(s) and may take several hours for very large databases.

Property Value Required Default
action "alter" yes
alter "database" yes
op "add_fields" yes
fields JSON array of field definitions yes
first boolean no false
after field specifier no

The action will fail if any of the new fields have the same name or label as eachother or any existing field in the database.

By default, new fields are added at the end of the existing fields. If first is true, new fields will be added at the front of the existing fields. If after is provided, new fields will be added immediately after the specified field, and before any following fields. If both first is true and after is provided, the action will fail.

ALTER DATABASE DROP FIELDS

Drops one or more fields from an existing database. This operation modifies the database table(s) and may take several hours for very large databases.

Property Value Required Default
action "alter" yes
alter "database" yes
op "drop_fields" yes
fields fields specifier yes

The action will fail if any of the specified fields is a key field, or if the action would drop all fields from a database.

ALTER DATABASE ORDER FIELDS

Specifies ordering of one or more fields in a database. This operation does not modify the database table(s), only the field order as indicated by the XINA schema.

Property Value Required Default
action "alter" yes
alter "database" yes
op "order_fields" yes
fields JSON array of field specifiers yes
after field specifier no

Fields will be ordered based on the order provided in the fields property, with any fields not specified maintaining their original order after the specified set. If after is provided, the ordered block will start following that specified field, with any non-specified fields before the after field maintaining their original order. If the after field is included in the fields property, the action will fail.


DROP

Permanently delete teams, groups, databases, or users.

Under Construction

JOIN

LEAVE


User Actions

GRANT


REVOKE


REQUEST

Request an arbitrary action to be performed by a user with required permissions.


RETRACT

Retract one or more user requests.


APPROVE


REJECT


System Functions

ACCESS

Used to acquire temporary access ID for websocket connection.

Example

{
  "action" : "access"
}

Result

{
  "access_id" : "<string>"
  "expires" : <unix_ms_timestamp>
}