openapi: 3.2.0 info: title: Fenergo Nebula Reports Query Query Definition API description: '**Reports Query API**: Reports Query API provides endpoints in order to retrieve all related models and their versions. **Reports Query API provides**: Query Definitions retrieval Generated Reports retrieval Schema retrieval' version: '1.0' servers: - url: /reportsquery security: - Bearer: [] tags: - name: Query Definition paths: /api/QueryDefinition: get: tags: - Query Definition summary: Get all stored Query definitions description: 'This method returns all stored query definitions Required permissions: Following permissions are required: ReportingAccess' operationId: GetAllQueryDefinitions parameters: - name: X-TENANT-ID in: header description: The UiD of the tenant representing organization required: true schema: type: string example: b11f8be3-f29b-4959-8964-956d4af7c468 responses: '200': description: Success. The list of Query definitions is returned content: application/json: schema: $ref: '#/components/schemas/GetAllQueryDefinitionsItemDtoIEnumerableServiceResponse' '400': description: Bad request. The request has missing/invalid values content: application/json: schema: $ref: '#/components/schemas/ServiceResponse' '401': description: User is not authorized to perform this request content: application/json: example: message: Unauthorized '403': description: Access to resource is forbidden. content: application/json: schema: $ref: '#/components/schemas/ObjectServiceResponse' example: data: {} messages: - message: 'Access denied. Following permissions are required: Permission1, Permission2' type: Forbidden errorCode: Error Code '500': description: Internal server exception. Please, contact your provider. content: application/json: schema: $ref: '#/components/schemas/ObjectServiceResponse' example: data: null messages: - message: Internal server exception. Please, contact your provider. type: Error errorCode: INTERNAL_SERVER_ERROR '410': description: Endpoint marked as deprecated was terminated. This response will be present only if the endpoint was marked as deprecated and has reached the sunset date. During the deprecation period, the API will include additional 'sunset' and 'deprecation' headers. content: application/json: schema: $ref: '#/components/schemas/StringServiceResponse' example: data: null messages: - message: This endpoint is obsolete and was terminated on yyyy-MM-dd type: Error errorCode: OBSOLETE_ENDPOINT /api/QueryDefinition/{id}: get: tags: - Query Definition summary: Get Stored Query definition description: 'This method returns the stored query definition for the given Id Required permissions: Following permissions are required: ReportingAccess' operationId: GetQueryDefinitionById parameters: - name: id in: path description: '' required: true schema: type: string - name: X-TENANT-ID in: header description: The UiD of the tenant representing organization required: true schema: type: string example: b11f8be3-f29b-4959-8964-956d4af7c468 responses: '200': description: Success. The Query is returned content: application/json: schema: $ref: '#/components/schemas/GetQueryDefinitionByIdDtoServiceResponse' '400': description: Bad request. The request has missing/invalid values content: application/json: schema: $ref: '#/components/schemas/ServiceResponse' '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ObjectServiceResponse' example: data: {} messages: - message: Not Found type: Error errorCode: Error Code '500': description: Internal Server Error '401': description: User is not authorized to perform this request content: application/json: example: message: Unauthorized '403': description: Access to resource is forbidden. content: application/json: schema: $ref: '#/components/schemas/ObjectServiceResponse' example: data: {} messages: - message: 'Access denied. Following permissions are required: Permission1, Permission2' type: Forbidden errorCode: Error Code '410': description: Endpoint marked as deprecated was terminated. This response will be present only if the endpoint was marked as deprecated and has reached the sunset date. During the deprecation period, the API will include additional 'sunset' and 'deprecation' headers. content: application/json: schema: $ref: '#/components/schemas/StringServiceResponse' example: data: null messages: - message: This endpoint is obsolete and was terminated on yyyy-MM-dd type: Error errorCode: OBSOLETE_ENDPOINT components: schemas: ServiceResponse: type: object properties: data: type: - string - 'null' messages: type: - array - 'null' items: $ref: '#/components/schemas/ServiceResponseMessage' additionalProperties: false GetQueryDefinitionByIdDto: type: object properties: id: type: - string - 'null' description: Identifier of query example: 7e57cfd6-881c-4587-ada8-24a23b76464e name: type: - string - 'null' description: Name of query example: GetAllEntityDataIds description: type: - string - 'null' description: Short description example: Get all entitydata Ids sqlQuery: type: - string - 'null' description: Actual raw SQL of the query example: Select Id From entitydata parameters: type: - array - 'null' items: $ref: '#/components/schemas/QueryParameterDto' description: Parameter definitions for this query categoryId: type: - string - 'null' description: Optional tenant-scoped category this query belongs to format: uuid additionalProperties: false description: Query dto as it is returned by GetQueryByIdQuery GetAllQueryDefinitionsItemDto: type: object properties: id: type: - string - 'null' description: Identifier of query example: 7e57cfd6-881c-4587-ada8-24a23b76464e name: type: - string - 'null' description: Name of query example: GetAllEntityDataIds description: type: - string - 'null' description: Short description example: Get all entitydata Ids sqlQuery: type: - string - 'null' description: Actual raw SQL of the query example: Select Id From entitydata parameters: type: - array - 'null' items: $ref: '#/components/schemas/QueryParameterDto' description: Parameter definitions for this query categoryId: type: - string - 'null' description: Optional tenant-scoped category this query belongs to format: uuid additionalProperties: false description: Query definition item as it is returned by GetAllQueriesQuery QueryParameterDto: type: object properties: name: type: - string - 'null' displayLabel: type: - string - 'null' type: type: - string - 'null' required: type: boolean defaultValue: type: - string - 'null' options: type: - array - 'null' items: type: string additionalProperties: false description: API contract DTO for a query parameter definition GetQueryDefinitionByIdDtoServiceResponse: type: object properties: data: allOf: - $ref: '#/components/schemas/GetQueryDefinitionByIdDto' description: Query dto as it is returned by GetQueryByIdQuery messages: type: - array - 'null' items: $ref: '#/components/schemas/ServiceResponseMessage' additionalProperties: false GetAllQueryDefinitionsItemDtoIEnumerableServiceResponse: type: object properties: data: type: - array - 'null' items: $ref: '#/components/schemas/GetAllQueryDefinitionsItemDto' messages: type: - array - 'null' items: $ref: '#/components/schemas/ServiceResponseMessage' additionalProperties: false ServiceResponseMessage: type: object properties: message: type: - string - 'null' type: type: - string - 'null' errorCode: type: - string - 'null' additionalProperties: false ObjectServiceResponse: type: object properties: data: {} messages: type: - array - 'null' items: $ref: '#/components/schemas/ServiceResponseMessage' additionalProperties: false StringServiceResponse: type: object properties: data: type: - string - 'null' messages: type: - array - 'null' items: $ref: '#/components/schemas/ServiceResponseMessage' additionalProperties: false securitySchemes: Bearer: type: apiKey description: Please insert JWT with Bearer into field name: Authorization in: header