OMRDBA DataBase API.json
Jump to navigation
Jump to search
{ "openapi" : "3.0.1", "info" : { "title" : "OMS - Database REST API", "description" : "This is the TD/OMS Database REST API.", "contact" : { "name" : "Remain software", "url" : "https://remainsoftware.com", "email" : "info@remaibsoftware.com" }, "license" : { "name" : "Remain Software License", "url" : "https://remainsoftware.com/remain-api-studio-terms-and-conditions" }, "version" : "0.0.1", "x-restgeninfo" : { "server" : "http://plato:45635/generator", "library" : "V15T0098", "file" : "OMEROV1.json", "srclibrary" : "V15T0098S", "object" : "OMRDBA" } }, "servers" : [ { "url" : "http://plato:45635/V15T0098/OMRDBA", "description" : "plato.prod" }, { "url" : "http://{server}:{port}/{library}/OMRDBA", "description" : "The server", "variables" : { "server" : { "default" : "plato.remainsoftware.com" }, "library" : { "default" : "v150dev" }, "port" : { "default" : "45211" }, "protocol" : { "enum" : [ "https", "http" ], "default" : "https" } } } ], "security" : [ { "JWT" : [ ] } ], "paths" : { "/get" : { "summary" : "Get the database records", "description" : "Get the database records.", "post" : { "summary" : "Get the database records", "description" : "Get the database records", "operationId" : "getRecords", "requestBody" : { "description" : "Post Method", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/request" } } }, "required" : true }, "responses" : { "200" : { "description" : "return code 200 response", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/result" }, "examples" : { "Example of get " : { "summary" : "How to specify the listInput parametrs value.", "value" : { "sortFields" : [ { "fieldName" : "applicationCode", "sortBy" : "desc" }, { "fieldName" : "objectCode", "sortBy" : "asc" } ], "returnExtendedMessageText" : true, "listInput" : { "skipChecks" : false, "whereClause" : "", "pageNumber" : 1, "fieldSelections" : [ { "field" : "applicationCode", "value" : "MISHD,SHUKV,DEMO", "operator" : "IN" }, { "field" : "objectCode", "value" : "APGM,CPGM", "operator" : "BETWEEN" } ], "recordsPerPage" : 50, "schemaOverride" : "", "returnFields" : [ "applicationCode", "objectCode", "objectType", "objectLibrary", "objectDescription" ], "returnTotalRecords" : true, "table" : "OMOBJV1" } } } } } } }, "401" : { "$ref" : "#/components/responses/401" }, "422" : { "$ref" : "#/components/responses/422" } }, "callbacks" : { }, "x-generate" : { "session" : false, "jwtlogin" : false, "suffix" : "SO", "generate" : true } } } }, "components" : { "schemas" : { "listInput" : { "required" : [ "table" ], "type" : "object", "properties" : { "pageNumber" : { "type" : "integer", "description" : "The page number to view.\r\nIf the file contains 100 records and you want 10 records back then you can specify the page number e.g. 1 to get records 1 to 10.", "default" : 1 }, "returnTotalRecords" : { "type" : "boolean", "description" : "Return total number of records.", "default" : false }, "recordsPerPage" : { "maximum" : 50, "type" : "integer", "description" : "The number of records to be returned per request.", "nullable" : true, "default" : 50 }, "returnFields" : { "maxItems" : 100, "type" : "array", "description" : "Fields to be returned, default is to return all fields.", "items" : { "type" : "string" } }, "schemaOverride" : { "type" : "string", "description" : "Instead of fetching from the database library, fetch it from this library." }, "whereClause" : { "maxLength" : 2048, "type" : "string", "description" : "An additional where clause to manipulate the list even further." }, "table" : { "type" : "string", "description" : "The table to read." }, "fieldSelections" : { "maxItems" : 25, "type" : "array", "description" : "The field selections for this query (max 25)", "items" : { "$ref" : "#/components/schemas/fieldSelection" } }, "skipChecks" : { "type" : "boolean", "description" : "Set to true to skip the input validation. Skipping the input validation will save time but will return less usable feedback information in case of mistakes." } }, "description" : "Common input items across all APIs" }, "message" : { "type" : "object", "properties" : { "messageText" : { "maxLength" : 256, "type" : "string", "description" : "It contains the first level message text." }, "messageID" : { "maxLength" : 50, "type" : "string", "description" : "It contains the message id of the message : Example - CPF0000" }, "messageTextExtended" : { "maxLength" : 1024, "type" : "string", "description" : "It contains the additional message information based on the value of the request." } }, "description" : "message object" }, "fieldMessage" : { "type" : "object", "properties" : { "message" : { "$ref" : "#/components/schemas/message" }, "fieldName" : { "type" : "string", "description" : "It contains the name of the field that is in error." } }, "description" : "This schema contains information about a field in error." }, "listStatus" : { "type" : "object", "properties" : { "totalRecords" : { "type" : "integer", "description" : "Total available records. \r\nThis will be returned only if requested in the request." }, "recordsReturned" : { "type" : "integer", "description" : "Total number of records returned." }, "pageNumber" : { "type" : "integer", "description" : "page number returned." } }, "description" : "Common response to all list Apis" }, "returnStatus" : { "type" : "object", "properties" : { "status" : { "type" : "string", "description" : "Return status. See the description of the operation to see what values can be returned." }, "messages" : { "maxItems" : 50, "type" : "array", "description" : "General error messages", "items" : { "$ref" : "#/components/schemas/message" } }, "fieldMessages" : { "maxItems" : 50, "type" : "array", "description" : "fields in error along with error message", "items" : { "$ref" : "#/components/schemas/fieldMessage" } } }, "description" : "The return status object" }, "sortField" : { "required" : [ "fieldName", "sortBy" ], "type" : "object", "properties" : { "fieldName" : { "type" : "string", "description" : "Enter field name on which you want to do the sorting." }, "sortBy" : { "type" : "string", "description" : "Enter sorting order of the field. The possible values are : \r\n\r\nDESC - Descending order \r\n\r\nASC - Ascending order" } }, "description" : "Enter Fields to be sorted" }, "request" : { "type" : "object", "properties" : { "listInput" : { "$ref" : "#/components/schemas/listInput" }, "sortFields" : { "maxItems" : 50, "type" : "array", "description" : "Sorting order of the fields", "items" : { "$ref" : "#/components/schemas/sortField" } }, "returnExtendedMessageText" : { "type" : "boolean", "description" : "Return extended message text. true or false." } }, "description" : "list input for task list API" }, "fieldSelection" : { "type" : "object", "properties" : { "field" : { "type" : "string", "description" : "The field to select from." }, "value" : { "maxLength" : 1024, "type" : "string", "description" : "The value" }, "operator" : { "maxLength" : 20, "type" : "string", "description" : "Specify the operator. ", "example" : "{\"field\": \"applicationCode\",\"value\": \"MISHD,SHUKV\",\"operator\": \"IN\"},{\"field\": \"applicationCode\",\"value\": \"MISHD,SHUKV\",\"operator\": \"BETWEEN\"},{\"field\": \"applicationCode\",\"value\": \"M[ABC].*\",\"operator\": \"REGEX\"}", "enum" : [ "IN", "BETWEEN", "LIKE", "REGEX", "<", ">", "<=", ">=", "<>" ] } } }, "result" : { "type" : "object", "properties" : { "returnStatus" : { "$ref" : "#/components/schemas/returnStatus" }, "listStatus" : { "$ref" : "#/components/schemas/listStatus" }, "records" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/record" } }, "fileName" : { "type" : "string", "description" : "Name of database file." } }, "description" : "The response with the data." }, "record" : { "maxLength" : 65535, "type" : "string", "description" : "Placeholder objects which is a pointer (65535)" } }, "responses" : { "401" : { "description" : "Unauthorized", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/message" } } } }, "422" : { "description" : "Unprocessable Entity", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/message" } } } } }, "examples" : { "IN" : { "summary" : "How to specify the IN operator selection", "value" : " {\r\n \"field\": \"applicationCode\",\r\n \"value\": \"MISHD,SHUKV\",\r\n \"operator\": \"IN\"\r\n }" } }, "securitySchemes" : { "JWT" : { "type" : "http", "description" : "JWT validation", "scheme" : "bearer", "bearerFormat" : "JWT" } }, "callbacks" : { } } }