openapi: 3.0.2 info: title: '' version: '' tags: - name: Meta description: "Object schema management endpoints" - name: Record description: "Data endpoints" - name: Migration description: "Migration endpoints" paths: /meta/: get: description: Metadata is a json file that describes which objects should be created, which attributes describe them, and what relationships exist between the objects. Each object corresponds to a table in the database. summary: 'Get a list of all objects' tags: - Meta operationId: listMeta parameters: [] responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/Meta' description: '' post: summary: 'Add object' tags: - Meta operationId: createMeta parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/Meta' responses: '200': content: application/json: schema: $ref: '#/components/schemas/Meta' description: '' /meta/{name}/: get: summary: 'Get an object with this name' tags: - Meta operationId: retrieveMeta parameters: - name: name in: path required: true description: A unique integer value identifying this account. schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/Meta' description: '' patch: summary: 'Change the fields in object with this name' tags: - Meta operationId: updateMeta parameters: - name: name in: path required: true description: A unique integer value identifying this account. schema: type: string requestBody: content: application/json: schema: properties: login: type: string maxLength: 64 status: enum: - active - disabled - deleted active: type: boolean role: type: integer nullable: true type: enum: - user - service cidr: type: string maxLength: 20 responses: '200': content: application/json: schema: $ref: '#/components/schemas/Meta' description: '' delete: summary: 'Delete object with this name' tags: - Meta operationId: destroyMeta parameters: - name: name in: path required: true description: A unique integer value identifying this account. schema: type: string responses: '204': description: '' /data/{name}/: get: summary: 'Get a list of data for an object with this name' description: Record is a json file that contains a set of values for various object properties tags: - Record operationId: listRecords parameters: - name: name in: path required: true description: An object name. schema: type: string responses: '200': content: application/json: schema: $ref: "#/components/schemas/Record" description: '' post: summary: 'Add a data for an object with this name' tags: - Record operationId: createRecord parameters: - name: name in: path required: true description: An object name. schema: type: string requestBody: content: application/json: schema: properties: login: type: string maxLength: 64 status: enum: - active - disabled - deleted active: type: boolean role: type: integer nullable: true type: enum: - user - service cidr: type: string maxLength: 20 required: - login responses: '200': content: application/json: schema: $ref: '#/components/schemas/Meta' description: '' delete: summary: 'Delete the list of data for an object with this name' tags: - Record operationId: destroyRecord parameters: - name: name in: path required: true description: An object name. schema: type: string responses: '204': description: '' patch: summary: 'Change all data for an object with this name' tags: - Record operationId: updateRecord parameters: - name: name in: path required: true description: An object name. schema: type: string requestBody: content: application/json: schema: properties: name: type: string maxLength: 128 status: enum: - active - disabled - deleted responses: '200': content: application/json: schema: $ref: "#/components/schemas/Record" description: '' /data/{name}/{pk}: get: summary: 'Get specific data for an object with this name' tags: - Record operationId: getRecord parameters: - name: name in: path required: true description: An object name. schema: type: string - name: pk in: path required: true description: An object primary key value. schema: type: string responses: '200': content: application/json: schema: $ref: "#/components/schemas/Record" description: '' patch: summary: 'Change specific data for an object with this name' tags: - Record operationId: updateRecord parameters: - name: name in: path required: true description: An object name. schema: type: string - name: pk in: path required: true description: An object primary key value. schema: type: string requestBody: content: application/json: schema: properties: name: type: string maxLength: 128 status: enum: - active - disabled - deleted responses: '200': content: application/json: schema: $ref: "#/components/schemas/Record" description: '' delete: summary: 'Delete specific data for an object with this name' tags: - Record operationId: destroyRecord parameters: - name: name in: path required: true description: An object name. schema: type: string - name: pk in: path required: true description: An object primary key value. schema: type: string responses: '204': description: '' /migrations/: get: description: Migration is a sequence of operations that leads an object from one configuration to another. summary: 'Get a list of all migrations' tags: - Migration operationId: listMigrations responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/Migration' description: '' post: summary: 'Add a migration' tags: - Migration operationId: createMigration requestBody: content: application/json: schema: $ref: "#/components/schemas/Migration" responses: '200': content: application/json: schema: $ref: '#/components/schemas/Migration' description: '' /migrations/{pk}: get: summary: 'Get a specific migration' tags: - Migration operationId: getMigration parameters: - name: pk in: path required: true description: A migration primary key value. schema: type: string responses: '200': content: application/json: schema: $ref: "#/components/schemas/Migration" description: '' components: schemas: Meta: type: object properties: name: type: string key: type: string fields: type: array items: $ref: '#/components/schemas/Field' actions: type: array items: $ref: "#/components/schemas/Action" cas: type: boolean Field: type: object properties: name: type: string type: type: string enum: - number - string - generic - object - objects - array - date - datetime optional: type: boolean unique: type: boolean Action: type: object properties: name: type: string method: type: string enum: - create - delete - update protocol: type: string enum: - REST args: type: array items: type: string activeIfNotRoot: type: boolean includeValues: type: object MigrationField: type: object properties: name: type: string previousName: type: string type: type: string optional: type: boolean MigrationAction: type: object properties: name: type: string previousName: type: string method: type: string enum: - update protocol: type: string enum: - REST args: type: array items: type: string activeIfNotRoot: type: boolean includeValues: type: object Migration: type: object properties: name: type: string previousName: type: string key: type: string fields: type: array items: $ref: '#/components/schemas/MigrationField' actions: type: array items: $ref: "#/components/schemas/MigrationAction" cas: type: boolean Record: type: object