openapi: 3.2.0 info: title: Fenergo Nebula SmartDocs Rag API description: SmartDocs API is part of FenX eco-system to manage Intelligent Document Processing All the operations require valid access token obtained from Identity service. version: '1.0' servers: - url: /smartdocs security: - Bearer: [] tags: - name: Rag paths: /api/rag/{resourceId}: get: tags: - Rag summary: Retrieves a RAG resource by its unique identifier description: 'Required permissions: At least one of the following permissions is required: IdpRagAccess' parameters: - name: resourceId in: path description: The unique identifier of the RAG resource. required: true schema: type: string format: uuid - 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: OK content: application/json: schema: $ref: '#/components/schemas/GetRagDtoServiceResponse' '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ObjectServiceResponse' example: data: {} messages: - message: Not Found type: Error errorCode: Error Code '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ValidationErrorModelListServiceResponse' '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 operationId: getApiRagByResourceId x-operation-id-source: derived put: tags: - Rag summary: Updates an existing RAG resource description: 'Required permissions: At least one of the following permissions is required: IdpRagEdit' parameters: - name: resourceId in: path description: The unique identifier of the RAG resource to update. required: true schema: type: string format: uuid - 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 requestBody: description: The updated RAG resource. content: application/json: schema: allOf: - $ref: '#/components/schemas/UpdateRagDto' responses: '200': description: OK '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ValidationErrorModelListServiceResponse' '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 operationId: putApiRagByResourceId x-operation-id-source: derived delete: tags: - Rag summary: Deletes a RAG resource by its unique identifier description: 'Required permissions: At least one of the following permissions is required: IdpRagDelete' parameters: - name: resourceId in: path description: The unique identifier of the RAG resource to delete. required: true schema: type: string format: uuid - 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: OK '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ValidationErrorModelListServiceResponse' '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 operationId: deleteApiRagByResourceId x-operation-id-source: derived /api/rag: get: tags: - Rag summary: Retrieves a paginated list of RAG resources description: 'Required permissions: At least one of the following permissions is required: IdpRagAccess' operationId: GetPageRagResources parameters: - name: PageSize in: query schema: maximum: 100 minimum: 1 type: integer format: int32 - name: PaginationToken in: query schema: type: - string - 'null' - 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: OK content: application/json: schema: $ref: '#/components/schemas/GetPageRagDtoServiceResponse' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ValidationErrorModelListServiceResponse' '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 post: tags: - Rag summary: Creates a new RAG resource description: 'Required permissions: At least one of the following permissions is required: IdpRagEdit' 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 requestBody: description: The RAG resource to create. content: application/json: schema: allOf: - $ref: '#/components/schemas/CreateRagDto' responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/CreateRagResponseDtoServiceResponse' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ValidationErrorModelListServiceResponse' '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 operationId: postApiRag x-operation-id-source: derived components: schemas: CreateRagResponseDto: type: object properties: id: type: string format: uuid additionalProperties: false GetRagDto: allOf: - $ref: '#/components/schemas/RagDto' - type: object additionalProperties: false RagDto: allOf: - $ref: '#/components/schemas/BaseRagDto' - required: - id type: object properties: id: minLength: 1 type: string format: uuid version: type: - integer - 'null' format: int32 additionalProperties: false ValidationErrorModel: type: object properties: propertyName: type: - string - 'null' errorMessage: type: - string - 'null' attemptedValue: {} errorCode: type: - string - 'null' additionalProperties: false GetPageRagDto: type: object properties: items: type: - array - 'null' items: $ref: '#/components/schemas/GetRagDto' paginationToken: type: - string - 'null' additionalProperties: false CreateRagDto: allOf: - $ref: '#/components/schemas/BaseRagDto' - type: object properties: id: type: - string - 'null' format: uuid 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 CreateRagResponseDtoServiceResponse: type: object properties: data: allOf: - $ref: '#/components/schemas/CreateRagResponseDto' messages: type: - array - 'null' items: $ref: '#/components/schemas/ServiceResponseMessage' additionalProperties: false GetRagDtoServiceResponse: type: object properties: data: allOf: - $ref: '#/components/schemas/GetRagDto' messages: type: - array - 'null' items: $ref: '#/components/schemas/ServiceResponseMessage' additionalProperties: false UpdateRagDto: allOf: - $ref: '#/components/schemas/RagDto' - type: object additionalProperties: false GetPageRagDtoServiceResponse: type: object properties: data: allOf: - $ref: '#/components/schemas/GetPageRagDto' messages: type: - array - 'null' items: $ref: '#/components/schemas/ServiceResponseMessage' additionalProperties: false BaseRagDto: required: - data - name type: object properties: name: maxLength: 150 minLength: 1 type: string description: maxLength: 200 type: - string - 'null' processingType: type: - string - 'null' operationType: type: - string - 'null' resourceType: type: - string - 'null' resourceName: type: - string - 'null' resourceNames: type: - array - 'null' items: type: string data: minLength: 1 type: string additionalProperties: false ValidationErrorModelListServiceResponse: type: object properties: data: type: - array - 'null' items: $ref: '#/components/schemas/ValidationErrorModel' messages: type: - array - 'null' items: $ref: '#/components/schemas/ServiceResponseMessage' additionalProperties: false example: data: - propertyName: data errorMessage: Data is required attemptedValue: '' errorCode: NotNullValidator messages: - message: Data is required type: Error errorCode: Error Code 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