{ "openapi": "3.0.4", "info": { "title": "Fenergo Nebula Narrative Command", "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" } ], "paths": { "/api/business": { "post": { "tags": [ "BusinessNarrative" ], "summary": "Create Business Narrative", "description": "\nThis 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": "\nThis 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": "\nThis 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" } ] } } } } } } }, "/api/compliance": { "post": { "tags": [ "ComplianceNarrative" ], "summary": "Create Compliance Narrative", "description": "\nThis method will create Compliance Narrative model

Required permissions:
Following permissions are required: NarrativesComplianceCreate", "operationId": "CreateComplianceNarrative", "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/compliance/{narrativeId}": { "put": { "tags": [ "ComplianceNarrative" ], "summary": "Update Compliance Narrative", "description": "\nThis method will update Compliance Narrative model

Required permissions:
Following permissions are required: NarrativesComplianceEdit", "operationId": "UpdateComplianceNarrative", "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": [ "ComplianceNarrative" ], "summary": "Delete Compliance Narrative", "description": "\nThis method will delete Compliance Narrative model

Required permissions:
Following permissions are required: NarrativesComplianceDelete", "operationId": "DeleteComplianceNarrative", "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" } ] } } } } } } }, "/api/richtexteditor/{narrativeType}/{entityId}/create-url-to-upload-file": { "post": { "tags": [ "RichTextEditor" ], "summary": "Create url to upload file.\nThis endpoint is intended for use with the Narrative RichTextEditor.", "description": "

Required permissions:
At least one of the following permissions is required: NarrativesComplianceCreate, NarrativesComplianceEdit, NarrativesBusinessCreate, NarrativesBusinessEdit", "operationId": "CreateUrlToUploadFile", "parameters": [ { "name": "entityId", "in": "path", "description": "Entity id.", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "narrativeType", "in": "path", "description": "Narrative Type.", "required": true, "schema": { "allOf": [ { "$ref": "#/components/schemas/NarrativeType" } ] } }, { "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": "Parameters to create url to upload", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CreateUrlToUploadFileRequestDtoServiceRequest" } ] } } } }, "responses": { "202": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUrlToUploadFileResponseDtoServiceResponse" } } } }, "400": { "description": "Bad request. The request has missing/invalid values", "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" } ] } } } } } } } }, "components": { "schemas": { "CreateNarrativeRequestDto": { "type": "object", "properties": { "entityId": { "type": "string", "format": "uuid" }, "text": { "type": "string", "nullable": true }, "fileKey": { "type": "string", "nullable": true } }, "additionalProperties": false }, "CreateNarrativeRequestDtoServiceRequest": { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/components/schemas/CreateNarrativeRequestDto" } ], "nullable": true } }, "additionalProperties": false }, "CreateUrlToUploadFileRequestDto": { "type": "object", "properties": { "narrativeId": { "type": "string", "format": "uuid", "nullable": true }, "entityId": { "type": "string", "format": "uuid" }, "fileName": { "type": "string", "nullable": true }, "isRootContent": { "type": "boolean" }, "contentSize": { "type": "integer", "format": "int64" } }, "additionalProperties": false }, "CreateUrlToUploadFileRequestDtoServiceRequest": { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/components/schemas/CreateUrlToUploadFileRequestDto" } ], "nullable": true } }, "additionalProperties": false }, "CreateUrlToUploadFileResponseDto": { "type": "object", "properties": { "url": { "type": "string", "nullable": true }, "fileIdentifier": { "type": "string", "nullable": true } }, "additionalProperties": false }, "CreateUrlToUploadFileResponseDtoServiceResponse": { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/components/schemas/CreateUrlToUploadFileResponseDto" } ], "nullable": true }, "messages": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceResponseMessage" }, "nullable": true } }, "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", "nullable": true }, "fileKey": { "type": "string", "nullable": true }, "lastUpdatedBy": { "type": "string", "nullable": true }, "lastUpdatedDate": { "type": "string", "format": "date-time" } }, "additionalProperties": false }, "NarrativeDtoServiceResponse": { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/components/schemas/NarrativeDto" } ], "nullable": true }, "messages": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceResponseMessage" }, "nullable": true } }, "additionalProperties": false }, "NarrativeType": { "enum": [ "Business", "Compliance" ], "type": "string" }, "ObjectServiceResponse": { "type": "object", "properties": { "data": { "nullable": true }, "messages": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceResponseMessage" }, "nullable": true } }, "additionalProperties": false }, "ServiceResponse": { "type": "object", "properties": { "data": { "type": "string", "nullable": true }, "messages": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceResponseMessage" }, "nullable": true } }, "additionalProperties": false }, "ServiceResponseMessage": { "type": "object", "properties": { "message": { "type": "string", "nullable": true }, "type": { "type": "string", "nullable": true }, "errorCode": { "type": "string", "nullable": true } }, "additionalProperties": false }, "StringServiceResponse": { "type": "object", "properties": { "data": { "type": "string", "nullable": true }, "messages": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceResponseMessage" }, "nullable": true } }, "additionalProperties": false }, "UpdateNarrativeRequestDto": { "type": "object", "properties": { "text": { "type": "string", "nullable": true }, "fileKey": { "type": "string", "nullable": true } }, "additionalProperties": false }, "UpdateNarrativeRequestDtoServiceRequest": { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/components/schemas/UpdateNarrativeRequestDto" } ], "nullable": true } }, "additionalProperties": false }, "ValidationErrorModel": { "type": "object", "properties": { "propertyName": { "type": "string", "nullable": true }, "errorMessage": { "type": "string", "nullable": true }, "attemptedValue": { "nullable": true }, "errorCode": { "type": "string", "nullable": true } }, "additionalProperties": false }, "ValidationErrorModelListServiceResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ValidationErrorModel" }, "nullable": true }, "messages": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceResponseMessage" }, "nullable": true } }, "additionalProperties": false, "example": { "data": [ { "propertyName": "data", "errorMessage": "Data is required", "attemptedValue": "", "errorCode": "NotNullValidator" } ], "messages": [ { "message": "Data is required", "type": "Error", "errorCode": "Error Code" } ] } } }, "securitySchemes": { "Bearer": { "type": "apiKey", "description": "Please insert JWT with Bearer into field", "name": "Authorization", "in": "header" } } }, "security": [ { "Bearer": [ ] } ] }