{
"openapi": "3.0.4",
"info": {
"title": "Fenergo Nebula Narrative Query",
"description": "Narrative Query 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": "/narrativequery"
}
],
"paths": {
"/api/business/search": {
"post": {
"tags": [
"BusinessNarratives"
],
"summary": "Search Business Narratives",
"description": "\nThis method will return a list of Narrative models.
Required permissions:
Following permissions are required: NarrativesBusinessAccess",
"operationId": "SearchBusinessNarrative",
"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": "ServiceRequest with the details to search",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/SearchNarrativeRequestDtoServiceRequest"
}
]
}
}
}
},
"responses": {
"200": {
"description": "An list of instances of the N:Fenergo.Nebula.Narrative class representing the Narrative metadata.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NarrativeIEnumerableServiceResponse"
}
}
}
},
"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}": {
"get": {
"tags": [
"BusinessNarratives"
],
"summary": "Get Business Narrative by Id",
"description": "\nThis method will return Business Narrative model
Required permissions:
Following permissions are required: NarrativesBusinessAccess",
"operationId": "GetBusinessNarrativeById",
"parameters": [
{
"name": "narrativeId",
"in": "path",
"description": "Narrative ID to search",
"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": "An instance of the Fenergo.Nebula.Narrative.Common.Application.Dto.NarrativeDto class representing the Narrative 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/ServiceResponse"
}
}
}
},
"404": {
"description": "Resource not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ObjectServiceResponse"
},
"example": {
"data": { },
"messages": [
{
"message": "Not Found. The Narrative with provided ID not found",
"type": "Error",
"errorCode": "Error Code"
}
]
}
}
}
},
"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/{entityId}/pre-sign-urls": {
"post": {
"tags": [
"BusinessNarratives"
],
"summary": "Get pre-sign URLs for a file identifiers\nThis endpoint is intended for use with the Narrative RichTextEditor.",
"description": "\nReturns URLs for each file identifier
Required permissions:
Following permissions are required: NarrativesBusinessAccess",
"operationId": "GetPreSignBusinessUrlForFileIdentifiers",
"parameters": [
{
"name": "entityId",
"in": "path",
"description": "Entity id",
"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": "File identifiers request",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/GetPreSignUrlsRequestDtoServiceRequest"
}
]
}
}
}
},
"responses": {
"200": {
"description": "Success. Instance of property is returned",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetPreSignUrlsResponseDtoServiceResponse"
}
}
}
},
"403": {
"description": "Forbidden. User has no access to reveal property",
"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. Entity or PropertyName with given id/name does not exist",
"type": "Error",
"errorCode": "Error Code"
}
]
}
}
}
},
"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"
}
}
}
},
"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/compliance/search": {
"post": {
"tags": [
"ComplianceNarratives"
],
"summary": "Search Compliance Narratives",
"description": "\nThis method will return a list of Narrative models.
Required permissions:
Following permissions are required: NarrativesComplianceAccess",
"operationId": "SearchComplianceNarratives",
"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": "ServiceRequest with the details to search",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/SearchNarrativeRequestDtoServiceRequest"
}
]
}
}
}
},
"responses": {
"200": {
"description": "An list of instances of the Fenergo.Nebula.Narrative.Common.Application.Dto.NarrativeDto class representing the Narrative metadata.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NarrativeDtoIEnumerableServiceResponse"
}
}
}
},
"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}": {
"get": {
"tags": [
"ComplianceNarratives"
],
"summary": "Get Compliance Narrative by Id",
"description": "\nThis method will return Compliance Narrative model
Required permissions:
Following permissions are required: NarrativesComplianceAccess",
"operationId": "GetComplianceNarrativeById",
"parameters": [
{
"name": "narrativeId",
"in": "path",
"description": "Narrative ID to search",
"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": "An instance of the Fenergo.Nebula.Narrative.Common.Application.Dto.NarrativeDto class representing the Narrative 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/ServiceResponse"
}
}
}
},
"404": {
"description": "Resource not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ObjectServiceResponse"
},
"example": {
"data": { },
"messages": [
{
"message": "Not Found. The Narrative with provided ID not found",
"type": "Error",
"errorCode": "Error Code"
}
]
}
}
}
},
"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/{entityId}/pre-sign-urls": {
"post": {
"tags": [
"ComplianceNarratives"
],
"summary": "Get pre-sign URLs for a file identifiers\nThis endpoint is intended for use with the Narrative RichTextEditor.",
"description": "\nReturns URLs for each file identifier
Required permissions:
Following permissions are required: NarrativesComplianceAccess",
"operationId": "GetPreSignComplianceUrlForFileIdentifiers",
"parameters": [
{
"name": "entityId",
"in": "path",
"description": "Entity id",
"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": "File identifiers request",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/GetPreSignUrlsRequestDtoServiceRequest"
}
]
}
}
}
},
"responses": {
"200": {
"description": "Success. Instance of property is returned",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetPreSignUrlsResponseDtoServiceResponse"
}
}
}
},
"403": {
"description": "Forbidden. User has no access to reveal property",
"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. Entity or PropertyName with given id/name does not exist",
"type": "Error",
"errorCode": "Error Code"
}
]
}
}
}
},
"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"
}
}
}
},
"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": {
"GetPreSignUrlsRequestDto": {
"type": "object",
"properties": {
"isRootContent": {
"type": "boolean"
},
"fileIdentifiers": {
"type": "array",
"items": {
"type": "string"
},
"nullable": true
}
},
"additionalProperties": false
},
"GetPreSignUrlsRequestDtoServiceRequest": {
"required": [
"data"
],
"type": "object",
"properties": {
"data": {
"allOf": [
{
"$ref": "#/components/schemas/GetPreSignUrlsRequestDto"
}
]
}
},
"additionalProperties": false
},
"GetPreSignUrlsResponseDto": {
"type": "object",
"properties": {
"isRootContent": {
"type": "boolean"
},
"urls": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"nullable": true
}
},
"additionalProperties": false
},
"GetPreSignUrlsResponseDtoServiceResponse": {
"type": "object",
"properties": {
"data": {
"allOf": [
{
"$ref": "#/components/schemas/GetPreSignUrlsResponseDto"
}
],
"nullable": true
},
"messages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ServiceResponseMessage"
},
"nullable": true
}
},
"additionalProperties": false
},
"Narrative": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"readOnly": true
},
"entityId": {
"type": "string",
"format": "uuid",
"readOnly": true
},
"tenant": {
"type": "string",
"nullable": true,
"readOnly": true
},
"type": {
"allOf": [
{
"$ref": "#/components/schemas/NarrativeType"
}
],
"readOnly": true
},
"text": {
"type": "string",
"nullable": true,
"readOnly": true
},
"fileKey": {
"type": "string",
"nullable": true,
"readOnly": true
},
"lastUpdatedBy": {
"type": "string",
"nullable": true,
"readOnly": true
},
"lastUpdatedDate": {
"type": "string",
"format": "date-time",
"readOnly": 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
},
"NarrativeDtoIEnumerableServiceResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NarrativeDto"
},
"nullable": true
},
"messages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ServiceResponseMessage"
},
"nullable": true
}
},
"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
},
"NarrativeIEnumerableServiceResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Narrative"
},
"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
},
"SearchNarrativeRequestDto": {
"type": "object",
"properties": {
"entityId": {
"type": "string",
"format": "uuid"
},
"searchTerm": {
"type": "string",
"nullable": true
}
},
"additionalProperties": false
},
"SearchNarrativeRequestDtoServiceRequest": {
"required": [
"data"
],
"type": "object",
"properties": {
"data": {
"allOf": [
{
"$ref": "#/components/schemas/SearchNarrativeRequestDto"
}
]
}
},
"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
},
"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": [ ]
}
]
}