swagger: '2.0' info: version: "6.8" title: CUBA Platform REST API description: | ## General Overview CUBA Platform REST API provides the following functionality: * Entities CRUD operations * Execution of predefined JPQL queries * Execution of services methods * Getting metadata (entities, views, enumerations, datatypes) * Getting localized messages * Getting current user permissions (access to entities, attributes, specific permissions) * Getting current user information (name, language, time zone, etc.) * Working with files The REST API is available at the URL `/rest/v2` both in the web and the portal modules, e.g. `http://localhost:8080/app/rest/v2/entities/sales$Order` ## Authentication ### Authentication using the OAuth2 protocol CUBA Platform REST API uses an OAuth2 resource owner password credentials grant to protect the endpoints (https://tools.ietf.org/html/rfc6749#page-37). Before accessing a protected resource, a user must get an authentication token. The token can be obtained at the `/oauth/token` URL. The `/oauth/token` endpoint is protected with the basic authentication. The request must contain an `Authorization` header for basic authentication with REST API client credentials. Please note that client credentials are not the same as platform user credentials. By client we mean an application that uses the REST API. The default client credentials are defined by the following application properties: `cuba.rest.client.id` and `cuba.rest.client.secret`. User credentials must be passed in the request body. The request format must be `application/x-www-form-urlencoded`. See the `/oauth/token` endpoint documentation for more details. When the token is obtained it must be placed to the `Authorization` header with the `Bearer` type to all further requests, e.g.: ``` GET /rest/v2/entities/sales$Order Host: example.com Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA ``` Access token can also placed to the request URL using the `access_token` parameter. This may be useful when you, for example, need to build a link for downloading a file, like this: `http://localhost:8080/app/rest/v2/files/cedd218e-aaed-bafa-fc78-7c6ea5e32a61?access_token=acefdad0-d728-4279-aae3-6b42620f7ef9`. ### Anonymous access If the request to protected resource doesn't contain the `Authentication` header then the user will be authenticated with the anonymous session. By default, anonymous access is forbidden. To enable it, set the `cuba.rest.anonymousEnabled` application property to `true`. Read more about the anonymous sessions in the CUBA Platform Developer's Manual. license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html ################################################################################ # Host, Base Path, Schemes and Content Types # ################################################################################ basePath: /app/rest/v2 produces: - application/json consumes: - application/json ################################################################################ # Parameters # ################################################################################ parameters: entityNameParam: name: entityName in: path type: string description: Entity name required: true default: "" entityIdParam: name: entityId in: path type: string description: Entity identifier required: true default: "" queryNameParam: name: queryName in: path type: string description: Query name required: true default: "" serviceNameParam: name: serviceName in: path type: string description: Service name required: true default: "" methodNameParam: name: methodName in: path type: string description: Method name required: true default: "" entityJsonParam: name: entityJson description: JSON object with the entity in: body schema: "$ref": "#/definitions/entity" entityViewParam: name: view in: query description: Name of the view which is used for loading the entity type: string default: "" returnNullsParam: name: returnNulls in: query description: Specifies whether null fields will be written to the result JSON type: boolean returnCountParam: name: returnCount in: query description: Specifies whether the total count of entities should be returned in the 'X-Total-Count' header type: boolean dynamicAttributesParam: name: dynamicAttributes in: query description: Specifies whether entity dynamic attributes should be returned type: boolean ################################################################################ # Definitions # ################################################################################ definitions: oauthError: type: object properties: error: type: string description: Error message error_description: type: string description: Detailed error description error: type: object properties: error: type: string description: Error message details: type: string description: Detailed error description token: type: object properties: access_token: type: string example: ead2bcb0-6fed-42ec-8a8f-c3196d038d8b token_type: type: string example: password refresh_token: type: string example: fd00550e-5bb0-41b6-89d6-57bbfb6732a1 expires_in: type: string example: 3600 scope: type: string example: rest-api entity: type: object properties: id: type: string example: 4d8ef1d4-90b6-c075-8bfd-79181ff889ef otherEntityFields: type: string example: There must be a set of entity fields instead of this one here entityFull: type: object properties: id: type: string example: 4d8ef1d4-90b6-c075-8bfd-79181ff889ef _entityName: type: string description: Entity name example: sec$User _instanceName: type: string description: Entity instance name. This value must be used for displaying the entity in list. example: Smith [smith] otherEntityFields: type: string description: There must be a set of entity fields instead of this one here. example: There must be a set of entity fields instead of this one here required: [id, _entityName] predefinedQuery: type: object properties: name: type: string description: Query name example: usersByLastName jpql: type: string description: JPQL query example: select u from sec$User u where u.lastName = :lastName entityName: type: string description: Entity name example: sec$User viewName: type: string description: View name example: user.edit params: type: object description: Collection of query parameters properties: name: type: string description: Parameter name example: lastName type: type: string description: Parameter type. The fully qualified java class name or primitive type name is returned here. example: java.lang.String serviceInfo: type: object properties: name: type: string example: app_MyService methods: type: array items: type: object properties: name: type: string description: Method argument name. example: doSomething type: type: string description: Method argument type. A fully qualified java class name is returned here. example: java.lang.String permission: type: object properties: type: type: string enum: [SCREEN, ENTITY_OP, ENTITY_ATTR, SPECIFIC, UI] example: ENTITY_OP target: type: string example: app$Order:create value: type: string enum: [ALLOW, DENY, VIEW, MODIFY, HIDE, READ_ONLY, SHOW] example: ALLOW intValue: type: integer example: 1 entityMetadata: type: object properties: entityName: type: string example: ref$Driver properties: type: array items: type: object properties: name: type: string example: name attributeType: type: string enum: - DATATYPE - ENUM - ASSOCIATION - COMPOSITION type: type: string example: string description: | For a simple datatype there will be a datatype name here (string, int, decimal, boolean, date, dateTime, etc.) You can find all simple datatype names in the source code of the Datatypes class in the systemDatatypeNames property. If the property is the link to the entity then an entity name will be placed to this field, e.g. ref$Colour cardinality: type: string enum: - NONE - ONE_TO_ONE - MANY_TO_ONE - ONE_TO_MANY - MANY_TO_MANY mandatory: type: boolean readOnly: type: boolean persistent: type: boolean enumMetadata: type: object properties: name: type: string example: com.company.app.core.entity.DriverStatus values: type: array items: type: object properties: name: type: string example: ACTIVE id: type: string example: 10 description: enum id - the value that is stored in the database caption: type: string description: localized enum value example: Active datatype: type: object properties: name: type: string example: decimal otherFields: type: string example: all other fields that are defined in the `datatypes.xml` file, e.g. format, decimalSeparator, etc. description: All other fields that are defined in the `datatypes.xml` file, e.g. format, decimalSeparator, etc. userInfo: type: object properties: id: type: string login: type: string name: type: string firstName: type: string middleName: type: string lastName: type: string position: type: string email: type: string timeZone: type: string example: Europe/London language: type: string example: en locale: type: string example: en_US _instanceName: type: string fileInfo: type: object properties: id: type: string example: c994111a-cdfa-9695-95fc-bbbb63a504a7 name: type: string example: sample-file.docx size: type: long example: 105396 viewInfo: type: object properties: name: type: string example: user.edit entity: type: string example: sec$User properties: type: array items: type: string example: [firstName, lastName, login] description: | The array of properties may be of mixed type. If some of the properties is a reference to another entity then a nested view object will be returned instead of the string with the proeprty name. ################################################################################ # Responses # ################################################################################ responses: metaClassNotFoundResponse: description: Not found. MetaClass for the entity with the given name not found schema: $ref: '#/definitions/error' ################################################################################ # Tags # ################################################################################ tags: - name: OAuth description: Working with authentication tokens - name: Entities description: CRUD entities operations - name: Queries description: Predefined queries execution - name: Services description: Middleware services execution - name: Files description: Working with files - name: Permissions description: Current user permissions - name: Metadata description: Entities metadata - name: Messages description: Localized messages - name: UserInfo description: User information - name: Documentation description: Swagger documentation ################################################################################ # Security # ################################################################################ securityDefinitions: oauth2: type: oauth2 flow: password tokenUrl: http://localhost:8080/app/rest/v2/oauth/token scopes: rest-api: use REST API tokenEndpointBasic: type: basic security: - oauth2: - rest-api ################################################################################ # Paths # ################################################################################ paths: ############################### token ########################################## /oauth/token: post: tags: - OAuth summary: Get an authentication token description: | Gets an authentication token. The endpoint is protected with the basic authentication. The request must contain an `Authorization` header for basic authentication with REST API client credentials. Please note, that client credentials is not the same as platform user credentials. By client we mean an application that uses the REST API. The default client credentials are defined by the following application properties: `cuba.rest.client.id` and `cuba.rest.client.secret`. User credentials must be passed in the request body. The request format must be `application/x-www-form-urlencoded`. To disable refresh tokens for the default client, remove the refresh_token type from the `cuba.rest.client.authorizedGrantTypes` application property value. consumes: - application/x-www-form-urlencoded parameters: - name: grant_type in: formData type: string description: OAuth grant type. Should be set to "password" default: password - name: username in: formData type: string description: CUBA Platform user login default: admin - name: password in: formData type: string description: CUBA Platform user password default: admin responses: 200: description: Successfully authenticated. schema: $ref: '#/definitions/token' 401: description: Unauthorized schema: $ref: '#/definitions/oauthError' security: - tokenEndpointBasic: [] /oauth/revoke: post: tags: - OAuth summary: Revoke an authentication token description: | Revokes an authentication token. The endpoint is protected with the basic authentication. The request must contain an `Authorization` header for basic authentication with REST API client credentials. See the `/oauth/token` endpoint documentation for more details. When the refresh token is revoked, the correspondig access token is also revoked. When the access token is revoked, the correspondding refresh token is also revoked. consumes: - application/x-www-form-urlencoded parameters: - name: token in: formData type: string description: The token that the client wants to get revoked. - name: token_type_hint in: formData type: string description: | A hint about the type of the token submitted for revocation. May be access_token or refresh_token. The parameter is optional. responses: 200: description: Success security: - tokenEndpointBasic: [] ############################### Entities ################################### /entities/{entityName}: parameters: - $ref: '#/parameters/entityNameParam' get: tags: - Entities summary: Get a list of entities description: | Gets a list of entities parameters: - $ref: '#/parameters/entityViewParam' - name: limit in: query description: Number of extracted entities type: string default: "" - name: offset in: query description: Position of the first result to retrieve type: string default: "" - name: sort in: query description: | Name of the field to be sorted by. If the name is preceeding by the '+' character, then the sort order is ascending, if by the '-' character then descending. If there is no special character before the property name, then ascending sort will be used. type: string default: "" - $ref: '#/parameters/returnNullsParam' - $ref: '#/parameters/returnCountParam' - $ref: '#/parameters/dynamicAttributesParam' responses: 200: description: Success. The list of entities is returned in the response body. schema: type: array items: "$ref": "#/definitions/entityFull" 403: description: Forbidden. The user doesn't have permissions to read the entity schema: $ref: '#/definitions/error' 404: $ref: '#/responses/metaClassNotFoundResponse' post: tags: - Entities summary: Create new entity description: | Creates new entity. The method expects a JSON with entity object in the request body. The entity object may contain references to other entities. These references are processed according to the following rules: * If the entity property is annotated with @Composition in the entity java class, then it will be saved with the main entity * Otherwise a referenced entity with the given id will be searched. If it is found then the saved entity will have a reference to it. Otherwise, a response with code 400 will be returned. parameters: - name: entityJson description: | A JSON object with the entity in: body schema: "$ref": "#/definitions/entity" responses: 201: description: Entity created. The created entity is returned in the response body. schema: $ref: '#/definitions/entityFull' headers: location: type: string description: A URL the created object can be accessed with 400: description: Bad request. For example, the entity may have a reference to the non-existing entity. schema: $ref: '#/definitions/error' 403: description: Forbidden. The user doesn't have permissions to create the entity schema: $ref: '#/definitions/error' 404: $ref: '#/responses/metaClassNotFoundResponse' /entities/{entityName}/{entityId}: parameters: - $ref: '#/parameters/entityNameParam' - $ref: '#/parameters/entityIdParam' get: tags: - Entities summary: Get a single entity by id description: | Gets a single entity by identifier parameters: - $ref: '#/parameters/entityViewParam' - $ref: '#/parameters/returnNullsParam' - $ref: '#/parameters/dynamicAttributesParam' responses: 200: description: Success. The entity is returned in the response body. schema: $ref: '#/definitions/entityFull' 403: description: Forbidden. The user doesn't have permissions to read the entity schema: $ref: '#/definitions/error' 404: description: | MetaClass not found or entity with the five identifier not found. schema: $ref: '#/definitions/error' put: tags: - Entities summary: Update the entity description: | Updates the entity. Only fields that are passed in the JSON object (the request body) are updated. parameters: - $ref: '#/parameters/entityJsonParam' responses: 200: description: Success. The updated entity is returned in the response body. schema: $ref: '#/definitions/entityFull' 403: description: Forbidden. The user doesn't have permissions to update the entity schema: $ref: '#/definitions/error' 404: description: | MetaClass not found or entity with the given identifier not found. schema: $ref: '#/definitions/error' delete: tags: - Entities summary: Delete the entity description: Deletes the entity responses: 200: description: Success. Entity was deleted. 403: description: Forbidden. The user doesn't have permissions to delete the entity schema: $ref: '#/definitions/error' 404: description: | MetaClass not found or entity with the given identifier not found. schema: $ref: '#/definitions/error' /entities/{entityName}/search: get: tags: - Entities summary: Find entities by filter conditions description: | Finds entities by filter conditions. The filter is defined by JSON object that is passed as in URL parameter. Filter JSON example: ```json { "conditions": [ { "group": "OR", "conditions": [ { "property": "stringField", "operator": "startsWith", "value": "ABC" }, { "property": "relatedEntity.intField", "operator": ">", "value": 100 } ] }, { "property": "booleanField", "operator": "=", "value": true } ] } ``` Filter supports OR and AND grouping. All conditions in the root "conditions" field are automatically added to the AND group. Conditions for properties that are references to other entities must have values with string representation of entitiy primary key. If the operator is "in" or "notIn" then the value should be a JSON array. ``` { "conditions": [ { "property": "linkedEntityField", "operator": "=", "value": "2de6a78f-7bef-89a7-eb5e-b725582f23af" }, { "property": "intField", "operator": "in", "value": [100, 200, 300] } ] } ``` Supported operators: * = * <> * < * <= * > * >= * startsWith * endsWith * contains * notEmpty * in * notIn parameters: - $ref: '#/parameters/entityNameParam' - name: entityName description: | A JSON object with filter conditions in: path - name: filter in: query description: JSON with filter definition type: string - $ref: '#/parameters/entityViewParam' - name: limit in: query description: Number of extracted entities type: string default: "" - name: offset in: query description: Position of the first result to retrieve type: string default: "" - name: sort in: query description: | Name of the field to be sorted by. If the name is preceeding by the '+' character, then the sort order is ascending, if by the '-' character then descending. If there is no special character before the property name, then ascending sort will be used. type: string default: "" - $ref: '#/parameters/returnNullsParam' - $ref: '#/parameters/returnCountParam' - $ref: '#/parameters/dynamicAttributesParam' responses: 200: description: Success. Entities that conforms filter conditions are returned in the response body. schema: type: array items: "$ref": "#/definitions/entityFull" 400: description: Bad request. For example, the condition value cannot be parsed. schema: $ref: '#/definitions/error' 403: description: Forbidden. The user doesn't have permissions to read the entity schema: $ref: '#/definitions/error' 404: $ref: '#/responses/metaClassNotFoundResponse' post: tags: - Entities summary: Find entities by filter conditions description: | Finds entities by filter conditions. Works like the corresponding GET method, but filter definition and all request parameters are passed in the request body as JSON object. All possible parameters ("view", "sort", "returnNulls", etc.) are the same as in the GET version of the `/search` operation. Request body example: ```json { "filter": { "conditions": [ { "group": "OR", "conditions": [ { "property": "stringField", "operator": "startsWith", "value": "ABC" }, { "property": "relatedEntity.intField", "operator": ">", "value": 100 } ] }, { "property": "booleanField", "operator": "=", "value": true } ] }, "view": "someViewName", "returnCount": true } ``` responses: 200: description: Success. Entities that conforms filter conditions are returned in the response body. schema: type: array items: "$ref": "#/definitions/entityFull" 400: description: Bad request. For example, the condition value cannot be parsed. schema: $ref: '#/definitions/error' 403: description: Forbidden. The user doesn't have permissions to read the entity schema: $ref: '#/definitions/error' 404: $ref: '#/responses/metaClassNotFoundResponse' ############################### Queries ######################################## /queries/{entityName}: parameters: - $ref: '#/parameters/entityNameParam' get: tags: - Queries summary: Get a list of queries description: | Gets a list of predefined queries for the entity responses: 200: description: Success schema: type: array items: $ref: '#/definitions/predefinedQuery' 403: description: Forbidden. The user doesn't have permissions to read the entity. schema: $ref: '#/definitions/error' 404: description: | MetaClass not found. /queries/{entityName}/{queryName}: parameters: - $ref: '#/parameters/entityNameParam' - $ref: '#/parameters/queryNameParam' - name: limit in: query description: Number of extracted entities type: string default: "" - name: offset in: query description: Position of the first result to retrieve type: string default: "" - name: view in: query description: | Name of the view which is used for loading the entity. Specify this parameter if you want to extract entities with the view other than it is defined in the REST queries configuration file. type: string - $ref: '#/parameters/returnNullsParam' - $ref: '#/parameters/returnCountParam' - $ref: '#/parameters/dynamicAttributesParam' get: tags: - Queries summary: Execute a query description: | Executes a predefined query. Query parameters values must be defined in the request parameters with the same name. responses: 200: description: Success. A list of entities is returned in the response body. schema: type: array items: $ref: '#/definitions/entityFull' 403: description: Forbidden. The user doesn't have permissions to read the entity. schema: $ref: '#/definitions/error' 404: description: | MetaClass not found or query with the given name not found schema: $ref: '#/definitions/error' post: tags: - Queries summary: Execute a query description: | Executes a predefined query. Query parameters must be passed in the request body as JSON map. responses: 200: description: Success. A list of entitie is returned in the response body. schema: type: array items: $ref: '#/definitions/entityFull' 403: description: Forbidden. The user doesn't have permissions to read the entity. schema: $ref: '#/definitions/error' 404: description: | MetaClass not found or query with the given name not found schema: $ref: '#/definitions/error' /queries/{entityName}/{queryName}/count: parameters: - $ref: '#/parameters/entityNameParam' - $ref: '#/parameters/queryNameParam' get: tags: - Queries summary: Return a number of entities in query result description: | Returns a number of entities that matches the query. You can use the `all` keyword for the `queryNameParam` to get the number of all available entities. responses: 200: description: Success schema: title: Count type: integer 403: description: Forbidden. The user doesn't have permissions to read the entity. schema: $ref: '#/definitions/error' 404: description: | MetaClass not found or query with the given name not found schema: $ref: '#/definitions/error' post: tags: - Queries summary: Return a number of entities in query result description: | Returns a number of entities that matches the query. You can use the `all` keyword for the `queryNameParam` to get the number of all available entities. responses: 200: description: Success schema: title: Count type: integer 403: description: Forbidden. The user doesn't have permissions to read the entity. schema: $ref: '#/definitions/error' 404: description: | MetaClass not found or query with the given name not found schema: $ref: '#/definitions/error' ############################### Services ####################################### /services/{serviceName}: parameters: - $ref: '#/parameters/serviceNameParam' get: tags: - Services summary: Get a list of available service methods description: | Returns a list of available service methods responses: 200: description: Success schema: type: array items: $ref: '#/definitions/serviceInfo' 403: description: Forbidden. The user doesn't have permissions to invoke the service method. schema: $ref: '#/definitions/error' /services/{serviceName}/{methodName}: parameters: - $ref: '#/parameters/serviceNameParam' - $ref: '#/parameters/methodNameParam' get: tags: - Services summary: Execute service method description: | Executes the service method. This request expects query parameters with the names defined in services configuration on the middleware. responses: 200: description: | Returns the result of the method execution. It can be of simple datatype as well as JSON that represents an entity or entities collection. schema: type: string 204: description: | No content. This status is returned when the service method was executed successfully but returns null or is of void type. 403: description: Forbidden. The user doesn't have permissions to invoke the service method. schema: $ref: '#/definitions/error' post: tags: - Services summary: Execute service method description: | Executes a method of the service parameters: - name: paramsObject in: body schema: type: string required: true description: | JSON object that contains fields with parameter values. Parameter names are defined in services configuration on the middleware. An entity, entities collection or POJO can be passed as a parameter. If the parameter is entities collection then each entity in the passed JSON array must include the '_entityName' field with the meta class name as a value. responses: 200: description: | Returns the result of the method execution. It can be of simple datatype as well as JSON that represents an entity, entities collection or POJO. 204: description: | No content. This status is returned when the service method was executed successfully but returns null or is of void type. 403: description: Forbidden. The user doesn't have permissions to invoke the service method. schema: $ref: '#/definitions/error' ############################### Files ########################################## /files: post: tags: - Files summary: Upload a file description: | Uploads a file. The method behavior may be different depending of the 'Content-Type' header value. If the header value is 'multipart/form-data' then file contents must be put to the part called 'file'. If the 'Content-Type' header has some other value then file contents must be passed in the request body. The 'Content-Length' header will be used for FileDescriptor 'size' field value. parameters: - name: name in: query type: string required: false description: | The file name. If this parameter is missing then a FileDescriptor id will be used as a file name. In case of `multipart\form-data` request a file name may be taken from the `filename` attribute of the `Content-Disposition` header. default: "" responses: 201: description: | File uploaded. FileDescriptor information is returned in the response body. schema: $ref: '#/definitions/fileInfo' headers: location: type: string description: A URL the uploaded file can be downloaded with /files/{id}: get: tags: - Files summary: Download the file description: Downloads the file parameters: - name: id in: path type: string description: | FileDescriptor identifier default: "" - name: attachment in: query type: boolean required: false description: | If set to 'true' then the 'Content-Disposition' header of the response will be set to 'attachment'. 'inline' value will be used otherwise. default: "" responses: 200: description: Successfully downloaded. The file contents is returned in the response body. 404: description: File with the given ID not found ############################### Metadata ####################################### /metadata/entities: get: tags: - Metadata summary: Get all entities metadata description: Gets all entities metadata responses: 200: description: Success schema: type: array items: $ref: '#/definitions/entityMetadata' /metadata/entities/{entityName}: get: tags: - Metadata summary: Get entity metadata description: Gets entity metadata parameters: - $ref: '#/parameters/entityNameParam' responses: 200: description: Success schema: $ref: '#/definitions/entityMetadata' 404: description: | MetaClass not found or query with the given name not found schema: $ref: '#/definitions/error' /metadata/entities/{entityName}/views: get: tags: - Metadata summary: Get all views for the entity description: Gets all views for the entity parameters: - $ref: '#/parameters/entityNameParam' responses: 200: description: Success schema: type: array items: $ref: '#/definitions/viewInfo' 404: description: | MetaClass not found schema: $ref: '#/definitions/error' /metadata/entities/{entityName}/views/{viewName}: get: tags: - Metadata summary: Get the view description: Gets the view parameters: - $ref: '#/parameters/entityNameParam' - name: viewName in: path type: string required: true description: View name default: "" responses: 200: description: Success schema: $ref: '#/definitions/viewInfo' 404: description: | MetaClass not found or view with the given name not found schema: $ref: '#/definitions/error' /metadata/enums: get: tags: - Metadata summary: Get all enums metadata description: Gets all enums metadata responses: 200: description: Success schema: type: array items: $ref: '#/definitions/enumMetadata' /metadata/enums/{enumName}: get: tags: - Metadata summary: Get enum metadata description: Gets enum metadata parameters: - name: enumName in: path type: string required: true description: Enum name default: "" responses: 200: description: Success schema: $ref: '#/definitions/enumMetadata' 404: description: | Enum not found schema: $ref: '#/definitions/error' /metadata/datatypes: get: tags: - Metadata summary: Get datatypes information description: Gets datatypes information responses: 200: description: Success schema: type: array items: $ref: '#/definitions/datatype' ############################### Messages ####################################### /messages/entities: get: tags: - Messages summary: Get localized messages for all entities and their attributes description: | Method gets localized messages for all entities and their attributes. It returns a JSON object that represents a map of localized messages. The key is entity or entity property name, the value is localized message. responses: 200: description: Success schema: type: object /messages/entities/{entityName}: get: tags: - Messages summary: Get localized messages for entity and its attributes description: | Method gets localized messages for entity and its attributes. It returns a JSON object that represents a map of localized messages. The key is entity or entity property name, the value is localized message. parameters: - $ref: '#/parameters/entityNameParam' responses: 200: description: Success schema: type: object 404: description: | MetaClass not found schema: $ref: '#/definitions/error' /messages/enums: get: tags: - Messages summary: Get localized messages for all enums and their valus description: | Method gets localized messages for all enums and their valus. It returns a JSON object that represents a map of localized messages. The key is enum or its value, the value is localized message. responses: 200: description: Success schema: type: object /messages/enums/{enumName}: get: tags: - Messages summary: Get localized messages for enum and its values description: | Method gets localized messages for enum and its values. It returns a JSON object that represents a map of localized messages. The key is enum or its value, the value is localized message. parameters: - name: enumName in: path type: string required: true description: Full enum class name (including package) default: "" responses: 200: description: Success schema: type: object 404: description: | MetaClass not found schema: $ref: '#/definitions/error' ############################### Permissions #################################### /permissions: get: tags: - Permissions summary: Get a list of current user security permissions description: | Gets a list of current user security permissions responses: 200: description: Success schema: type: array items: $ref: '#/definitions/permission' ############################### User info ##################################### /userInfo: get: tags: - UserInfo summary: Get the current user information description: Gets the current user information responses: 200: description: Success schema: $ref: '#/definitions/userInfo' ############################### Documentation ################################# /docs/swagger.{format}: get: tags: - Documentation summary: Get the REST API swagger documentation description: Gets the swagger documentation in the JSON or YAML formats parameters: - name: format in: path type: string description: swagger format (json or yaml) default: yaml responses: 200: description: Success