openapi: 3.2.0 info: title: Fenergo Nebula Narrative Command Business Narrative API description: Narrative Command API is part of FenX eco-system to manage Entity Narratives Data. All the operations require valid access token obtained from Identity service. version: '1.0' servers: - url: /narrativecommand security: - Bearer: [] tags: - name: BusinessNarrative paths: /api/business: post: tags: - BusinessNarrative summary: Create Business Narrative description: 'This method will create Business Narrative model Required permissions: Following permissions are required: NarrativesBusinessCreate' operationId: CreateBusinessNarrative 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: Request with the details to create content: application/json: schema: allOf: - $ref: '#/components/schemas/CreateNarrativeRequestDtoServiceRequest' responses: '200': description: An instance of the Fenergo.Nebula.Narrative.Common.Application.Dto.NarrativeDto class representing the created metadata. content: application/json: schema: $ref: '#/components/schemas/NarrativeDtoServiceResponse' '400': description: Bad request. The request has missing/invalid values content: application/json: schema: $ref: '#/components/schemas/ValidationErrorModelListServiceResponse' '500': description: An exception occurred while processing the command '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 /api/business/{narrativeId}: put: tags: - BusinessNarrative summary: Update Business Narrative description: 'This method will update Business Narrative model Required permissions: Following permissions are required: NarrativesBusinessEdit' operationId: UpdateBusinessNarrative parameters: - name: narrativeId in: path description: The ID of Narrative 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: Request with the Narrative details to update content: application/json: schema: allOf: - $ref: '#/components/schemas/UpdateNarrativeRequestDtoServiceRequest' responses: '202': description: '>Narrative updated successfully.' '400': description: Bad request. The request has missing/invalid values content: application/json: schema: $ref: '#/components/schemas/ValidationErrorModelListServiceResponse' '500': description: An exception occurred while processing the command '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 delete: tags: - BusinessNarrative summary: Delete Business Narrative description: 'This method will delete Business Narrative model Required permissions: Following permissions are required: NarrativesBusinessDelete' operationId: DeleteBusinessNarrative parameters: - name: narrativeId in: path description: The ID of Narrative 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: '202': description: Narrative deleted successfully '400': description: Bad request. The request has missing/invalid values content: application/json: schema: $ref: '#/components/schemas/ServiceResponse' '500': description: An exception occurred while processing the command '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 CreateNarrativeRequestDto: type: object properties: entityId: type: string format: uuid text: type: - string - 'null' fileKey: type: - string - 'null' additionalProperties: false UpdateNarrativeRequestDtoServiceRequest: type: object properties: data: allOf: - $ref: '#/components/schemas/UpdateNarrativeRequestDto' additionalProperties: false ValidationErrorModel: type: object properties: propertyName: type: - string - 'null' errorMessage: type: - string - 'null' attemptedValue: {} errorCode: type: - string - 'null' additionalProperties: false CreateNarrativeRequestDtoServiceRequest: type: object properties: data: allOf: - $ref: '#/components/schemas/CreateNarrativeRequestDto' additionalProperties: false NarrativeDto: type: object properties: id: type: string format: uuid entityId: type: string format: uuid type: allOf: - $ref: '#/components/schemas/NarrativeType' text: type: - string - 'null' fileKey: type: - string - 'null' lastUpdatedBy: type: - string - 'null' lastUpdatedDate: type: string format: date-time additionalProperties: false ServiceResponseMessage: type: object properties: message: type: - string - 'null' type: type: - string - 'null' errorCode: type: - string - 'null' additionalProperties: false NarrativeType: enum: - Business - Compliance type: string ObjectServiceResponse: type: object properties: data: {} messages: type: - array - 'null' items: $ref: '#/components/schemas/ServiceResponseMessage' additionalProperties: false NarrativeDtoServiceResponse: type: object properties: data: allOf: - $ref: '#/components/schemas/NarrativeDto' messages: type: - array - 'null' items: $ref: '#/components/schemas/ServiceResponseMessage' additionalProperties: false UpdateNarrativeRequestDto: type: object properties: text: type: - string - 'null' fileKey: type: - string - 'null' 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