diff --git a/certified-connectors/Connect2All/apiDefinition.swagger.json b/certified-connectors/Connect2All/apiDefinition.swagger.json index 63221712cb..248a225185 100644 --- a/certified-connectors/Connect2All/apiDefinition.swagger.json +++ b/certified-connectors/Connect2All/apiDefinition.swagger.json @@ -1,776 +1,376 @@ { + "swagger": "2.0", + "info": { + "title": "Connect2All", + "description": "Import, export and transform your Business Central data", + "version": "2.5", + "contact": { + "name": "GAC Business Solutions", + "url": "https://www.gac.nl", + "email": "apps@gac.nl" + } + }, + "host": "connect2all.gaccloud.com", "basePath": "/", + "schemes": [ + "https" + ], "consumes": [], - "definitions": { - "Actiontype": { - "description": "The action type of the synchronous action that you wish to execute", - "title": "Action type", - "type": "string", - "x-ms-dynamic-values": { - "operationId": "GetSynchronousActions", - "parameters": { - "Company": { - "parameter": "Company" + "produces": [], + "x-ms-connector-metadata": [ + { + "propertyName": "Website", + "propertyValue": "https://www.gac.nl" + }, + { + "propertyName": "Privacy Policy", + "propertyValue": "https://www.gac.nl/disclaimer" + }, + { + "propertyName": "Categories", + "propertyValue": "Productivity;Data" + } + ], + "paths": { + "/api/1.0/environments": { + "get": { + "operationId": "GetEnvironments", + "summary": "Get Environments", + "description": "Get a list of available Business Central environments", + "tags": [ + "helpers" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "x-ms-visibility": "internal", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/StringArray" + } }, - "Environment": { - "parameter": "Environment" + "400": { + "$ref": "#/responses/Unexpected" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "402": { + "$ref": "#/responses/InvalidLicense" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/Unexpected" } } - }, - "x-ms-summary": "Action type" + } }, - "CodeunitId": { - "description": "The codeunit you wish to execute", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-values": { - "operationId": "GetActions", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" + "/api/1.0/companies": { + "get": { + "operationId": "GetCompanies", + "summary": "Get Companies", + "description": "Get a list of companies from Business Central", + "tags": [ + "helpers" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "x-ms-visibility": "internal", + "parameters": [ + { + "$ref": "#/parameters/Environment" } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-summary": "Codeunit" - }, - "CreateRequest": { - "description": "The request to insert data", - "properties": { - "fieldvalues": { - "description": "The fields with the values to set", - "items": { - "properties": { - "id": { - "$ref": "#/definitions/FieldId" - }, - "value": { - "description": "The value to set for this field", - "type": "string", - "x-ms-summary": "Value to set", - "x-ms-visibility": "advanced" - } - }, - "type": "object" + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/StringArray" + } }, - "type": "array", - "x-ms-summary": "Field Values" - }, - "table": { - "$ref": "#/definitions/TableId" - } - }, - "required": [ - "table", - "fieldvalues" - ], - "type": "object", - "x-ms-summary": "Request" - }, - "Error": { - "properties": { - "Message": { - "type": "string" - }, - "StatusCode": { - "type": "integer" - }, - "StatusMessage": { - "type": "string" - } - }, - "type": "object" - }, - "FieldId": { - "description": "A field from the selected table", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-list": { - "itemTitlePath": "name", - "itemValuePath": "id", - "operationId": "GetFields", - "parameters": { - "Company": { - "parameterReference": "Company" + "400": { + "$ref": "#/responses/Unexpected" }, - "Environment": { - "parameterReference": "Environment" + "401": { + "$ref": "#/responses/Unauthorized" }, - "Table": { - "parameterReference": "body/table" - } - } - }, - "x-ms-dynamic-values": { - "operationId": "GetFields", - "parameters": { - "Company": { - "parameter": "Company" + "402": { + "$ref": "#/responses/InvalidLicense" }, - "Environment": { - "parameter": "Environment" + "404": { + "$ref": "#/responses/NotFound" }, - "Table": { - "parameter": "table" + "500": { + "$ref": "#/responses/Unexpected" } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-summary": "Field" + } + } }, - "KeyValuePairArray": { - "items": { - "properties": { - "id": { - "description": "id", - "format": "int32", - "type": "integer" + "/api/1.0/tables": { + "get": { + "operationId": "GetTables", + "summary": "Get Tables", + "description": "Get a list of available tables in Business Central", + "tags": [ + "helpers" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "x-ms-visibility": "internal", + "parameters": [ + { + "$ref": "#/parameters/Environment" }, - "name": { - "description": "name", - "type": "string" + { + "$ref": "#/parameters/Company" } - }, - "type": "object" - }, - "type": "array" + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/KeyValuePairArray" + } + }, + "400": { + "$ref": "#/responses/Unexpected" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "402": { + "$ref": "#/responses/InvalidLicense" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/Unexpected" + } + } + } }, - "PerformActionRequest": { - "properties": { - "codeunitId": { - "$ref": "#/definitions/CodeunitId" - }, - "parameters": { - "description": "The parameter string to pass to the codeunit", - "type": "string", - "x-ms-summary": "Parameter String" - } - }, - "required": [ - "codeunitId" - ], - "type": "object" - }, - "PerformSynchronousActionRequest": { - "properties": { - "actiontype": { - "$ref": "#/definitions/Actiontype" - }, - "payload": { - "description": "The payload string to pass to the synchronous action", - "type": "string", - "x-ms-summary": "Payload String" - } - }, - "required": [ - "actiontype" - ], - "type": "object" - }, - "ReadRequest": { - "description": "The request to retrieve data", - "properties": { - "fields": { - "description": "Select a field you want to retrieve", - "items": { - "$ref": "#/definitions/FieldId" + "/api/1.0/schema/ReadRequest": { + "post": { + "operationId": "GetReadRequestSchema", + "summary": "Get schema", + "description": "Get schema for readrequest", + "tags": [ + "helpers" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "x-ms-visibility": "internal", + "parameters": [ + { + "$ref": "#/parameters/Environment" }, - "type": "array", - "x-ms-summary": "Select" - }, - "filters": { - "description": "Field with filters that will be applied when retrieving data", - "items": { - "properties": { - "field": { - "$ref": "#/definitions/FieldId" - }, - "filter": { - "description": "A valid Business Central filter value", - "type": "string", - "x-ms-summary": "Filter", - "x-ms-visibility": "advanced" + { + "$ref": "#/parameters/Company" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "object", + "description": "The schema for this readrequest", + "properties": { + "schema": { + "type": "object", + "properties": {} + } } - }, - "type": "object" + } }, - "type": "array", - "x-ms-summary": "Filterfields" - }, - "name": { - "description": "Your reference name for this table request object", - "title": "", - "type": "string", - "x-ms-summary": "Name", - "x-ms-visibility": "advanced" - }, - "orderby": { - "description": "Data will be sorted using these fields", - "items": { - "$ref": "#/definitions/FieldId" + "400": { + "$ref": "#/responses/Unexpected" }, - "type": "array", - "x-ms-summary": "Order by" - }, - "sortorder": { - "description": "Whether the data returned is sorted in ascending or descending order", - "enum": [ - "Ascending", - "Descending" - ], - "title": "", - "type": "string", - "x-ms-summary": "Sorting Order" - }, - "table": { - "$ref": "#/definitions/TableId" - }, - "top": { - "description": "The maximum amount of records to return", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-summary": "Top", - "x-ms-visibility": "advanced" - } - }, - "required": [ - "table" - ], - "type": "object", - "x-ms-summary": "Request" - }, - "ReadRequestSimple": { - "description": "The request to retrieve data", - "properties": { - "fields": { - "description": "Select a field you want to retrieve", - "items": { - "$ref": "#/definitions/FieldId" + "401": { + "$ref": "#/responses/Unauthorized" }, - "type": "array", - "x-ms-summary": "Select" - }, - "table": { - "$ref": "#/definitions/TableId" - } - }, - "required": [ - "table" - ], - "type": "object", - "x-ms-summary": "Request" - }, - "ReadRequestSimpleSchema": { - "description": "The request to retrieve data", - "properties": { - "fields": { - "description": "Select a field you want to retrieve", - "items": { - "description": "A field from the selected table", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-summary": "Field" + "402": { + "$ref": "#/responses/InvalidLicense" }, - "type": "array", - "x-ms-summary": "Select" - }, - "name": { - "description": "The name of the request", - "type": "string", - "x-ms-summary": "Name of request" - }, - "table": { - "description": "The table from which you want to retrieve data", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-summary": "Table" + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/Unexpected" + } } - }, - "required": [ - "table" - ], - "type": "object", - "x-ms-summary": "Request" - }, - "StringArray": { - "items": { - "type": "string" - }, - "type": "array" + } }, - "TableId": { - "description": "The table from Business Central which is used in this request", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-values": { - "operationId": "GetTables", - "parameters": { - "Company": { - "parameter": "Company" + "/api/1.0/schema/ReadRequestById": { + "post": { + "operationId": "GetReadRequestByIdSchema", + "summary": "Get schema", + "description": "Get schema for readrequest by id", + "tags": [ + "helpers" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "x-ms-visibility": "internal", + "parameters": [ + { + "$ref": "#/parameters/Environment" }, - "Environment": { - "parameter": "Environment" + { + "$ref": "#/parameters/Company" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReadRequestSimpleSchema" + }, + "x-ms-visibility": "internal" } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-summary": "Table" - }, - "UpdateRequest": { - "description": "The request to insert data", - "properties": { - "fieldvalues": { - "description": "The fields with the values to set", - "items": { - "properties": { - "id": { - "$ref": "#/definitions/FieldId" - }, - "value": { - "description": "The value to set for this field", - "type": "string", - "x-ms-summary": "Value to set", - "x-ms-visibility": "advanced" + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "object", + "description": "The schema for this readrequest", + "properties": { + "schema": { + "type": "object", + "properties": {} + } } - }, - "type": "object" + } }, - "type": "array", - "x-ms-summary": "Field Values" - }, - "systemId": { - "description": "The id of the record in Business Central", - "type": "string", - "x-ms-summary": "System Id" - }, - "table": { - "$ref": "#/definitions/TableId" - } - }, - "required": [ - "table", - "systemId", - "fieldvalues" - ], - "type": "object", - "x-ms-summary": "Request" - }, - "WebhookRequest": { - "properties": { - "CallbackUrl": { - "description": "CallbackUrl", - "title": "", - "type": "string", - "x-ms-notification-url": true, - "x-ms-visibility": "internal" - }, - "Fields": { - "description": "Select a field you want to retrieve", - "items": { - "description": "A field from the selected table", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-list": { - "itemTitlePath": "name", - "itemValuePath": "id", - "operationId": "GetFields", - "parameters": { - "Company": { - "parameterReference": "Company" - }, - "Environment": { - "parameterReference": "Environment" - }, - "Table": { - "parameterReference": "body/TableId" - } - } - }, - "x-ms-dynamic-values": { - "operationId": "GetFields", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - }, - "Table": { - "parameter": "TableId" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-summary": "Field" + "400": { + "$ref": "#/responses/Unexpected" }, - "type": "array", - "x-ms-summary": "Select" - }, - "Filters": { - "description": "Field with filters that will be applied when retrieving data", - "items": { - "properties": { - "field": { - "description": "A field from the selected table", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-list": { - "itemTitlePath": "name", - "itemValuePath": "id", - "operationId": "GetFields", - "parameters": { - "Company": { - "parameterReference": "Company" - }, - "Environment": { - "parameterReference": "Environment" - }, - "Table": { - "parameterReference": "body/TableId" - } - } - }, - "x-ms-dynamic-values": { - "operationId": "GetFields", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - }, - "Table": { - "parameter": "TableId" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-summary": "Field" - }, - "filter": { - "description": "A valid Business Central filter value", - "type": "string", - "x-ms-summary": "Filter", - "x-ms-visibility": "advanced" - } - }, - "type": "object" + "401": { + "$ref": "#/responses/Unauthorized" }, - "type": "array", - "x-ms-summary": "Filterfields" - }, - "TableId": { - "description": "TableId", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-values": { - "operationId": "GetTables", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - } - }, - "value-path": "id", - "value-title": "name" + "402": { + "$ref": "#/responses/InvalidLicense" }, - "x-ms-visibility": "important" - } - }, - "required": [ - "CallbackUrl", - "TableId" - ], - "type": "object" - }, - "WebhookSchemaRequest": { - "properties": { - "fields": { - "items": { - "format": "int32", - "type": "integer", - "x-ms-summary": "Field" + "404": { + "$ref": "#/responses/NotFound" }, - "type": "array" - }, - "isBatch": { - "type": "boolean", - "x-ms-summary": "IsBatch" - }, - "tableId": { - "format": "int32", - "type": "integer", - "x-ms-summary": "Table" - } - }, - "type": "object" - } - }, - "host": "connect2all.gaccloud.com", - "info": { - "contact": { - "email": "apps@gac.nl", - "name": "GAC Business Solutions", - "url": "https://www.gac.nl" - }, - "description": "Import, export and transform your Business Central data", - "title": "Connect2All", - "version": "2.4" - }, - "parameters": { - "Company": { - "description": "The Business Central company to connect to", - "in": "header", - "name": "Company", - "required": true, - "type": "string", - "x-ms-dynamic-values": { - "operationId": "GetCompanies", - "parameters": { - "Environment": { - "parameter": "Environment" + "500": { + "$ref": "#/responses/Unexpected" } } - }, - "x-ms-summary": "Company" + } }, - "Configuration": { - "description": "The configuration to use to transform the data to and from Business Central", - "in": "path", - "name": "Configuration", - "required": true, - "type": "string", - "x-ms-dynamic-values": { - "operationId": "GetConfigurationNames", - "parameters": { - "Company": { - "parameter": "Company" + "/api/1.0/schema/WebhookRequest": { + "post": { + "operationId": "GetWebhookRequestSchema", + "summary": "Get schema for webhook", + "description": "Gets a schema for a webhook response", + "tags": [ + "helpers" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "x-ms-visibility": "internal", + "parameters": [ + { + "$ref": "#/parameters/Environment" }, - "Environment": { - "parameter": "Environment" + { + "$ref": "#/parameters/Company" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WebhookSchemaRequest" + }, + "x-ms-visibility": "internal" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "object", + "description": "The schema for this webhook", + "properties": { + "schema": { + "type": "object", + "properties": {} + } + } + } + }, + "400": { + "$ref": "#/responses/Unexpected" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "402": { + "$ref": "#/responses/InvalidLicense" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/Unexpected" } } - }, - "x-ms-summary": "Configuration", - "x-ms-url-encoding": "single", - "x-ms-visibility": "important" + } }, - "ContentType": { - "default": "application/json", - "in": "header", - "name": "Content-Type", - "required": true, - "type": "string", - "x-ms-summary": "Content-Type", - "x-ms-visibility": "internal" - }, - "ContentTypeBinary": { - "default": "application/octet-stream", - "in": "header", - "name": "Content-Type", - "required": true, - "type": "string", - "x-ms-summary": "Content-Type", - "x-ms-visibility": "internal" - }, - "CsvDelimiter": { - "description": "The delimiter to be used to seperate the columns", - "in": "query", - "maxLength": 1, - "name": "delimiter", - "required": false, - "type": "string", - "x-ms-summary": "Delimiter", - "x-ms-visibility": "advanced" - }, - "CsvHeaders": { - "description": "If set headers are used in the CSV", - "in": "query", - "name": "headers", - "required": false, - "type": "boolean", - "x-ms-summary": "Use Headers", - "x-ms-visibility": "advanced" - }, - "Environment": { - "description": "The Business Central environment to connect to", - "in": "header", - "name": "Environment", - "required": true, - "type": "string", - "x-ms-dynamic-values": { - "operationId": "GetEnvironments" - }, - "x-ms-summary": "Environment" - }, - "Language": { - "description": "The language in which to communicate with Business Central", - "in": "header", - "name": "Language", - "required": false, - "type": "string", - "x-ms-dynamic-values": { - "operationId": "GetLanguages", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-summary": "Language", - "x-ms-visibility": "advanced" - }, - "MediaFields": { - "description": "A field from the selected table", - "format": "int32", - "in": "path", - "name": "Field", - "required": true, - "type": "integer", - "x-ms-dynamic-values": { - "operationId": "GetFields", - "parameters": { - "$fieldtypes": "Media|Blob", - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - }, - "Table": { - "parameter": "Table" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-summary": "Field", - "x-ms-url-encoding": "single", - "x-ms-visibility": "important" - }, - "ReportId": { - "default": 0, - "description": "The id of the report in Business Central to retrieve", - "in": "path", - "name": "ReportId", - "required": true, - "type": "integer", - "x-ms-dynamic-values": { - "operationId": "GetReports", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-summary": "Report", - "x-ms-url-encoding": "single", - "x-ms-visibility": "important" - }, - "SystemId": { - "description": "The id of the record in Business Central", - "in": "path", - "name": "SystemId", - "required": true, - "type": "string", - "x-ms-summary": "System Id", - "x-ms-url-encoding": "single" - }, - "SystemIdQuery": { - "description": "The id of the record in Business Central", - "in": "query", - "name": "SystemId", - "required": false, - "type": "string", - "x-ms-summary": "System Id", - "x-ms-visibility": "advanced" - }, - "TablePath": { - "description": "The table from Business Central which is used in this request", - "format": "int32", - "in": "path", - "name": "Table", - "required": true, - "type": "integer", - "x-ms-dynamic-values": { - "operationId": "GetTables", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-summary": "Table", - "x-ms-url-encoding": "single", - "x-ms-visibility": "important" - }, - "TableQuery": { - "description": "The table from Business Central which is used in this request", - "format": "int32", - "in": "query", - "name": "TableId", - "required": false, - "type": "integer", - "x-ms-dynamic-values": { - "operationId": "GetTables", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-summary": "Table", - "x-ms-visibility": "advanced" - } - }, - "paths": { - "/api/1.0/TransformCsv/{Configuration}": { - "get": { + "/api/1.0/schema/ReadRequestById/{SystemId}": { + "post": { + "operationId": "GetReadRequestByIdSchemaForId", + "summary": "Get schema", + "description": "Get schema for readrequest", + "tags": [ + "helpers" + ], "consumes": [ "application/json" ], - "deprecated": true, - "description": "Get data based on passed configuration and returns the data in the CSV format set in the configuration (deprecated)", - "operationId": "GetCsvDocument", + "produces": [ + "application/json" + ], + "x-ms-visibility": "internal", "parameters": [ { "$ref": "#/parameters/Environment" @@ -779,22 +379,31 @@ "$ref": "#/parameters/Company" }, { - "$ref": "#/parameters/Configuration" - }, - { - "$ref": "#/parameters/CsvDelimiter" + "$ref": "#/parameters/SystemId" }, { - "$ref": "#/parameters/CsvHeaders" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReadRequestSimpleSchema" + }, + "x-ms-visibility": "internal" } ], - "produces": [ - "text/plain" - ], "responses": { "200": { "description": "Success", - "schema": {} + "schema": { + "type": "object", + "description": "The schema for this readrequest", + "properties": { + "schema": { + "type": "object", + "properties": {} + } + } + } }, "400": { "$ref": "#/responses/Unexpected" @@ -811,79 +420,67 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Get Csv (deprecated)", - "tags": [ - "csv" - ] + } } }, - "/api/1.0/TransformCsv/{Configuration}/": { - "post": { - "consumes": [ - "application/json" + "/api/1.0/hooks": { + "x-ms-notification-content": { + "description": "This is the system id is that is send back", + "schema": { + "type": "object", + "properties": { + "SystemId": { + "type": "string", + "description": "SystemId" + } + } + } + } + }, + "/api/2.0/hooks": { + "x-ms-notification-content": { + "description": "This is the system id is that is send back", + "schema": { + "type": "object", + "properties": { + "SystemId": { + "type": "string", + "description": "SystemId" + } + } + } + } + }, + "/api/1.0/hooks/{Id}": { + "delete": { + "description": "Deletes a webhook,", + "summary": "Deletes a registration webhook from the Business Central environment", + "tags": [ + "triggers" ], - "deprecated": true, - "description": "Imports and transforms CSV into Business Central data using a specific configuration (deprecated)", - "operationId": "PostTransformCsv", + "x-ms-visibility": "internal", + "operationId": "DeleteTrigger", "parameters": [ { - "$ref": "#/parameters/Environment" + "name": "environment", + "in": "query", + "required": true, + "type": "string" }, { - "$ref": "#/parameters/Company" - }, - { - "$ref": "#/parameters/Configuration" + "name": "company", + "in": "query", + "required": true, + "type": "string" }, { - "in": "body", - "name": "body", + "name": "Id", + "in": "path", + "description": "The id of the registered webhook", "required": true, - "schema": { - "properties": { - "data": { - "description": "The CSV data you wish to process", - "type": "string", - "x-ms-summary": "Csv Data" - }, - "delimiter": { - "description": "The delimiter to be used to seperate the columns", - "maxLength": 1, - "type": "string", - "x-ms-summary": "Delimiter" - }, - "skipfooterlines": { - "description": "Set how many footer lines you wish to skip", - "type": "integer", - "x-ms-summary": "Skip Footer Lines", - "x-ms-visibility": "advanced" - }, - "skipheaderlines": { - "description": "Set how many header lines you wish to skip", - "type": "integer", - "x-ms-summary": "Skip Header Lines", - "x-ms-visibility": "advanced" - }, - "useheaders": { - "description": "If set headers are used in the CSV", - "type": "boolean", - "x-ms-summary": "Use Headers", - "x-ms-visibility": "advanced" - } - }, - "required": [ - "delimiter", - "data" - ], - "type": "object" - }, - "x-ms-visibility": "important" + "type": "string" } ], - "produces": [ - "text/plain" - ], "responses": { "200": { "description": "Success", @@ -904,41 +501,39 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Process Csv (deprecated)", - "tags": [ - "csv" - ] + } } }, - "/api/1.0/TransformCsv/{Configuration}/metadata": { - "get": { - "consumes": [ - "application/json" + "/api/2.0/hooks/{Id}": { + "delete": { + "description": "Deletes a webhook,", + "summary": "Deletes a registration webhook from the Business Central environment", + "tags": [ + "triggers" ], - "deprecated": true, - "description": "Get data with metadata based on passed configuration and returns the data in the CSV format set in the configuration (deprecated)", - "operationId": "GetCsvDocumentWithMetadata", + "x-ms-visibility": "internal", + "operationId": "DeleteTriggerV2", "parameters": [ { - "$ref": "#/parameters/Environment" - }, - { - "$ref": "#/parameters/Company" - }, - { - "$ref": "#/parameters/Configuration" + "name": "environment", + "in": "query", + "required": true, + "type": "string" }, { - "$ref": "#/parameters/CsvDelimiter" + "name": "company", + "in": "query", + "required": true, + "type": "string" }, { - "$ref": "#/parameters/CsvHeaders" + "name": "Id", + "in": "path", + "description": "The id of the registered webhook", + "required": true, + "type": "string" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "Success", @@ -959,44 +554,23 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Get Csv with metadata (deprecated)", - "tags": [ - "csv" - ] + } } }, - "/api/1.0/TransformCsv/{Configuration}/metadata/{SystemId}": { - "get": { - "consumes": [ - "application/json" - ], - "deprecated": true, - "description": "Get data by Id with metadata based on passed configuration and returns the data in the CSV format set in the configuration (deprecated)", - "operationId": "GetCsvDocumentByIdWithMetadata", - "parameters": [ - { - "$ref": "#/parameters/Environment" - }, - { - "$ref": "#/parameters/Company" - }, - { - "$ref": "#/parameters/Configuration" - }, - { - "$ref": "#/parameters/SystemId" - }, - { - "$ref": "#/parameters/CsvDelimiter" - }, - { - "$ref": "#/parameters/CsvHeaders" + "/api/1.0/hooks/create": { + "x-ms-notification-content": { + "description": "This is the system id is that is send back", + "schema": { + "type": "object", + "properties": { + "SystemId": { + "type": "string", + "description": "SystemId" + } } - ], - "produces": [ - "application/json" - ], + } + }, + "post": { "responses": { "200": { "description": "Success", @@ -1018,78 +592,19 @@ "$ref": "#/responses/Unexpected" } }, - "summary": "Get Csv by Id with metadata (deprecated)", + "summary": "Triggers when a record is created", "tags": [ - "csv" - ] - } - }, - "/api/1.0/TransformCsv/{Configuration}/{SystemId}": { - "get": { + "triggers" + ], "consumes": [ "application/json" ], - "deprecated": true, - "description": "Get data by SystemId based on passed configuration and returns the data in the CSV format set in the configuration (deprecated)", - "operationId": "GetCsvDocumentById", - "parameters": [ - { - "$ref": "#/parameters/Environment" - }, - { - "$ref": "#/parameters/Company" - }, - { - "$ref": "#/parameters/Configuration" - }, - { - "$ref": "#/parameters/SystemId" - }, - { - "$ref": "#/parameters/CsvDelimiter" - }, - { - "$ref": "#/parameters/CsvHeaders" - } - ], "produces": [ - "text/plain" - ], - "responses": { - "200": { - "description": "Success", - "schema": {} - }, - "400": { - "$ref": "#/responses/Unexpected" - }, - "401": { - "$ref": "#/responses/Unauthorized" - }, - "402": { - "$ref": "#/responses/InvalidLicense" - }, - "404": { - "$ref": "#/responses/NotFound" - }, - "500": { - "$ref": "#/responses/Unexpected" - } - }, - "summary": "Get Csv by Id (deprecated)", - "tags": [ - "csv" - ] - } - }, - "/api/1.0/TransformXml/{Configuration}": { - "get": { - "consumes": [ "application/json" ], - "deprecated": true, - "description": "Get data based on passed configuration and returns the data in (deprecated) the XML format set in the configuration", - "operationId": "GetXmlDocument", + "description": "A record is created in Business Central", + "operationId": "RecordCreated", + "x-ms-trigger": "single", "parameters": [ { "$ref": "#/parameters/Environment" @@ -1098,15 +613,106 @@ "$ref": "#/parameters/Company" }, { - "$ref": "#/parameters/Configuration" + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "TableId": { + "type": "integer", + "format": "int32", + "description": "TableId", + "title": "", + "x-ms-visibility": "important", + "x-ms-dynamic-values": { + "operationId": "GetTables", + "value-path": "id", + "value-title": "name", + "parameters": { + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + } + }, + "CallbackUrl": { + "type": "string", + "description": "CallbackUrl", + "title": "", + "x-ms-visibility": "internal", + "x-ms-notification-url": true + } + }, + "required": [ + "CallbackUrl", + "TableId" + ] + } } - ], - "produces": [ - "text/plain" - ], - "responses": { - "200": { - "description": "Success", + ] + } + }, + "/api/2.0/hooks/create": { + "x-ms-notification-content": { + "description": "This is the data that is send back", + "schema": { + "type": "object", + "description": "Response", + "title": "Response", + "x-ms-summary": "Response", + "properties": {}, + "x-ms-dynamic-schema": { + "operationId": "GetWebhookRequestSchema", + "parameters": { + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + }, + "tableId": { + "parameter": "TableId" + }, + "fields": { + "parameter": "Fields" + }, + "isBatch": { + "parameter": "IsBatch" + } + }, + "value-path": "schema" + }, + "x-ms-dynamic-properties": { + "operationId": "GetWebhookRequestSchema", + "parameters": { + "Environment": { + "parameterReference": "Environment" + }, + "Company": { + "parameterReference": "Company" + }, + "body/tableId": { + "parameterReference": "body/TableId" + }, + "body/fields": { + "parameterReference": "body/Fields" + }, + "body/isBatch": { + "parameterReference": "body/IsBatch" + } + }, + "itemValuePath": "schema" + } + } + }, + "post": { + "responses": { + "200": { + "description": "Success", "schema": {} }, "400": { @@ -1125,20 +731,19 @@ "$ref": "#/responses/Unexpected" } }, - "summary": "Get Xml (deprecated)", + "summary": "Triggers when a record is created (V2)", "tags": [ - "xml" - ] - } - }, - "/api/1.0/TransformXml/{Configuration}/": { - "post": { + "triggers" + ], "consumes": [ "application/json" ], - "deprecated": true, - "description": "Imports and transforms XML into Business Central data using a specific configuration (deprecated)", - "operationId": "PostTransformXml", + "produces": [ + "application/json" + ], + "description": "A record is created in Business Central", + "operationId": "RecordCreatedV2", + "x-ms-trigger": "single", "parameters": [ { "$ref": "#/parameters/Environment" @@ -1147,26 +752,167 @@ "$ref": "#/parameters/Company" }, { - "$ref": "#/parameters/Configuration" - }, - { - "in": "body", "name": "body", + "in": "body", "required": true, "schema": { + "type": "object", "properties": { - "data": { - "description": "data", - "type": "string" + "TableId": { + "type": "integer", + "format": "int32", + "description": "TableId", + "title": "", + "x-ms-visibility": "important", + "x-ms-dynamic-values": { + "operationId": "GetTables", + "value-path": "id", + "value-title": "name", + "parameters": { + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + } + }, + "CallbackUrl": { + "type": "string", + "description": "CallbackUrl", + "title": "", + "x-ms-visibility": "internal", + "x-ms-notification-url": true + }, + "Fields": { + "type": "array", + "items": { + "type": "integer", + "format": "int32", + "description": "A field from the selected table", + "x-ms-summary": "Field", + "title": "", + "x-ms-dynamic-values": { + "operationId": "GetFields", + "value-path": "id", + "value-title": "name", + "parameters": { + "Table": { + "parameter": "TableId" + }, + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + }, + "x-ms-dynamic-list": { + "operationId": "GetFields", + "itemValuePath": "id", + "itemTitlePath": "name", + "parameters": { + "Table": { + "parameterReference": "body/TableId" + }, + "Environment": { + "parameterReference": "Environment" + }, + "Company": { + "parameterReference": "Company" + } + } + } + }, + "x-ms-summary": "Select", + "description": "Select a field you want to retrieve" + }, + "Filters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Field": { + "type": "integer", + "format": "int32", + "description": "A field from the selected table", + "x-ms-summary": "Field", + "title": "", + "x-ms-dynamic-values": { + "operationId": "GetFields", + "value-path": "id", + "value-title": "name", + "parameters": { + "Table": { + "parameter": "TableId" + }, + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + }, + "x-ms-dynamic-list": { + "operationId": "GetFields", + "itemValuePath": "id", + "itemTitlePath": "name", + "parameters": { + "Table": { + "parameterReference": "body/TableId" + }, + "Environment": { + "parameterReference": "Environment" + }, + "Company": { + "parameterReference": "Company" + } + } + } + }, + "FilterValue": { + "type": "string", + "x-ms-summary": "Filter", + "description": "A valid Business Central filter value", + "x-ms-visibility": "advanced" + } + } + }, + "x-ms-summary": "Filterfields", + "description": "Field with filters that will be applied when retrieving data" + }, + "IsBatch": { + "type": "boolean", + "x-ms-summary": "Is Batch", + "description": "Receive batches or singular updates" } }, - "type": "object" + "required": [ + "CallbackUrl", + "TableId" + ] } } - ], - "produces": [ - "text/plain" - ], + ] + } + }, + "/api/1.0/hooks/update": { + "x-ms-notification-content": { + "description": "This is the system id is that is send back", + "schema": { + "type": "object", + "properties": { + "SystemId": { + "type": "string", + "description": "SystemId" + } + } + } + }, + "post": { "responses": { "200": { "description": "Success", @@ -1188,20 +934,19 @@ "$ref": "#/responses/Unexpected" } }, - "summary": "Process Xml (deprecated)", + "summary": "Triggers when a record is updated", "tags": [ - "xml" - ] - } - }, - "/api/1.0/TransformXml/{Configuration}/metadata": { - "get": { + "triggers" + ], "consumes": [ "application/json" ], - "deprecated": true, - "description": "Get data with metadata based on passed configuration and returns the data in the XML format set in the configuration (deprecated)", - "operationId": "GetXmlDocumentWithMetadata", + "produces": [ + "application/json" + ], + "description": "A record is updated in Business Central", + "operationId": "RecordUpdated", + "x-ms-trigger": "single", "parameters": [ { "$ref": "#/parameters/Environment" @@ -1210,64 +955,103 @@ "$ref": "#/parameters/Company" }, { - "$ref": "#/parameters/Configuration" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Success", - "schema": {} - }, - "400": { - "$ref": "#/responses/Unexpected" - }, - "401": { - "$ref": "#/responses/Unauthorized" - }, - "402": { - "$ref": "#/responses/InvalidLicense" - }, - "404": { - "$ref": "#/responses/NotFound" - }, - "500": { - "$ref": "#/responses/Unexpected" + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "TableId": { + "type": "integer", + "format": "int32", + "description": "TableId", + "title": "", + "x-ms-visibility": "important", + "x-ms-dynamic-values": { + "operationId": "GetTables", + "value-path": "id", + "value-title": "name", + "parameters": { + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + } + }, + "CallbackUrl": { + "type": "string", + "description": "CallbackUrl", + "title": "", + "x-ms-visibility": "internal", + "x-ms-notification-url": true + } + }, + "required": [ + "CallbackUrl", + "TableId" + ] + } } - }, - "summary": "Get Xml with metadata (deprecated)", - "tags": [ - "xml" ] } }, - "/api/1.0/TransformXml/{Configuration}/metadata/{SystemId}": { - "get": { - "consumes": [ - "application/json" - ], - "deprecated": true, - "description": "Get data by Id with metadata based on passed configuration and returns the data in the XML format set in the configuration (deprecated)", - "operationId": "GetXmlDocumentByIdWithMetadata", - "parameters": [ - { - "$ref": "#/parameters/Environment" - }, - { - "$ref": "#/parameters/Company" - }, - { - "$ref": "#/parameters/Configuration" + "/api/2.0/hooks/update": { + "x-ms-notification-content": { + "description": "This is the system id is that is send back", + "schema": { + "type": "object", + "description": "Response", + "title": "Response", + "x-ms-summary": "Response", + "properties": {}, + "x-ms-dynamic-schema": { + "operationId": "GetWebhookRequestSchema", + "parameters": { + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + }, + "tableId": { + "parameter": "TableId" + }, + "fields": { + "parameter": "Fields" + }, + "isBatch": { + "parameter": "IsBatch" + } + }, + "value-path": "schema" }, - { - "$ref": "#/parameters/SystemId" + "x-ms-dynamic-properties": { + "operationId": "GetWebhookRequestSchema", + "parameters": { + "Environment": { + "parameterReference": "Environment" + }, + "Company": { + "parameterReference": "Company" + }, + "body/tableId": { + "parameterReference": "body/TableId" + }, + "body/fields": { + "parameterReference": "body/Fields" + }, + "body/isBatch": { + "parameterReference": "body/IsBatch" + } + }, + "itemValuePath": "schema" } - ], - "produces": [ - "application/json" - ], + } + }, + "post": { "responses": { "200": { "description": "Success", @@ -1289,117 +1073,19 @@ "$ref": "#/responses/Unexpected" } }, - "summary": "Get Xml by Id with metadata (deprecated)", + "summary": "Triggers when a record is updated (V2)", "tags": [ - "xml" - ] - } - }, - "/api/1.0/TransformXml/{Configuration}/{SystemId}": { - "get": { - "consumes": [ - "application/json" - ], - "deprecated": true, - "description": "Get data by SystemId based on passed configuration and returns the data in the XML format set in the configuration (deprecated)", - "operationId": "GetXmlDocumentById", - "parameters": [ - { - "$ref": "#/parameters/Environment" - }, - { - "$ref": "#/parameters/Company" - }, - { - "$ref": "#/parameters/Configuration" - }, - { - "$ref": "#/parameters/SystemId" - } - ], - "produces": [ - "text/plain" + "triggers" ], - "responses": { - "200": { - "description": "Success", - "schema": {} - }, - "400": { - "$ref": "#/responses/Unexpected" - }, - "401": { - "$ref": "#/responses/Unauthorized" - }, - "402": { - "$ref": "#/responses/InvalidLicense" - }, - "404": { - "$ref": "#/responses/NotFound" - }, - "500": { - "$ref": "#/responses/Unexpected" - } - }, - "summary": "Get Xml by Id (deprecated)", - "tags": [ - "xml" - ] - } - }, - "/api/1.0/actions": { - "get": { "consumes": [ "application/json" ], - "description": "Get a list of all available actions in Business Central", - "operationId": "GetActions", - "parameters": [ - { - "$ref": "#/parameters/Environment" - }, - { - "$ref": "#/parameters/Company" - } - ], "produces": [ "application/json" ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/KeyValuePairArray" - } - }, - "400": { - "$ref": "#/responses/Unexpected" - }, - "401": { - "$ref": "#/responses/Unauthorized" - }, - "402": { - "$ref": "#/responses/InvalidLicense" - }, - "404": { - "$ref": "#/responses/NotFound" - }, - "500": { - "$ref": "#/responses/Unexpected" - } - }, - "summary": "GetActions", - "tags": [ - "helpers" - ], - "x-ms-visibility": "internal" - }, - "post": { - "consumes": [ - "application/json" - ], - "description": "Schedule to perform an action in Business Central", - "operationId": "PerformAction", + "description": "A record is updated in Business Central", + "operationId": "RecordUpdatedV2", + "x-ms-trigger": "single", "parameters": [ { "$ref": "#/parameters/Environment" @@ -1408,67 +1094,171 @@ "$ref": "#/parameters/Company" }, { - "description": "Action Request", - "in": "body", "name": "body", + "in": "body", "required": true, "schema": { - "$ref": "#/definitions/PerformActionRequest" - }, - "x-ms-summary": "Action Request" - } - ], - "responses": { - "200": { - "description": "Success" - }, - "400": { - "$ref": "#/responses/Unexpected" - }, - "401": { - "$ref": "#/responses/Unauthorized" - }, - "402": { - "$ref": "#/responses/InvalidLicense" - }, - "404": { - "$ref": "#/responses/NotFound" - }, - "500": { - "$ref": "#/responses/Unexpected" - } - }, - "summary": "Perform an action", - "tags": [ - "actions" - ], - "x-ms-visibility": "important" + "type": "object", + "properties": { + "TableId": { + "type": "integer", + "format": "int32", + "description": "TableId", + "title": "", + "x-ms-visibility": "important", + "x-ms-dynamic-values": { + "operationId": "GetTables", + "value-path": "id", + "value-title": "name", + "parameters": { + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + } + }, + "CallbackUrl": { + "type": "string", + "description": "CallbackUrl", + "title": "", + "x-ms-visibility": "internal", + "x-ms-notification-url": true + }, + "Fields": { + "type": "array", + "items": { + "type": "integer", + "format": "int32", + "description": "A field from the selected table", + "x-ms-summary": "Field", + "title": "", + "x-ms-dynamic-values": { + "operationId": "GetFields", + "value-path": "id", + "value-title": "name", + "parameters": { + "Table": { + "parameter": "TableId" + }, + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + }, + "x-ms-dynamic-list": { + "operationId": "GetFields", + "itemValuePath": "id", + "itemTitlePath": "name", + "parameters": { + "Table": { + "parameterReference": "body/TableId" + }, + "Environment": { + "parameterReference": "Environment" + }, + "Company": { + "parameterReference": "Company" + } + } + } + }, + "x-ms-summary": "Select", + "description": "Select a field you want to retrieve" + }, + "Filters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Field": { + "type": "integer", + "format": "int32", + "description": "A field from the selected table", + "x-ms-summary": "Field", + "title": "", + "x-ms-dynamic-values": { + "operationId": "GetFields", + "value-path": "id", + "value-title": "name", + "parameters": { + "Table": { + "parameter": "TableId" + }, + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + }, + "x-ms-dynamic-list": { + "operationId": "GetFields", + "itemValuePath": "id", + "itemTitlePath": "name", + "parameters": { + "Table": { + "parameterReference": "body/TableId" + }, + "Environment": { + "parameterReference": "Environment" + }, + "Company": { + "parameterReference": "Company" + } + } + } + }, + "FilterValue": { + "type": "string", + "x-ms-summary": "Filter", + "description": "A valid Business Central filter value", + "x-ms-visibility": "advanced" + } + } + }, + "x-ms-summary": "Filterfields", + "description": "Field with filters that will be applied when retrieving data" + }, + "IsBatch": { + "type": "boolean", + "x-ms-summary": "Is Batch", + "description": "Receive batches or singular updates" + } + }, + "required": [ + "CallbackUrl", + "TableId" + ] + } + } + ] } }, - "/api/1.0/actions/sync": { - "get": { - "consumes": [ - "application/json" - ], - "description": "Get a list of all available synchronous actions in Business Central", - "operationId": "GetSynchronousActions", - "parameters": [ - { - "$ref": "#/parameters/Environment" - }, - { - "$ref": "#/parameters/Company" + "/api/1.0/hooks/delete": { + "x-ms-notification-content": { + "description": "This is the system id is that is send back", + "schema": { + "type": "object", + "properties": { + "SystemId": { + "type": "string", + "description": "SystemId" + } } - ], - "produces": [ - "application/json" - ], + } + }, + "post": { "responses": { "200": { - "description": "Success", - "schema": { - "type": "string" - } + "description": "default", + "schema": {} }, "400": { "$ref": "#/responses/Unexpected" @@ -1486,18 +1276,16 @@ "$ref": "#/responses/Unexpected" } }, - "summary": "GetSynchronousActions", + "summary": "Triggers when a record is deleted", "tags": [ - "helpers" + "triggers" ], - "x-ms-visibility": "internal" - }, - "post": { "consumes": [ "application/json" ], - "description": "Perform a synchronous action in Business Central", - "operationId": "PerformSynchronousAction", + "operationId": "RecordDeleted", + "description": "A record is deleted in Business Central", + "x-ms-trigger": "single", "parameters": [ { "$ref": "#/parameters/Environment" @@ -1506,70 +1294,110 @@ "$ref": "#/parameters/Company" }, { - "description": "Synchronous Action Request", - "in": "body", "name": "body", + "in": "body", "required": true, "schema": { - "$ref": "#/definitions/PerformSynchronousActionRequest" - }, - "x-ms-summary": "Synchronous Action Request" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" + "type": "object", + "properties": { + "TableId": { + "type": "integer", + "format": "int32", + "description": "TableId", + "title": "", + "x-ms-visibility": "important", + "x-ms-dynamic-values": { + "operationId": "GetTables", + "value-path": "id", + "value-title": "name", + "parameters": { + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + } + }, + "CallbackUrl": { + "type": "string", + "description": "CallbackUrl", + "title": "", + "x-ms-visibility": "internal", + "x-ms-notification-url": true + } + }, + "required": [ + "CallbackUrl", + "TableId" + ] } - }, - "400": { - "$ref": "#/responses/Unexpected" - }, - "401": { - "$ref": "#/responses/Unauthorized" - }, - "402": { - "$ref": "#/responses/InvalidLicense" - }, - "404": { - "$ref": "#/responses/NotFound" - }, - "500": { - "$ref": "#/responses/Unexpected" } - }, - "summary": "Perform a synchronous action", - "tags": [ - "actions" - ], - "x-ms-visibility": "important" + ] } }, - "/api/1.0/companies": { - "get": { - "consumes": [ - "application/json" - ], - "description": "Get a list of companies from Business Central", - "operationId": "GetCompanies", - "parameters": [ - { - "$ref": "#/parameters/Environment" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/StringArray" - } - }, - "400": { - "$ref": "#/responses/Unexpected" + "/api/2.0/hooks/delete": { + "x-ms-notification-content": { + "description": "This is the system id is that is send back", + "schema": { + "type": "object", + "description": "Response", + "title": "Response", + "x-ms-summary": "Response", + "properties": {}, + "x-ms-dynamic-schema": { + "operationId": "GetWebhookRequestSchema", + "parameters": { + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + }, + "tableId": { + "parameter": "TableId" + }, + "fields": { + "parameter": "Fields" + }, + "isBatch": { + "parameter": "IsBatch" + } + }, + "value-path": "schema" + }, + "x-ms-dynamic-properties": { + "operationId": "GetWebhookRequestSchema", + "parameters": { + "Environment": { + "parameterReference": "Environment" + }, + "Company": { + "parameterReference": "Company" + }, + "body/tableId": { + "parameterReference": "body/TableId" + }, + "body/fields": { + "parameterReference": "body/Fields" + }, + "body/isBatch": { + "parameterReference": "body/IsBatch" + } + }, + "itemValuePath": "schema" + } + } + }, + "post": { + "responses": { + "200": { + "description": "default", + "schema": {} + }, + "400": { + "$ref": "#/responses/Unexpected" }, "401": { "$ref": "#/responses/Unauthorized" @@ -1584,72 +1412,195 @@ "$ref": "#/responses/Unexpected" } }, - "summary": "Get Companies", + "summary": "Triggers when a record is deleted (V2)", "tags": [ - "helpers" + "triggers" ], - "x-ms-visibility": "internal" - } - }, - "/api/1.0/configurations/names": { - "get": { "consumes": [ "application/json" ], - "deprecated": true, - "description": "Get Configurations from Business Central for data transformation (deprecated)", - "operationId": "GetConfigurationNames", + "operationId": "RecordDeletedV2", + "description": "A record is deleted in Business Central", + "x-ms-trigger": "single", "parameters": [ { "$ref": "#/parameters/Environment" }, { "$ref": "#/parameters/Company" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Success", + }, + { + "name": "body", + "in": "body", + "required": true, "schema": { - "$ref": "#/definitions/StringArray" + "type": "object", + "properties": { + "TableId": { + "type": "integer", + "format": "int32", + "description": "TableId", + "title": "", + "x-ms-visibility": "important", + "x-ms-dynamic-values": { + "operationId": "GetTables", + "value-path": "id", + "value-title": "name", + "parameters": { + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + } + }, + "CallbackUrl": { + "type": "string", + "description": "CallbackUrl", + "title": "", + "x-ms-visibility": "internal", + "x-ms-notification-url": true + }, + "Fields": { + "type": "array", + "items": { + "type": "integer", + "format": "int32", + "description": "A field from the selected table", + "x-ms-summary": "Field", + "title": "", + "x-ms-dynamic-values": { + "operationId": "GetFields", + "value-path": "id", + "value-title": "name", + "parameters": { + "Table": { + "parameter": "TableId" + }, + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + }, + "x-ms-dynamic-list": { + "operationId": "GetFields", + "itemValuePath": "id", + "itemTitlePath": "name", + "parameters": { + "Table": { + "parameterReference": "body/TableId" + }, + "Environment": { + "parameterReference": "Environment" + }, + "Company": { + "parameterReference": "Company" + } + } + } + }, + "x-ms-summary": "Select", + "description": "Select a field you want to retrieve" + }, + "Filters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Field": { + "type": "integer", + "format": "int32", + "description": "A field from the selected table", + "x-ms-summary": "Field", + "title": "", + "x-ms-dynamic-values": { + "operationId": "GetFields", + "value-path": "id", + "value-title": "name", + "parameters": { + "Table": { + "parameter": "TableId" + }, + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + }, + "x-ms-dynamic-list": { + "operationId": "GetFields", + "itemValuePath": "id", + "itemTitlePath": "name", + "parameters": { + "Table": { + "parameterReference": "body/TableId" + }, + "Environment": { + "parameterReference": "Environment" + }, + "Company": { + "parameterReference": "Company" + } + } + } + }, + "FilterValue": { + "type": "string", + "x-ms-summary": "Filter", + "description": "A valid Business Central filter value", + "x-ms-visibility": "advanced" + } + } + }, + "x-ms-summary": "Filterfields", + "description": "Field with filters that will be applied when retrieving data" + }, + "IsBatch": { + "type": "boolean", + "x-ms-summary": "Is Batch", + "description": "Receive batches or singular updates" + } + }, + "required": [ + "CallbackUrl", + "TableId" + ] } - }, - "400": { - "$ref": "#/responses/Unexpected" - }, - "401": { - "$ref": "#/responses/Unauthorized" - }, - "402": { - "$ref": "#/responses/InvalidLicense" - }, - "404": { - "$ref": "#/responses/NotFound" - }, - "500": { - "$ref": "#/responses/Unexpected" } - }, + ] + } + }, + "/api/1.0/configurations/names": { + "get": { + "operationId": "GetConfigurationNames", + "deprecated": true, "summary": "Get Configurations for data transformation (deprecated)", + "description": "Get Configurations from Business Central for data transformation (deprecated)", "tags": [ "helpers" ], - "x-ms-visibility": "internal" - } - }, - "/api/1.0/environments": { - "get": { + "x-ms-visibility": "internal", "consumes": [ "application/json" ], - "description": "Get a list of available Business Central environments", - "operationId": "GetEnvironments", "produces": [ "application/json" ], + "parameters": [ + { + "$ref": "#/parameters/Environment" + }, + { + "$ref": "#/parameters/Company" + } + ], "responses": { "200": { "description": "Success", @@ -1672,82 +1623,27 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Get Environments", - "tags": [ - "helpers" - ], - "x-ms-visibility": "internal" + } } }, - "/api/1.0/flowdata/delete/bulk": { + "/api/1.0/powerbi": { "post": { - "consumes": [ - "application/json" + "operationId": "GetDataInBulk", + "deprecated": true, + "summary": "Get Data in bulk format (deprecated)", + "tags": [ + "data" ], - "description": "Delete multiple records in Business Central", - "operationId": "DeleteDataBulk", - "parameters": [ - { - "$ref": "#/parameters/Environment" - }, - { - "$ref": "#/parameters/Company" - }, - { - "description": "An array of raw Delete Requests", - "in": "body", - "name": "body", - "required": true, - "schema": { - "items": { - "title": "DeleteRequest", - "type": "object" - }, - "title": "DeleteRequests", - "type": "array" - }, - "x-ms-summary": "DeleteRequest", - "x-ms-visibility": "important" - } + "consumes": [ + "application/json" ], "produces": [ "application/json" ], - "responses": { - "200": { - "description": "Success" - }, - "400": { - "$ref": "#/responses/Unexpected" - }, - "401": { - "$ref": "#/responses/Unauthorized" - }, - "402": { - "$ref": "#/responses/InvalidLicense" - }, - "404": { - "$ref": "#/responses/NotFound" - }, - "500": { - "$ref": "#/responses/Unexpected" - } + "description": "Get data from Business Central for a table in bulk format. (deprecated)", + "x-ms-pageable": { + "nextLinkName": "nextLink" }, - "summary": "Delete Data Bulk", - "tags": [ - "data", - "bulk" - ] - } - }, - "/api/1.0/flowdata/delete/{Table}/{SystemId}": { - "delete": { - "consumes": [ - "application/json" - ], - "description": "Delete data from Business Central by it's unique id", - "operationId": "DeleteData", "parameters": [ { "$ref": "#/parameters/Environment" @@ -1756,18 +1652,173 @@ "$ref": "#/parameters/Company" }, { - "$ref": "#/parameters/TablePath" + "$ref": "#/parameters/Language" }, { - "$ref": "#/parameters/SystemId" + "name": "useNextPageLink", + "in": "query", + "type": "boolean", + "default": true, + "x-ms-visibility": "internal", + "required": true + }, + { + "name": "body", + "in": "body", + "description": "Request", + "x-ms-summary": "Request", + "required": true, + "schema": { + "type": "object", + "properties": { + "Take": { + "type": "integer", + "default": 2 + }, + "Table": { + "type": "integer", + "format": "int32", + "description": "TableId", + "title": "", + "x-ms-visibility": "important", + "x-ms-dynamic-values": { + "operationId": "GetTables", + "value-path": "id", + "value-title": "name", + "parameters": { + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + } + }, + "Fields": { + "type": "array", + "items": { + "type": "integer", + "format": "int32", + "description": "A field from the selected table", + "x-ms-summary": "Field", + "title": "", + "x-ms-dynamic-values": { + "operationId": "GetFields", + "value-path": "id", + "value-title": "name", + "parameters": { + "Table": { + "parameter": "Table" + }, + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + }, + "x-ms-dynamic-list": { + "operationId": "GetFields", + "itemValuePath": "id", + "itemTitlePath": "name", + "parameters": { + "Table": { + "parameterReference": "body/Table" + }, + "Environment": { + "parameterReference": "Environment" + }, + "Company": { + "parameterReference": "Company" + } + } + } + }, + "x-ms-summary": "Select", + "description": "Select a field you want to retrieve" + }, + "Filters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Field": { + "type": "integer", + "format": "int32", + "description": "A field from the selected table", + "x-ms-summary": "Field", + "title": "", + "x-ms-dynamic-values": { + "operationId": "GetFields", + "value-path": "id", + "value-title": "name", + "parameters": { + "Table": { + "parameter": "Table" + }, + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + }, + "x-ms-dynamic-list": { + "operationId": "GetFields", + "itemValuePath": "id", + "itemTitlePath": "name", + "parameters": { + "Table": { + "parameterReference": "body/Table" + }, + "Environment": { + "parameterReference": "Environment" + }, + "Company": { + "parameterReference": "Company" + } + } + } + }, + "Filter": { + "type": "string", + "x-ms-summary": "Filter", + "description": "A valid Business Central filter value", + "x-ms-visibility": "advanced" + } + } + }, + "x-ms-summary": "Filterfields", + "description": "Field with filters that will be applied when retrieving data" + } + } + } } ], - "produces": [ - "application/json" - ], "responses": { "200": { - "description": "Success" + "description": "Success", + "schema": { + "type": "object", + "description": "Response", + "title": "Response", + "x-ms-summary": "Response", + "properties": { + "nextPageLink": { + "type": "string" + }, + "value": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + } + } }, "400": { "$ref": "#/responses/Unexpected" @@ -1784,20 +1835,23 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Delete Data", - "tags": [ - "data" - ] + } } }, "/api/1.0/flowdata/get": { "post": { + "operationId": "GetData", + "summary": "Get Data", + "tags": [ + "data" + ], "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "description": "Get data from Business Central for specific tables", - "operationId": "GetData", "parameters": [ { "$ref": "#/parameters/Environment" @@ -1809,71 +1863,68 @@ "$ref": "#/parameters/Language" }, { - "description": "Request", - "in": "body", "name": "body", + "in": "body", + "description": "Request", + "x-ms-summary": "Request", "required": true, "schema": { "$ref": "#/definitions/ReadRequest" }, - "x-ms-summary": "Request", "x-ms-visibility": "important" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "Success", "schema": { + "type": "object", "description": "Response", - "properties": {}, "title": "Response", - "type": "object", - "x-ms-dynamic-properties": { - "itemValuePath": "schema", + "x-ms-summary": "Response", + "properties": {}, + "x-ms-dynamic-schema": { "operationId": "GetReadRequestByIdSchema", "parameters": { - "Company": { - "parameterReference": "Company" - }, "Environment": { - "parameterReference": "Environment" - }, - "body/fields": { - "parameterReference": "body/fields" + "parameter": "Environment" }, - "body/name": { - "parameterReference": "body/name" + "Company": { + "parameter": "Company" }, - "body/table": { - "parameterReference": "body/table" - } - } - }, - "x-ms-dynamic-schema": { - "operationId": "GetReadRequestByIdSchema", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" + "table": { + "parameter": "table" }, "fields": { "parameter": "fields" }, "name": { "parameter": "name" - }, - "table": { - "parameter": "table" } }, "value-path": "schema" }, - "x-ms-summary": "Response" + "x-ms-dynamic-properties": { + "operationId": "GetReadRequestByIdSchema", + "parameters": { + "Environment": { + "parameterReference": "Environment" + }, + "Company": { + "parameterReference": "Company" + }, + "body/table": { + "parameterReference": "body/table" + }, + "body/fields": { + "parameterReference": "body/fields" + }, + "body/name": { + "parameterReference": "body/name" + } + }, + "itemValuePath": "schema" + } } }, "400": { @@ -1891,20 +1942,23 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Get Data", - "tags": [ - "data" - ] + } } }, - "/api/1.0/flowdata/get/complex": { + "/api/1.0/flowdata/get/{SystemId}": { "post": { + "operationId": "GetDataById", + "summary": "Get Data by Id", + "description": "Get data from Business Central for a specific table and record", + "tags": [ + "data" + ], "consumes": [ "application/json" ], - "description": "Get data from Business Central with a raw JSON request", - "operationId": "GetDataRaw", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/Environment" @@ -1916,44 +1970,71 @@ "$ref": "#/parameters/Language" }, { - "description": "Request", - "in": "body", "name": "body", + "in": "body", + "description": "Request", + "x-ms-summary": "Request", "required": true, "schema": { - "type": "object" + "$ref": "#/definitions/ReadRequestSimple" }, - "x-ms-summary": "Request", "x-ms-visibility": "important" + }, + { + "$ref": "#/parameters/SystemId" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "Success", "schema": { + "type": "object", "description": "Response", - "properties": {}, "title": "Response", - "type": "object", + "x-ms-summary": "Response", + "properties": {}, "x-ms-dynamic-schema": { - "operationId": "GetReadRequestSchema", + "operationId": "GetReadRequestByIdSchemaForId", "parameters": { + "Environment": { + "parameter": "Environment" + }, "Company": { "parameter": "Company" }, - "Environment": { - "parameter": "Environment" + "SystemId": { + "parameter": "SystemId" }, - "body": { - "parameter": "body" + "table": { + "parameter": "table" + }, + "fields": { + "parameter": "fields" } }, "value-path": "schema" }, - "x-ms-summary": "Response" + "x-ms-dynamic-properties": { + "operationId": "GetReadRequestByIdSchemaForId", + "parameters": { + "Environment": { + "parameterReference": "Environment" + }, + "Company": { + "parameterReference": "Company" + }, + "SystemId": { + "parameterReference": "SystemId" + }, + "body/table": { + "parameterReference": "body/table" + }, + "body/fields": { + "parameterReference": "body/fields" + } + }, + "itemValuePath": "schema" + } } }, "400": { @@ -1971,20 +2052,23 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Get Data (Complex)", - "tags": [ - "data" - ] + } } }, - "/api/1.0/flowdata/get/{SystemId}": { + "/api/1.0/flowdata/get/complex": { "post": { + "operationId": "GetDataRaw", + "summary": "Get Data (Complex)", + "tags": [ + "data" + ], "consumes": [ "application/json" ], - "description": "Get data from Business Central for a specific table and record", - "operationId": "GetDataById", + "produces": [ + "application/json" + ], + "description": "Get data from Business Central with a raw JSON request", "parameters": [ { "$ref": "#/parameters/Environment" @@ -1996,74 +2080,41 @@ "$ref": "#/parameters/Language" }, { - "description": "Request", - "in": "body", "name": "body", + "in": "body", + "description": "Request", + "x-ms-summary": "Request", "required": true, "schema": { - "$ref": "#/definitions/ReadRequestSimple" + "type": "object" }, - "x-ms-summary": "Request", "x-ms-visibility": "important" - }, - { - "$ref": "#/parameters/SystemId" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "Success", "schema": { + "type": "object", "description": "Response", - "properties": {}, + "x-ms-summary": "Response", "title": "Response", - "type": "object", - "x-ms-dynamic-properties": { - "itemValuePath": "schema", - "operationId": "GetReadRequestByIdSchemaForId", - "parameters": { - "Company": { - "parameterReference": "Company" - }, - "Environment": { - "parameterReference": "Environment" - }, - "SystemId": { - "parameterReference": "SystemId" - }, - "body/fields": { - "parameterReference": "body/fields" - }, - "body/table": { - "parameterReference": "body/table" - } - } - }, + "properties": {}, "x-ms-dynamic-schema": { - "operationId": "GetReadRequestByIdSchemaForId", + "operationId": "GetReadRequestSchema", "parameters": { - "Company": { - "parameter": "Company" - }, "Environment": { "parameter": "Environment" }, - "SystemId": { - "parameter": "SystemId" - }, - "fields": { - "parameter": "fields" + "Company": { + "parameter": "Company" }, - "table": { - "parameter": "table" + "body": { + "parameter": "body" } }, "value-path": "schema" - }, - "x-ms-summary": "Response" + } } }, "400": { @@ -2081,20 +2132,23 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Get Data by Id", - "tags": [ - "data" - ] + } } }, "/api/1.0/flowdata/insert": { "post": { + "operationId": "CreateData", + "summary": "Insert Data", + "description": "Insert data into a specific Business Central table", + "tags": [ + "data" + ], "consumes": [ "application/json" ], - "description": "Insert data into a specific Business Central table", - "operationId": "CreateData", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/Environment" @@ -2106,32 +2160,29 @@ "$ref": "#/parameters/Language" }, { - "description": "Request", - "in": "body", "name": "body", + "in": "body", + "description": "Request", + "x-ms-summary": "Request", "required": true, "schema": { "$ref": "#/definitions/CreateRequest" }, - "x-ms-summary": "Request", "x-ms-visibility": "important" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "Success", "schema": { + "title": "Response", + "type": "object", "properties": { "SystemId": { "title": "System Id", "type": "string" } - }, - "title": "Response", - "type": "object" + } } }, "400": { @@ -2149,20 +2200,23 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Insert Data", - "tags": [ - "data" - ] + } } }, - "/api/1.0/flowdata/insert/bulk": { - "post": { + "/api/1.0/flowdata/upsert": { + "put": { + "operationId": "UpsertData", + "summary": "Upsert Data", + "description": "Upsert data into a specific Business Central table", + "tags": [ + "data" + ], "consumes": [ "application/json" ], - "description": "Insert multiple records into Business Central", - "operationId": "CreateDataBulk", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/Environment" @@ -2174,35 +2228,29 @@ "$ref": "#/parameters/Language" }, { - "description": "An array of raw Create Requests", - "in": "body", "name": "body", + "in": "body", + "description": "Request", + "x-ms-summary": "Request", "required": true, "schema": { - "items": { - "title": "CreateRequest", - "type": "object" - }, - "title": "CreateRequests", - "type": "array" + "$ref": "#/definitions/CreateRequest" }, - "x-ms-summary": "CreateRequest", "x-ms-visibility": "important" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "Success", "schema": { - "items": { - "title": "System Id", - "type": "string" - }, - "title": "Responses", - "type": "array" + "title": "Response", + "type": "object", + "properties": { + "SystemId": { + "title": "System Id", + "type": "string" + } + } } }, "400": { @@ -2220,21 +2268,23 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Insert Data Bulk", - "tags": [ - "data", - "bulk" - ] + } } }, "/api/1.0/flowdata/insert/complex": { "post": { + "operationId": "CreateDataComplex", + "summary": "Insert Data (Complex)", + "description": "Insert data into a specific Business Central table", + "tags": [ + "data" + ], "consumes": [ "application/json" ], - "description": "Insert data into a specific Business Central table", - "operationId": "CreateDataComplex", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/Environment" @@ -2246,32 +2296,29 @@ "$ref": "#/parameters/Language" }, { - "description": "The raw JSON CreateRequest object", - "in": "body", "name": "body", + "in": "body", "required": true, "schema": { "type": "object" }, + "x-ms-visibility": "important", "x-ms-summary": "JSON Object", - "x-ms-visibility": "important" + "description": "The raw JSON CreateRequest object" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "Success", "schema": { + "title": "Response", + "type": "object", "properties": { "SystemId": { "title": "System Id", "type": "string" } - }, - "title": "Response", - "type": "object" + } } }, "400": { @@ -2289,20 +2336,23 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Insert Data (Complex)", - "tags": [ - "data" - ] + } } }, - "/api/1.0/flowdata/update": { - "patch": { + "/api/1.0/flowdata/upsert/complex": { + "put": { + "operationId": "UpsertDataComplex", + "summary": "Upsert Data (Complex)", + "description": "Upsert data into a specific Business Central table", + "tags": [ + "data" + ], "consumes": [ "application/json" ], - "description": "Update a record in Business Central for a specific table", - "operationId": "UpdateData", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/Environment" @@ -2314,21 +2364,30 @@ "$ref": "#/parameters/Language" }, { - "in": "body", "name": "body", + "in": "body", "required": true, "schema": { - "$ref": "#/definitions/UpdateRequest" + "type": "object" }, - "x-ms-visibility": "important" + "x-ms-visibility": "important", + "x-ms-summary": "JSON Object", + "description": "The raw JSON CreateRequest object" } ], - "produces": [ - "application/json" - ], "responses": { "200": { - "description": "Success" + "description": "Success", + "schema": { + "title": "Response", + "type": "object", + "properties": { + "SystemId": { + "title": "System Id", + "type": "string" + } + } + } }, "400": { "$ref": "#/responses/Unexpected" @@ -2345,20 +2404,24 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Update Data", - "tags": [ - "data" - ] + } } }, - "/api/1.0/flowdata/update/bulk": { - "patch": { + "/api/1.0/flowdata/insert/bulk": { + "post": { + "operationId": "CreateDataBulk", + "summary": "Insert Data Bulk", + "description": "Insert multiple records into Business Central", + "tags": [ + "data", + "bulk" + ], "consumes": [ "application/json" ], - "description": "Update multiple records in Business Central", - "operationId": "UpdateDataBulk", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/Environment" @@ -2370,28 +2433,33 @@ "$ref": "#/parameters/Language" }, { - "description": "An array of raw Update Requests", - "in": "body", "name": "body", + "in": "body", "required": true, "schema": { + "title": "CreateRequests", + "type": "array", "items": { - "title": "UpdateRequest", + "title": "CreateRequest", "type": "object" - }, - "title": "UpdateRequests", - "type": "array" + } }, - "x-ms-summary": "UpdateRequest", - "x-ms-visibility": "important" + "x-ms-visibility": "important", + "x-ms-summary": "CreateRequest", + "description": "An array of raw Create Requests" } ], - "produces": [ - "application/json" - ], "responses": { "200": { - "description": "Success" + "description": "Success", + "schema": { + "title": "Responses", + "type": "array", + "items": { + "title": "System Id", + "type": "string" + } + } }, "400": { "$ref": "#/responses/Unexpected" @@ -2408,21 +2476,24 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Update Data Bulk", + } + } + }, + "/api/1.0/flowdata/upsert/bulk": { + "put": { + "operationId": "UpsertDataBulk", + "summary": "Upsert Data (Bulk)", + "description": "Upsert multiple records into Business Central", "tags": [ "data", "bulk" - ] - } - }, - "/api/1.0/flowdata/update/complex": { - "patch": { + ], "consumes": [ "application/json" ], - "description": "Update a record in Business Central for a specific table", - "operationId": "UpdateDataComplex", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/Environment" @@ -2434,23 +2505,33 @@ "$ref": "#/parameters/Language" }, { - "description": "The raw JSON UpdateRequest object", - "in": "body", "name": "body", + "in": "body", "required": true, "schema": { - "type": "object" + "title": "CreateRequests", + "type": "array", + "items": { + "title": "CreateRequest", + "type": "object" + } }, - "x-ms-summary": "JSON Object", - "x-ms-visibility": "important" + "x-ms-visibility": "important", + "x-ms-summary": "CreateRequest", + "description": "An array of raw Create Requests" } ], - "produces": [ - "application/json" - ], "responses": { "200": { - "description": "Success" + "description": "Success", + "schema": { + "title": "Responses", + "type": "array", + "items": { + "title": "System Id", + "type": "string" + } + } }, "400": { "$ref": "#/responses/Unexpected" @@ -2467,20 +2548,23 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Update Data Complex", - "tags": [ - "data" - ] + } } }, - "/api/1.0/flowdata/upsert": { - "put": { + "/api/1.0/flowdata/update": { + "patch": { + "operationId": "UpdateData", + "summary": "Update Data", + "description": "Update a record in Business Central for a specific table", + "tags": [ + "data" + ], "consumes": [ "application/json" ], - "description": "Upsert data into a specific Business Central table", - "operationId": "UpsertData", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/Environment" @@ -2492,33 +2576,18 @@ "$ref": "#/parameters/Language" }, { - "description": "Request", - "in": "body", "name": "body", + "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CreateRequest" + "$ref": "#/definitions/UpdateRequest" }, - "x-ms-summary": "Request", "x-ms-visibility": "important" } ], - "produces": [ - "application/json" - ], "responses": { "200": { - "description": "Success", - "schema": { - "properties": { - "SystemId": { - "title": "System Id", - "type": "string" - } - }, - "title": "Response", - "type": "object" - } + "description": "Success" }, "400": { "$ref": "#/responses/Unexpected" @@ -2535,20 +2604,23 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Upsert Data", - "tags": [ - "data" - ] + } } }, - "/api/1.0/flowdata/upsert/bulk": { - "put": { + "/api/1.0/flowdata/update/complex": { + "patch": { + "operationId": "UpdateDataComplex", + "summary": "Update Data Complex", + "description": "Update a record in Business Central for a specific table", + "tags": [ + "data" + ], "consumes": [ "application/json" ], - "description": "Upsert multiple records into Business Central", - "operationId": "UpsertDataBulk", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/Environment" @@ -2560,36 +2632,20 @@ "$ref": "#/parameters/Language" }, { - "description": "An array of raw Create Requests", - "in": "body", "name": "body", + "in": "body", "required": true, "schema": { - "items": { - "title": "CreateRequest", - "type": "object" - }, - "title": "CreateRequests", - "type": "array" + "type": "object" }, - "x-ms-summary": "CreateRequest", - "x-ms-visibility": "important" + "x-ms-visibility": "important", + "x-ms-summary": "JSON Object", + "description": "The raw JSON UpdateRequest object" } ], - "produces": [ - "application/json" - ], "responses": { "200": { - "description": "Success", - "schema": { - "items": { - "title": "System Id", - "type": "string" - }, - "title": "Responses", - "type": "array" - } + "description": "Success" }, "400": { "$ref": "#/responses/Unexpected" @@ -2606,21 +2662,24 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Upsert Data (Bulk)", + } + } + }, + "/api/1.0/flowdata/update/bulk": { + "patch": { + "operationId": "UpdateDataBulk", + "summary": "Update Data Bulk", + "description": "Update multiple records in Business Central", "tags": [ "data", "bulk" - ] - } - }, - "/api/1.0/flowdata/upsert/complex": { - "put": { + ], "consumes": [ "application/json" ], - "description": "Upsert data into a specific Business Central table", - "operationId": "UpsertDataComplex", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/Environment" @@ -2632,33 +2691,25 @@ "$ref": "#/parameters/Language" }, { - "description": "The raw JSON CreateRequest object", - "in": "body", "name": "body", + "in": "body", "required": true, "schema": { - "type": "object" + "title": "UpdateRequests", + "type": "array", + "items": { + "title": "UpdateRequest", + "type": "object" + } }, - "x-ms-summary": "JSON Object", - "x-ms-visibility": "important" + "x-ms-visibility": "important", + "x-ms-summary": "UpdateRequest", + "description": "An array of raw Update Requests" } ], - "produces": [ - "application/json" - ], "responses": { "200": { - "description": "Success", - "schema": { - "properties": { - "SystemId": { - "title": "System Id", - "type": "string" - } - }, - "title": "Response", - "type": "object" - } + "description": "Success" }, "400": { "$ref": "#/responses/Unexpected" @@ -2675,34 +2726,23 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Upsert Data (Complex)", - "tags": [ - "data" - ] - } - }, - "/api/1.0/hooks": { - "x-ms-notification-content": { - "description": "This is the system id is that is send back", - "schema": { - "properties": { - "SystemId": { - "description": "SystemId", - "type": "string" - } - }, - "type": "object" } } }, - "/api/1.0/hooks/create": { - "post": { + "/api/1.0/flowdata/delete/{Table}/{SystemId}": { + "delete": { + "operationId": "DeleteData", + "summary": "Delete Data", + "description": "Delete data from Business Central by it's unique id", + "tags": [ + "data" + ], "consumes": [ "application/json" ], - "description": "A record is created in Business Central", - "operationId": "RecordCreated", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/Environment" @@ -2711,54 +2751,15 @@ "$ref": "#/parameters/Company" }, { - "in": "body", - "name": "body", - "required": true, - "schema": { - "properties": { - "CallbackUrl": { - "description": "CallbackUrl", - "title": "", - "type": "string", - "x-ms-notification-url": true, - "x-ms-visibility": "internal" - }, - "TableId": { - "description": "TableId", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-values": { - "operationId": "GetTables", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-visibility": "important" - } - }, - "required": [ - "CallbackUrl", - "TableId" - ], - "type": "object" - } + "$ref": "#/parameters/TablePath" + }, + { + "$ref": "#/parameters/SystemId" } ], - "produces": [ - "application/json" - ], "responses": { "200": { - "description": "Success", - "schema": {} + "description": "Success" }, "400": { "$ref": "#/responses/Unexpected" @@ -2775,33 +2776,24 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Triggers when a record is created", - "tags": [ - "triggers" - ], - "x-ms-trigger": "single" - }, - "x-ms-notification-content": { - "description": "This is the system id is that is send back", - "schema": { - "properties": { - "SystemId": { - "description": "SystemId", - "type": "string" - } - }, - "type": "object" } } }, - "/api/1.0/hooks/delete": { + "/api/1.0/flowdata/delete/bulk": { "post": { + "operationId": "DeleteDataBulk", + "summary": "Delete Data Bulk", + "description": "Delete multiple records in Business Central", + "tags": [ + "data", + "bulk" + ], "consumes": [ "application/json" ], - "description": "A record is deleted in Business Central", - "operationId": "RecordDeleted", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/Environment" @@ -2810,51 +2802,25 @@ "$ref": "#/parameters/Company" }, { - "in": "body", "name": "body", + "in": "body", "required": true, "schema": { - "properties": { - "CallbackUrl": { - "description": "CallbackUrl", - "title": "", - "type": "string", - "x-ms-notification-url": true, - "x-ms-visibility": "internal" - }, - "TableId": { - "description": "TableId", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-values": { - "operationId": "GetTables", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-visibility": "important" - } - }, - "required": [ - "CallbackUrl", - "TableId" - ], - "type": "object" - } + "title": "DeleteRequests", + "type": "array", + "items": { + "title": "DeleteRequest", + "type": "object" + } + }, + "x-ms-visibility": "important", + "x-ms-summary": "DeleteRequest", + "description": "An array of raw Delete Requests" } ], "responses": { "200": { - "description": "default", - "schema": {} + "description": "Success" }, "400": { "$ref": "#/responses/Unexpected" @@ -2871,33 +2837,24 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Triggers when a record is deleted", - "tags": [ - "triggers" - ], - "x-ms-trigger": "single" - }, - "x-ms-notification-content": { - "description": "This is the system id is that is send back", - "schema": { - "properties": { - "SystemId": { - "description": "SystemId", - "type": "string" - } - }, - "type": "object" } } }, - "/api/1.0/hooks/update": { - "post": { + "/api/1.0/TransformXml/{Configuration}": { + "get": { + "operationId": "GetXmlDocument", + "deprecated": true, + "summary": "Get Xml (deprecated)", + "description": "Get data based on passed configuration and returns the data in (deprecated) the XML format set in the configuration", + "tags": [ + "xml" + ], "consumes": [ "application/json" ], - "description": "A record is updated in Business Central", - "operationId": "RecordUpdated", + "produces": [ + "text/plain" + ], "parameters": [ { "$ref": "#/parameters/Environment" @@ -2906,50 +2863,9 @@ "$ref": "#/parameters/Company" }, { - "in": "body", - "name": "body", - "required": true, - "schema": { - "properties": { - "CallbackUrl": { - "description": "CallbackUrl", - "title": "", - "type": "string", - "x-ms-notification-url": true, - "x-ms-visibility": "internal" - }, - "TableId": { - "description": "TableId", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-values": { - "operationId": "GetTables", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-visibility": "important" - } - }, - "required": [ - "CallbackUrl", - "TableId" - ], - "type": "object" - } + "$ref": "#/parameters/Configuration" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "Success", @@ -2970,49 +2886,36 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Triggers when a record is updated", - "tags": [ - "triggers" - ], - "x-ms-trigger": "single" - }, - "x-ms-notification-content": { - "description": "This is the system id is that is send back", - "schema": { - "properties": { - "SystemId": { - "description": "SystemId", - "type": "string" - } - }, - "type": "object" } } }, - "/api/1.0/hooks/{Id}": { - "delete": { - "description": "Deletes a webhook,", - "operationId": "DeleteTrigger", + "/api/1.0/TransformXml/{Configuration}/{SystemId}": { + "get": { + "operationId": "GetXmlDocumentById", + "deprecated": true, + "summary": "Get Xml by Id (deprecated)", + "description": "Get data by SystemId based on passed configuration and returns the data in the XML format set in the configuration (deprecated)", + "tags": [ + "xml" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "text/plain" + ], "parameters": [ { - "in": "query", - "name": "environment", - "required": true, - "type": "string" + "$ref": "#/parameters/Environment" }, { - "in": "query", - "name": "company", - "required": true, - "type": "string" + "$ref": "#/parameters/Company" }, { - "description": "The id of the registered webhook", - "in": "path", - "name": "Id", - "required": true, - "type": "string" + "$ref": "#/parameters/Configuration" + }, + { + "$ref": "#/parameters/SystemId" } ], "responses": { @@ -3035,51 +2938,39 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Deletes a registration webhook from the Business Central environment", - "tags": [ - "triggers" - ], - "x-ms-visibility": "internal" + } } }, - "/api/1.0/language": { + "/api/1.0/TransformXml/{Configuration}/metadata": { "get": { + "operationId": "GetXmlDocumentWithMetadata", + "deprecated": true, + "summary": "Get Xml with metadata (deprecated)", + "description": "Get data with metadata based on passed configuration and returns the data in the XML format set in the configuration (deprecated)", + "tags": [ + "xml" + ], "consumes": [ "application/json" ], - "description": "Get a list of available languages from Business Central", - "operationId": "GetLanguages", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/Environment" }, { "$ref": "#/parameters/Company" + }, + { + "$ref": "#/parameters/Configuration" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "Success", - "schema": { - "items": { - "properties": { - "id": { - "description": "id", - "type": "string" - }, - "name": { - "description": "name", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } + "schema": {} }, "400": { "$ref": "#/responses/Unexpected" @@ -3096,21 +2987,24 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Get Languages", - "tags": [ - "helpers" - ], - "x-ms-visibility": "internal" + } } }, - "/api/1.0/media/{Table}/{Field}/{SystemId}": { - "delete": { + "/api/1.0/TransformXml/{Configuration}/metadata/{SystemId}": { + "get": { + "operationId": "GetXmlDocumentByIdWithMetadata", + "deprecated": true, + "summary": "Get Xml by Id with metadata (deprecated)", + "description": "Get data by Id with metadata based on passed configuration and returns the data in the XML format set in the configuration (deprecated)", + "tags": [ + "xml" + ], "consumes": [ "application/json" ], - "description": "Deletes the media attached to a field in Business Central", - "operationId": "ClearMedia", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/Environment" @@ -3119,10 +3013,7 @@ "$ref": "#/parameters/Company" }, { - "$ref": "#/parameters/TablePath" - }, - { - "$ref": "#/parameters/MediaFields" + "$ref": "#/parameters/Configuration" }, { "$ref": "#/parameters/SystemId" @@ -3148,18 +3039,24 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Delete Media", + } + } + }, + "/api/1.0/TransformXml/{Configuration}/": { + "post": { + "operationId": "PostTransformXml", + "deprecated": true, + "summary": "Process Xml (deprecated)", + "description": "Imports and transforms XML into Business Central data using a specific configuration (deprecated)", "tags": [ - "media" - ] - }, - "get": { + "xml" + ], "consumes": [ "application/json" ], - "description": "Retrieves a file from Business Central by it's Id", - "operationId": "GetMedia", + "produces": [ + "text/plain" + ], "parameters": [ { "$ref": "#/parameters/Environment" @@ -3168,13 +3065,21 @@ "$ref": "#/parameters/Company" }, { - "$ref": "#/parameters/TablePath" - }, - { - "$ref": "#/parameters/MediaFields" + "$ref": "#/parameters/Configuration" }, { - "$ref": "#/parameters/SystemId" + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "data": { + "type": "string", + "description": "data" + } + } + } } ], "responses": { @@ -3197,22 +3102,25 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Get Media", + } + } + }, + "/api/1.0/TransformCsv/{Configuration}": { + "get": { + "operationId": "GetCsvDocument", + "deprecated": true, + "summary": "Get Csv (deprecated)", + "description": "Get data based on passed configuration and returns the data in the CSV format set in the configuration (deprecated)", "tags": [ - "media" - ] - }, - "patch": { + "csv" + ], "consumes": [ "application/json" ], - "description": "Updates a file in Business Central by it's Id", - "operationId": "PatchMedia", + "produces": [ + "text/plain" + ], "parameters": [ - { - "$ref": "#/parameters/ContentTypeBinary" - }, { "$ref": "#/parameters/Environment" }, @@ -3220,25 +3128,13 @@ "$ref": "#/parameters/Company" }, { - "$ref": "#/parameters/TablePath" - }, - { - "$ref": "#/parameters/MediaFields" + "$ref": "#/parameters/Configuration" }, { - "$ref": "#/parameters/SystemId" + "$ref": "#/parameters/CsvDelimiter" }, { - "description": "The file contents the be saved as bytes", - "in": "body", - "name": "FileContent", - "required": true, - "schema": { - "format": "binary", - "type": "string" - }, - "x-ms-summary": "File Contents", - "x-ms-visibility": "important" + "$ref": "#/parameters/CsvHeaders" } ], "responses": { @@ -3261,20 +3157,24 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Update Media", - "tags": [ - "media" - ] + } } }, - "/api/1.0/powerbi": { - "post": { + "/api/1.0/TransformCsv/{Configuration}/{SystemId}": { + "get": { + "operationId": "GetCsvDocumentById", + "deprecated": true, + "summary": "Get Csv by Id (deprecated)", + "description": "Get data by SystemId based on passed configuration and returns the data in the CSV format set in the configuration (deprecated)", + "tags": [ + "csv" + ], "consumes": [ "application/json" ], - "description": "Get data from Business Central for a table in bulk format.", - "operationId": "GetDataInBulk", + "produces": [ + "text/plain" + ], "parameters": [ { "$ref": "#/parameters/Environment" @@ -3283,176 +3183,22 @@ "$ref": "#/parameters/Company" }, { - "$ref": "#/parameters/Language" + "$ref": "#/parameters/Configuration" }, { - "default": true, - "in": "query", - "name": "useNextPageLink", - "required": true, - "type": "boolean", - "x-ms-visibility": "internal" + "$ref": "#/parameters/SystemId" }, { - "description": "Request", - "in": "body", - "name": "body", - "required": true, - "schema": { - "properties": { - "Fields": { - "description": "Select a field you want to retrieve", - "items": { - "description": "A field from the selected table", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-list": { - "itemTitlePath": "name", - "itemValuePath": "id", - "operationId": "GetFields", - "parameters": { - "Company": { - "parameterReference": "Company" - }, - "Environment": { - "parameterReference": "Environment" - }, - "Table": { - "parameterReference": "body/Table" - } - } - }, - "x-ms-dynamic-values": { - "operationId": "GetFields", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - }, - "Table": { - "parameter": "Table" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-summary": "Field" - }, - "type": "array", - "x-ms-summary": "Select" - }, - "Filters": { - "description": "Field with filters that will be applied when retrieving data", - "items": { - "properties": { - "Field": { - "description": "A field from the selected table", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-list": { - "itemTitlePath": "name", - "itemValuePath": "id", - "operationId": "GetFields", - "parameters": { - "Company": { - "parameterReference": "Company" - }, - "Environment": { - "parameterReference": "Environment" - }, - "Table": { - "parameterReference": "body/Table" - } - } - }, - "x-ms-dynamic-values": { - "operationId": "GetFields", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - }, - "Table": { - "parameter": "Table" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-summary": "Field" - }, - "Filter": { - "description": "A valid Business Central filter value", - "type": "string", - "x-ms-summary": "Filter", - "x-ms-visibility": "advanced" - } - }, - "type": "object" - }, - "type": "array", - "x-ms-summary": "Filterfields" - }, - "Table": { - "description": "TableId", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-values": { - "operationId": "GetTables", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-visibility": "important" - }, - "Take": { - "default": 2, - "type": "integer" - } - }, - "type": "object" - }, - "x-ms-summary": "Request" + "$ref": "#/parameters/CsvDelimiter" + }, + { + "$ref": "#/parameters/CsvHeaders" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "Success", - "schema": { - "description": "Response", - "properties": { - "nextPageLink": { - "type": "string" - }, - "value": { - "items": { - "items": {}, - "type": "array" - }, - "type": "array" - } - }, - "title": "Response", - "type": "object", - "x-ms-summary": "Response" - } + "schema": {} }, "400": { "$ref": "#/responses/Unexpected" @@ -3469,40 +3215,45 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Get Data in bulk format", - "tags": [ - "data" - ], - "x-ms-pageable": { - "nextLinkName": "nextLink" } } }, - "/api/1.0/reports": { + "/api/1.0/TransformCsv/{Configuration}/metadata": { "get": { + "operationId": "GetCsvDocumentWithMetadata", + "deprecated": true, + "summary": "Get Csv with metadata (deprecated)", + "description": "Get data with metadata based on passed configuration and returns the data in the CSV format set in the configuration (deprecated)", + "tags": [ + "csv" + ], "consumes": [ "application/json" ], - "description": "Get a list of all available reports in Business Central", - "operationId": "GetReports", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/Environment" }, { "$ref": "#/parameters/Company" + }, + { + "$ref": "#/parameters/Configuration" + }, + { + "$ref": "#/parameters/CsvDelimiter" + }, + { + "$ref": "#/parameters/CsvHeaders" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "Success", - "schema": { - "$ref": "#/definitions/KeyValuePairArray" - } + "schema": {} }, "400": { "$ref": "#/responses/Unexpected" @@ -3519,21 +3270,24 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "GetReports", - "tags": [ - "helpers" - ], - "x-ms-visibility": "internal" + } } }, - "/api/1.0/reports/{ReportId}": { + "/api/1.0/TransformCsv/{Configuration}/metadata/{SystemId}": { "get": { + "operationId": "GetCsvDocumentByIdWithMetadata", + "deprecated": true, + "summary": "Get Csv by Id with metadata (deprecated)", + "description": "Get data by Id with metadata based on passed configuration and returns the data in the CSV format set in the configuration (deprecated)", + "tags": [ + "csv" + ], "consumes": [ "application/json" ], - "description": "Gets a report from Business Central on a report ID or a record", - "operationId": "GetReport", + "produces": [ + "application/json" + ], "parameters": [ { "$ref": "#/parameters/Environment" @@ -3542,57 +3296,16 @@ "$ref": "#/parameters/Company" }, { - "$ref": "#/parameters/Language" - }, - { - "description": "The file format to get the report in", - "enum": [ - "Excel", - "Html", - "Pdf", - "Word", - "Xml" - ], - "in": "query", - "name": "Format", - "required": true, - "type": "string", - "x-ms-summary": "Format", - "x-ms-visibility": "important" - }, - { - "$ref": "#/parameters/ReportId" + "$ref": "#/parameters/Configuration" }, { - "description": "The custom layout to use", - "in": "query", - "name": "LayoutCode", - "required": false, - "type": "string", - "x-ms-dynamic-values": { - "operationId": "GetReportLayouts", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - }, - "ReportId": { - "parameter": "ReportId" - } - }, - "value-path": "code", - "value-title": "description" - }, - "x-ms-summary": "Layout", - "x-ms-visibility": "advanced" + "$ref": "#/parameters/SystemId" }, { - "$ref": "#/parameters/TableQuery" + "$ref": "#/parameters/CsvDelimiter" }, { - "$ref": "#/parameters/SystemIdQuery" + "$ref": "#/parameters/CsvHeaders" } ], "responses": { @@ -3615,20 +3328,24 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Get Report", - "tags": [ - "reports" - ] + } } }, - "/api/1.0/reports/{ReportId}/layouts": { - "get": { + "/api/1.0/TransformCsv/{Configuration}/": { + "post": { + "operationId": "PostTransformCsv", + "deprecated": true, + "summary": "Process Csv (deprecated)", + "description": "Imports and transforms CSV into Business Central data using a specific configuration (deprecated)", + "tags": [ + "csv" + ], "consumes": [ "application/json" ], - "description": "Gets a list of all available custom layouts for a report in Business Central", - "operationId": "GetReportLayouts", + "produces": [ + "text/plain" + ], "parameters": [ { "$ref": "#/parameters/Environment" @@ -3637,31 +3354,57 @@ "$ref": "#/parameters/Company" }, { - "$ref": "#/parameters/ReportId" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Success", + "$ref": "#/parameters/Configuration" + }, + { + "name": "body", + "in": "body", + "required": true, "schema": { - "items": { - "properties": { - "code": { - "description": "id", - "type": "string" - }, - "description": { - "description": "name", - "type": "string" - } + "type": "object", + "properties": { + "delimiter": { + "type": "string", + "maxLength": 1, + "x-ms-summary": "Delimiter", + "description": "The delimiter to be used to seperate the columns" }, - "type": "object" + "skipheaderlines": { + "type": "integer", + "x-ms-summary": "Skip Header Lines", + "description": "Set how many header lines you wish to skip", + "x-ms-visibility": "advanced" + }, + "skipfooterlines": { + "type": "integer", + "x-ms-summary": "Skip Footer Lines", + "description": "Set how many footer lines you wish to skip", + "x-ms-visibility": "advanced" + }, + "useheaders": { + "type": "boolean", + "x-ms-summary": "Use Headers", + "description": "If set headers are used in the CSV", + "x-ms-visibility": "advanced" + }, + "data": { + "type": "string", + "description": "The CSV data you wish to process", + "x-ms-summary": "Csv Data" + } }, - "type": "array" - } + "required": [ + "delimiter", + "data" + ] + }, + "x-ms-visibility": "important" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": {} }, "400": { "$ref": "#/responses/Unexpected" @@ -3678,21 +3421,24 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Get Custom Layout", + } + } + }, + "/api/1.0/tables/{Table}/fields": { + "get": { + "operationId": "GetFields", + "summary": "Get the fields of a table", + "description": "Get the fields of a table in Business Central", "tags": [ "helpers" ], - "x-ms-visibility": "internal" - } - }, - "/api/1.0/schema/ReadRequest": { - "post": { "consumes": [ "application/json" ], - "description": "Get schema for readrequest", - "operationId": "GetReadRequestSchema", + "produces": [ + "application/json" + ], + "x-ms-visibility": "internal", "parameters": [ { "$ref": "#/parameters/Environment" @@ -3701,29 +3447,96 @@ "$ref": "#/parameters/Company" }, { - "in": "body", - "name": "body", - "required": true, - "schema": { - "type": "object" - } + "$ref": "#/parameters/TablePath" + }, + { + "name": "$contains", + "in": "query", + "required": false, + "type": "string", + "x-ms-visibility": "advanced", + "x-ms-summary": "Contains", + "description": "A partial text value that the fieldname should contain" + }, + { + "name": "$fieldtypes", + "in": "query", + "required": false, + "type": "string", + "x-ms-visibility": "advanced", + "x-ms-summary": "Field Types", + "description": "A pipe ( | ) separated list of filters used to retrieve only specific field types" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "Success", "schema": { - "description": "The schema for this read request", - "properties": { - "schema": { - "properties": {}, - "type": "object" + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "Id" + }, + "name": { + "type": "string", + "description": "Name" + }, + "fieldtype": { + "type": "string", + "description": "Field Type" + }, + "length": { + "type": "integer", + "format": "int32", + "description": "Length" + }, + "keyposition": { + "type": "integer", + "format": "int32", + "description": "Key Position" + }, + "default": { + "type": "boolean", + "description": "Default" + }, + "isflowfield": { + "type": "boolean", + "description": "Is Flowfield" + }, + "relatedtableid": { + "type": "integer", + "format": "int32", + "description": "Related Table Id" + }, + "relatedfieldid": { + "type": "integer", + "format": "int32", + "description": "Related Field Id" + }, + "options": { + "type": "object", + "properties": { + "0": { + "type": "string", + "description": "0" + }, + "1": { + "type": "string", + "description": "1" + }, + "2": { + "type": "string", + "description": "2" + } + }, + "description": "Options" + } } - }, - "type": "object" + } } }, "400": { @@ -3741,21 +3554,20 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Get schema", - "tags": [ - "helpers" - ], - "x-ms-visibility": "internal" + } } }, - "/api/1.0/schema/ReadRequestById": { - "post": { + "/api/1.0/media/{Table}/{Field}/{SystemId}": { + "get": { + "operationId": "GetMedia", + "summary": "Get Media", + "description": "Retrieves a file from Business Central by it's Id", + "tags": [ + "media" + ], "consumes": [ "application/json" ], - "description": "Get schema for readrequest by id", - "operationId": "GetReadRequestByIdSchema", "parameters": [ { "$ref": "#/parameters/Environment" @@ -3764,31 +3576,19 @@ "$ref": "#/parameters/Company" }, { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ReadRequestSimpleSchema" - }, - "x-ms-visibility": "internal" + "$ref": "#/parameters/TablePath" + }, + { + "$ref": "#/parameters/MediaFields" + }, + { + "$ref": "#/parameters/SystemId" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "Success", - "schema": { - "description": "The schema for this read request", - "properties": { - "schema": { - "properties": {}, - "type": "object" - } - }, - "type": "object" - } + "schema": {} }, "400": { "$ref": "#/responses/Unexpected" @@ -3805,21 +3605,18 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Get schema", + } + }, + "delete": { + "operationId": "ClearMedia", + "summary": "Delete Media", + "description": "Deletes the media attached to a field in Business Central", "tags": [ - "helpers" + "media" ], - "x-ms-visibility": "internal" - } - }, - "/api/1.0/schema/ReadRequestById/{SystemId}": { - "post": { "consumes": [ "application/json" ], - "description": "Get schema for readrequest", - "operationId": "GetReadRequestByIdSchemaForId", "parameters": [ { "$ref": "#/parameters/Environment" @@ -3828,34 +3625,19 @@ "$ref": "#/parameters/Company" }, { - "$ref": "#/parameters/SystemId" + "$ref": "#/parameters/TablePath" }, { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ReadRequestSimpleSchema" - }, - "x-ms-visibility": "internal" + "$ref": "#/parameters/MediaFields" + }, + { + "$ref": "#/parameters/SystemId" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "Success", - "schema": { - "description": "The schema for this read request", - "properties": { - "schema": { - "properties": {}, - "type": "object" - } - }, - "type": "object" - } + "schema": {} }, "400": { "$ref": "#/responses/Unexpected" @@ -3872,54 +3654,54 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Get schema", + } + }, + "patch": { + "operationId": "PatchMedia", + "summary": "Update Media", + "description": "Updates a file in Business Central by it's Id", "tags": [ - "helpers" + "media" ], - "x-ms-visibility": "internal" - } - }, - "/api/1.0/schema/WebhookRequest": { - "post": { "consumes": [ "application/json" ], - "description": "Gets a schema for a webhook response", - "operationId": "GetWebhookRequestSchema", "parameters": [ + { + "$ref": "#/parameters/ContentTypeBinary" + }, { "$ref": "#/parameters/Environment" }, { "$ref": "#/parameters/Company" }, + { + "$ref": "#/parameters/TablePath" + }, + { + "$ref": "#/parameters/MediaFields" + }, + { + "$ref": "#/parameters/SystemId" + }, { "in": "body", - "name": "body", + "name": "FileContent", + "description": "The file contents the be saved as bytes", + "x-ms-summary": "File Contents", "required": true, "schema": { - "$ref": "#/definitions/WebhookSchemaRequest" + "type": "string", + "format": "binary" }, - "x-ms-visibility": "internal" + "x-ms-visibility": "important" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "Success", - "schema": { - "description": "The schema for this webhook", - "properties": { - "schema": { - "properties": {}, - "type": "object" - } - }, - "type": "object" - } + "schema": {} }, "400": { "$ref": "#/responses/Unexpected" @@ -3936,38 +3718,47 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Get schema for webhook", - "tags": [ - "helpers" - ], - "x-ms-visibility": "internal" + } } }, - "/api/1.0/tables": { - "get": { + "/api/3.0/media/update": { + "post": { + "operationId": "UpdateMediaBulk", + "summary": "Update Media (Bulk)", + "description": "Updates one or multiple files in Business Central", + "tags": [ + "media", + "bulk" + ], "consumes": [ "application/json" ], - "description": "Get a list of available tables in Business Central", - "operationId": "GetTables", "parameters": [ { "$ref": "#/parameters/Environment" }, { "$ref": "#/parameters/Company" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "object" + } + }, + "x-ms-visibility": "important", + "x-ms-summary": "JSON Array", + "description": "The raw JSON update media object" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "Success", - "schema": { - "$ref": "#/definitions/KeyValuePairArray" - } + "schema": {} }, "400": { "$ref": "#/responses/Unexpected" @@ -3984,21 +3775,21 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Get Tables", - "tags": [ - "helpers" - ], - "x-ms-visibility": "internal" + } } }, - "/api/1.0/tables/{Table}/fields": { - "get": { + "/api/3.0/media/delete": { + "post": { + "operationId": "DeleteMediaBulk", + "summary": "Delete Media (Bulk)", + "description": "Deletes one or multiple files in Business Central", + "tags": [ + "media", + "bulk" + ], "consumes": [ "application/json" ], - "description": "Get the fields of a table in Business Central", - "operationId": "GetFields", "parameters": [ { "$ref": "#/parameters/Environment" @@ -4007,99 +3798,84 @@ "$ref": "#/parameters/Company" }, { - "$ref": "#/parameters/TablePath" + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "object" + } + }, + "x-ms-visibility": "important", + "x-ms-summary": "JSON Array", + "description": "The raw JSON update media object" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": {} }, - { - "description": "A partial text value that the fieldname should contain", - "in": "query", - "name": "$contains", - "required": false, - "type": "string", - "x-ms-summary": "Contains", - "x-ms-visibility": "advanced" + "400": { + "$ref": "#/responses/Unexpected" }, - { - "description": "A pipe ( | ) separated list of filters used to retrieve only specific field types", - "in": "query", - "name": "$fieldtypes", - "required": false, - "type": "string", - "x-ms-summary": "Field Types", - "x-ms-visibility": "advanced" + "401": { + "$ref": "#/responses/Unauthorized" + }, + "402": { + "$ref": "#/responses/InvalidLicense" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/Unexpected" } + } + } + }, + "/api/1.0/language": { + "get": { + "operationId": "GetLanguages", + "summary": "Get Languages", + "description": "Get a list of available languages from Business Central", + "tags": [ + "helpers" + ], + "consumes": [ + "application/json" ], "produces": [ "application/json" ], + "x-ms-visibility": "internal", + "parameters": [ + { + "$ref": "#/parameters/Environment" + }, + { + "$ref": "#/parameters/Company" + } + ], "responses": { "200": { "description": "Success", "schema": { + "type": "array", "items": { + "type": "object", "properties": { - "default": { - "description": "Default", - "type": "boolean" - }, - "fieldtype": { - "description": "Field Type", - "type": "string" - }, "id": { - "description": "Id", - "format": "int32", - "type": "integer" - }, - "isflowfield": { - "description": "Is Flowfield", - "type": "boolean" - }, - "keyposition": { - "description": "Key Position", - "format": "int32", - "type": "integer" - }, - "length": { - "description": "Length", - "format": "int32", - "type": "integer" + "type": "string", + "description": "id" }, "name": { - "description": "Name", - "type": "string" - }, - "options": { - "description": "Options", - "properties": { - "0": { - "description": "0", - "type": "string" - }, - "1": { - "description": "1", - "type": "string" - }, - "2": { - "description": "2", - "type": "string" - } - }, - "type": "object" - }, - "relatedfieldid": { - "description": "Related Field Id", - "format": "int32", - "type": "integer" - }, - "relatedtableid": { - "description": "Related Table Id", - "format": "int32", - "type": "integer" + "type": "string", + "description": "name" } - }, - "type": "object" - }, - "type": "array" + } + } } }, "400": { @@ -4117,35 +3893,84 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Get the fields of a table", + } + } + }, + "/api/1.0/reports/{ReportId}/layouts": { + "get": { + "operationId": "GetReportLayouts", + "summary": "Get Custom Layout", + "description": "Gets a list of all available custom layouts for a report in Business Central", "tags": [ "helpers" ], - "x-ms-visibility": "internal" - } - }, - "/api/2.0/hooks": { - "x-ms-notification-content": { - "description": "This is the system id is that is send back", - "schema": { - "properties": { - "SystemId": { - "description": "SystemId", - "type": "string" + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "x-ms-visibility": "internal", + "parameters": [ + { + "$ref": "#/parameters/Environment" + }, + { + "$ref": "#/parameters/Company" + }, + { + "$ref": "#/parameters/ReportId" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "id" + }, + "description": { + "type": "string", + "description": "name" + } + } + } } }, - "type": "object" + "400": { + "$ref": "#/responses/Unexpected" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "402": { + "$ref": "#/responses/InvalidLicense" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/Unexpected" + } } } }, - "/api/2.0/hooks/create": { - "post": { + "/api/1.0/reports/{ReportId}": { + "get": { + "operationId": "GetReport", + "summary": "Get Report", + "description": "Gets a report from Business Central on a report ID or a record", + "tags": [ + "reports" + ], "consumes": [ "application/json" ], - "description": "A record is created in Business Central", - "operationId": "RecordCreatedV2", "parameters": [ { "$ref": "#/parameters/Environment" @@ -4154,154 +3979,59 @@ "$ref": "#/parameters/Company" }, { - "in": "body", - "name": "body", + "$ref": "#/parameters/Language" + }, + { + "name": "Format", + "in": "query", "required": true, - "schema": { - "properties": { - "CallbackUrl": { - "description": "CallbackUrl", - "title": "", - "type": "string", - "x-ms-notification-url": true, - "x-ms-visibility": "internal" - }, - "Fields": { - "description": "Select a field you want to retrieve", - "items": { - "description": "A field from the selected table", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-list": { - "itemTitlePath": "name", - "itemValuePath": "id", - "operationId": "GetFields", - "parameters": { - "Company": { - "parameterReference": "Company" - }, - "Environment": { - "parameterReference": "Environment" - }, - "Table": { - "parameterReference": "body/TableId" - } - } - }, - "x-ms-dynamic-values": { - "operationId": "GetFields", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - }, - "Table": { - "parameter": "TableId" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-summary": "Field" - }, - "type": "array", - "x-ms-summary": "Select" - }, - "Filters": { - "description": "Field with filters that will be applied when retrieving data", - "items": { - "properties": { - "Field": { - "description": "A field from the selected table", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-list": { - "itemTitlePath": "name", - "itemValuePath": "id", - "operationId": "GetFields", - "parameters": { - "Company": { - "parameterReference": "Company" - }, - "Environment": { - "parameterReference": "Environment" - }, - "Table": { - "parameterReference": "body/TableId" - } - } - }, - "x-ms-dynamic-values": { - "operationId": "GetFields", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - }, - "Table": { - "parameter": "TableId" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-summary": "Field" - }, - "FilterValue": { - "description": "A valid Business Central filter value", - "type": "string", - "x-ms-summary": "Filter", - "x-ms-visibility": "advanced" - } - }, - "type": "object" - }, - "type": "array", - "x-ms-summary": "Filterfields" + "type": "string", + "enum": [ + "Excel", + "Html", + "Pdf", + "Word", + "Xml" + ], + "x-ms-visibility": "important", + "x-ms-summary": "Format", + "description": "The file format to get the report in" + }, + { + "$ref": "#/parameters/ReportId" + }, + { + "name": "LayoutCode", + "in": "query", + "required": false, + "type": "string", + "x-ms-visibility": "advanced", + "x-ms-summary": "Layout", + "x-ms-dynamic-values": { + "operationId": "GetReportLayouts", + "value-path": "code", + "value-title": "description", + "parameters": { + "Environment": { + "parameter": "Environment" }, - "IsBatch": { - "description": "Receive batches or singular updates", - "type": "boolean", - "x-ms-summary": "Is Batch" + "Company": { + "parameter": "Company" }, - "TableId": { - "description": "TableId", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-values": { - "operationId": "GetTables", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-visibility": "important" + "ReportId": { + "parameter": "ReportId" } - }, - "required": [ - "CallbackUrl", - "TableId" - ], - "type": "object" - } + } + }, + "description": "The custom layout to use" + }, + { + "$ref": "#/parameters/TableQuery" + }, + { + "$ref": "#/parameters/SystemIdQuery" } ], - "produces": [ - "application/json" - ], "responses": { "200": { "description": "Success", @@ -4322,230 +4052,86 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Triggers when a record is created (V2)", + } + } + }, + "/api/1.0/reports": { + "get": { + "operationId": "GetReports", + "summary": "GetReports", + "description": "Get a list of all available reports in Business Central", "tags": [ - "triggers" + "helpers" ], - "x-ms-trigger": "single" - }, - "x-ms-notification-content": { - "description": "This is the data that is send back", - "schema": { - "description": "Response", - "properties": {}, - "title": "Response", - "type": "object", - "x-ms-dynamic-properties": { - "itemValuePath": "schema", - "operationId": "GetWebhookRequestSchema", - "parameters": { - "Company": { - "parameterReference": "Company" - }, - "Environment": { - "parameterReference": "Environment" - }, - "body/fields": { - "parameterReference": "body/Fields" - }, - "body/isBatch": { - "parameterReference": "body/IsBatch" - }, - "body/tableId": { - "parameterReference": "body/TableId" - } + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "x-ms-visibility": "internal", + "parameters": [ + { + "$ref": "#/parameters/Environment" + }, + { + "$ref": "#/parameters/Company" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/KeyValuePairArray" } }, - "x-ms-dynamic-schema": { - "operationId": "GetWebhookRequestSchema", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - }, - "fields": { - "parameter": "Fields" - }, - "isBatch": { - "parameter": "IsBatch" - }, - "tableId": { - "parameter": "TableId" - } - }, - "value-path": "schema" + "400": { + "$ref": "#/responses/Unexpected" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "402": { + "$ref": "#/responses/InvalidLicense" + }, + "404": { + "$ref": "#/responses/NotFound" }, - "x-ms-summary": "Response" + "500": { + "$ref": "#/responses/Unexpected" + } } } }, - "/api/2.0/hooks/delete": { - "post": { + "/api/1.0/actions": { + "get": { + "operationId": "GetActions", + "summary": "GetActions", + "description": "Get a list of all available actions in Business Central", + "tags": [ + "helpers" + ], "consumes": [ "application/json" ], - "description": "A record is deleted in Business Central", - "operationId": "RecordDeletedV2", + "produces": [ + "application/json" + ], + "x-ms-visibility": "internal", "parameters": [ { "$ref": "#/parameters/Environment" }, { "$ref": "#/parameters/Company" - }, - { - "in": "body", - "name": "body", - "required": true, + } + ], + "responses": { + "200": { + "description": "Success", "schema": { - "properties": { - "CallbackUrl": { - "description": "CallbackUrl", - "title": "", - "type": "string", - "x-ms-notification-url": true, - "x-ms-visibility": "internal" - }, - "Fields": { - "description": "Select a field you want to retrieve", - "items": { - "description": "A field from the selected table", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-list": { - "itemTitlePath": "name", - "itemValuePath": "id", - "operationId": "GetFields", - "parameters": { - "Company": { - "parameterReference": "Company" - }, - "Environment": { - "parameterReference": "Environment" - }, - "Table": { - "parameterReference": "body/TableId" - } - } - }, - "x-ms-dynamic-values": { - "operationId": "GetFields", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - }, - "Table": { - "parameter": "TableId" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-summary": "Field" - }, - "type": "array", - "x-ms-summary": "Select" - }, - "Filters": { - "description": "Field with filters that will be applied when retrieving data", - "items": { - "properties": { - "Field": { - "description": "A field from the selected table", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-list": { - "itemTitlePath": "name", - "itemValuePath": "id", - "operationId": "GetFields", - "parameters": { - "Company": { - "parameterReference": "Company" - }, - "Environment": { - "parameterReference": "Environment" - }, - "Table": { - "parameterReference": "body/TableId" - } - } - }, - "x-ms-dynamic-values": { - "operationId": "GetFields", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - }, - "Table": { - "parameter": "TableId" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-summary": "Field" - }, - "FilterValue": { - "description": "A valid Business Central filter value", - "type": "string", - "x-ms-summary": "Filter", - "x-ms-visibility": "advanced" - } - }, - "type": "object" - }, - "type": "array", - "x-ms-summary": "Filterfields" - }, - "IsBatch": { - "description": "Receive batches or singular updates", - "type": "boolean", - "x-ms-summary": "Is Batch" - }, - "TableId": { - "description": "TableId", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-values": { - "operationId": "GetTables", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-visibility": "important" - } - }, - "required": [ - "CallbackUrl", - "TableId" - ], - "type": "object" + "$ref": "#/definitions/KeyValuePairArray" } - } - ], - "responses": { - "200": { - "description": "default", - "schema": {} }, "400": { "$ref": "#/responses/Unexpected" @@ -4562,233 +4148,141 @@ "500": { "$ref": "#/responses/Unexpected" } - }, - "summary": "Triggers when a record is deleted (V2)", + } + }, + "post": { + "operationId": "PerformAction", + "summary": "Perform an action", + "description": "Schedule to perform an action in Business Central", "tags": [ - "triggers" + "actions" ], - "x-ms-trigger": "single" - }, - "x-ms-notification-content": { - "description": "This is the system id is that is send back", - "schema": { - "description": "Response", - "properties": {}, - "title": "Response", - "type": "object", - "x-ms-dynamic-properties": { - "itemValuePath": "schema", - "operationId": "GetWebhookRequestSchema", - "parameters": { - "Company": { - "parameterReference": "Company" - }, - "Environment": { - "parameterReference": "Environment" - }, - "body/fields": { - "parameterReference": "body/Fields" - }, - "body/isBatch": { - "parameterReference": "body/IsBatch" - }, - "body/tableId": { - "parameterReference": "body/TableId" - } + "consumes": [ + "application/json" + ], + "x-ms-visibility": "important", + "parameters": [ + { + "$ref": "#/parameters/Environment" + }, + { + "$ref": "#/parameters/Company" + }, + { + "in": "body", + "name": "body", + "x-ms-summary": "Action Request", + "description": "Action Request", + "required": true, + "schema": { + "$ref": "#/definitions/PerformActionRequest" } + } + ], + "responses": { + "200": { + "description": "Success" }, - "x-ms-dynamic-schema": { - "operationId": "GetWebhookRequestSchema", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - }, - "fields": { - "parameter": "Fields" - }, - "isBatch": { - "parameter": "IsBatch" - }, - "tableId": { - "parameter": "TableId" - } - }, - "value-path": "schema" + "400": { + "$ref": "#/responses/Unexpected" + }, + "401": { + "$ref": "#/responses/Unauthorized" }, - "x-ms-summary": "Response" + "402": { + "$ref": "#/responses/InvalidLicense" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/Unexpected" + } } } }, - "/api/2.0/hooks/update": { - "post": { + "/api/1.0/actions/sync": { + "get": { + "operationId": "GetSynchronousActions", + "summary": "GetSynchronousActions", + "description": "Get a list of all available synchronous actions in Business Central", + "tags": [ + "helpers" + ], "consumes": [ "application/json" ], - "description": "A record is updated in Business Central", - "operationId": "RecordUpdatedV2", + "produces": [ + "application/json" + ], + "x-ms-visibility": "internal", "parameters": [ { "$ref": "#/parameters/Environment" }, { "$ref": "#/parameters/Company" - }, - { - "in": "body", - "name": "body", - "required": true, + } + ], + "responses": { + "200": { + "description": "Success", "schema": { - "properties": { - "CallbackUrl": { - "description": "CallbackUrl", - "title": "", - "type": "string", - "x-ms-notification-url": true, - "x-ms-visibility": "internal" - }, - "Fields": { - "description": "Select a field you want to retrieve", - "items": { - "description": "A field from the selected table", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-list": { - "itemTitlePath": "name", - "itemValuePath": "id", - "operationId": "GetFields", - "parameters": { - "Company": { - "parameterReference": "Company" - }, - "Environment": { - "parameterReference": "Environment" - }, - "Table": { - "parameterReference": "body/TableId" - } - } - }, - "x-ms-dynamic-values": { - "operationId": "GetFields", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - }, - "Table": { - "parameter": "TableId" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-summary": "Field" - }, - "type": "array", - "x-ms-summary": "Select" - }, - "Filters": { - "description": "Field with filters that will be applied when retrieving data", - "items": { - "properties": { - "Field": { - "description": "A field from the selected table", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-list": { - "itemTitlePath": "name", - "itemValuePath": "id", - "operationId": "GetFields", - "parameters": { - "Company": { - "parameterReference": "Company" - }, - "Environment": { - "parameterReference": "Environment" - }, - "Table": { - "parameterReference": "body/TableId" - } - } - }, - "x-ms-dynamic-values": { - "operationId": "GetFields", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - }, - "Table": { - "parameter": "TableId" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-summary": "Field" - }, - "FilterValue": { - "description": "A valid Business Central filter value", - "type": "string", - "x-ms-summary": "Filter", - "x-ms-visibility": "advanced" - } - }, - "type": "object" - }, - "type": "array", - "x-ms-summary": "Filterfields" - }, - "IsBatch": { - "description": "Receive batches or singular updates", - "type": "boolean", - "x-ms-summary": "Is Batch" - }, - "TableId": { - "description": "TableId", - "format": "int32", - "title": "", - "type": "integer", - "x-ms-dynamic-values": { - "operationId": "GetTables", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - } - }, - "value-path": "id", - "value-title": "name" - }, - "x-ms-visibility": "important" - } - }, - "required": [ - "CallbackUrl", - "TableId" - ], - "type": "object" + "type": "string" } + }, + "400": { + "$ref": "#/responses/Unexpected" + }, + "401": { + "$ref": "#/responses/Unauthorized" + }, + "402": { + "$ref": "#/responses/InvalidLicense" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/Unexpected" } + } + }, + "post": { + "operationId": "PerformSynchronousAction", + "summary": "Perform a synchronous action", + "description": "Perform a synchronous action in Business Central", + "tags": [ + "actions" ], - "produces": [ + "consumes": [ "application/json" ], + "x-ms-visibility": "important", + "parameters": [ + { + "$ref": "#/parameters/Environment" + }, + { + "$ref": "#/parameters/Company" + }, + { + "in": "body", + "name": "body", + "x-ms-summary": "Synchronous Action Request", + "description": "Synchronous Action Request", + "required": true, + "schema": { + "$ref": "#/definitions/PerformSynchronousActionRequest" + } + } + ], "responses": { "200": { "description": "Success", - "schema": {} + "schema": { + "type": "string" + } }, "400": { "$ref": "#/responses/Unexpected" @@ -4799,127 +4293,766 @@ "402": { "$ref": "#/responses/InvalidLicense" }, - "404": { - "$ref": "#/responses/NotFound" + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/Unexpected" + } + } + } + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "StatusCode": { + "type": "integer" + }, + "StatusMessage": { + "type": "string" + }, + "Message": { + "type": "string" + } + } + }, + "TableId": { + "type": "integer", + "format": "int32", + "x-ms-summary": "Table", + "description": "The table from Business Central which is used in this request", + "title": "", + "x-ms-dynamic-values": { + "operationId": "GetTables", + "value-path": "id", + "value-title": "name", + "parameters": { + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + } + }, + "FieldId": { + "type": "integer", + "format": "int32", + "description": "A field from the selected table", + "x-ms-summary": "Field", + "title": "", + "x-ms-dynamic-values": { + "operationId": "GetFields", + "value-path": "id", + "value-title": "name", + "parameters": { + "Table": { + "parameter": "table" + }, + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + }, + "x-ms-dynamic-list": { + "operationId": "GetFields", + "itemValuePath": "id", + "itemTitlePath": "name", + "parameters": { + "Table": { + "parameterReference": "body/table" + }, + "Environment": { + "parameterReference": "Environment" + }, + "Company": { + "parameterReference": "Company" + } + } + } + }, + "CodeunitId": { + "type": "integer", + "format": "int32", + "x-ms-summary": "Codeunit", + "description": "The codeunit you wish to execute", + "title": "", + "x-ms-dynamic-values": { + "operationId": "GetActions", + "value-path": "id", + "value-title": "name", + "parameters": { + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + } + }, + "Actiontype": { + "type": "string", + "x-ms-summary": "Action type", + "description": "The action type of the synchronous action that you wish to execute", + "title": "Action type", + "x-ms-dynamic-values": { + "operationId": "GetSynchronousActions", + "parameters": { + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + } + }, + "StringArray": { + "type": "array", + "items": { + "type": "string" + } + }, + "KeyValuePairArray": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "id" + }, + "name": { + "type": "string", + "description": "name" + } + } + } + }, + "PerformActionRequest": { + "type": "object", + "properties": { + "codeunitId": { + "$ref": "#/definitions/CodeunitId" + }, + "parameters": { + "type": "string", + "x-ms-summary": "Parameter String", + "description": "The parameter string to pass to the codeunit" + } + }, + "required": [ + "codeunitId" + ] + }, + "PerformSynchronousActionRequest": { + "type": "object", + "properties": { + "actiontype": { + "$ref": "#/definitions/Actiontype" + }, + "payload": { + "type": "string", + "x-ms-summary": "Payload String", + "description": "The payload string to pass to the synchronous action" + } + }, + "required": [ + "actiontype" + ] + }, + "ReadRequest": { + "type": "object", + "properties": { + "table": { + "$ref": "#/definitions/TableId" + }, + "name": { + "type": "string", + "x-ms-summary": "Name", + "description": "Your reference name for this table request object", + "title": "", + "x-ms-visibility": "advanced" + }, + "top": { + "type": "integer", + "format": "int32", + "x-ms-summary": "Top", + "description": "The maximum amount of records to return", + "title": "", + "x-ms-visibility": "advanced" + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/definitions/FieldId" + }, + "x-ms-summary": "Select", + "description": "Select a field you want to retrieve" + }, + "orderby": { + "type": "array", + "items": { + "$ref": "#/definitions/FieldId" + }, + "x-ms-summary": "Order by", + "description": "Data will be sorted using these fields" + }, + "sortorder": { + "type": "string", + "enum": [ + "Ascending", + "Descending" + ], + "x-ms-summary": "Sorting Order", + "description": "Whether the data returned is sorted in ascending or descending order", + "title": "" + }, + "filters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "$ref": "#/definitions/FieldId" + }, + "filter": { + "type": "string", + "x-ms-summary": "Filter", + "description": "A valid Business Central filter value", + "x-ms-visibility": "advanced" + } + } + }, + "x-ms-summary": "Filterfields", + "description": "Field with filters that will be applied when retrieving data" + } + }, + "required": [ + "table" + ], + "x-ms-summary": "Request", + "description": "The request to retrieve data" + }, + "ReadRequestSimple": { + "type": "object", + "properties": { + "table": { + "$ref": "#/definitions/TableId" + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/definitions/FieldId" + }, + "x-ms-summary": "Select", + "description": "Select a field you want to retrieve" + } + }, + "required": [ + "table" + ], + "x-ms-summary": "Request", + "description": "The request to retrieve data" + }, + "ReadRequestSimpleSchema": { + "type": "object", + "properties": { + "table": { + "type": "integer", + "format": "int32", + "x-ms-summary": "Table", + "description": "The table from which you want to retrieve data", + "title": "" + }, + "fields": { + "type": "array", + "items": { + "type": "integer", + "format": "int32", + "description": "A field from the selected table", + "x-ms-summary": "Field", + "title": "" + }, + "x-ms-summary": "Select", + "description": "Select a field you want to retrieve" + }, + "name": { + "type": "string", + "x-ms-summary": "Name of request", + "description": "The name of the request" + } + }, + "required": [ + "table" + ], + "x-ms-summary": "Request", + "description": "The request to retrieve data" + }, + "WebhookSchemaRequest": { + "type": "object", + "properties": { + "tableId": { + "type": "integer", + "format": "int32", + "x-ms-summary": "Table" + }, + "fields": { + "type": "array", + "items": { + "type": "integer", + "format": "int32", + "x-ms-summary": "Field" + } + }, + "isBatch": { + "type": "boolean", + "x-ms-summary": "IsBatch" + } + } + }, + "WebhookRequest": { + "type": "object", + "properties": { + "TableId": { + "type": "integer", + "format": "int32", + "description": "TableId", + "title": "", + "x-ms-visibility": "important", + "x-ms-dynamic-values": { + "operationId": "GetTables", + "value-path": "id", + "value-title": "name", + "parameters": { + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + } + }, + "CallbackUrl": { + "type": "string", + "description": "CallbackUrl", + "title": "", + "x-ms-visibility": "internal", + "x-ms-notification-url": true + }, + "Fields": { + "type": "array", + "items": { + "type": "integer", + "format": "int32", + "description": "A field from the selected table", + "x-ms-summary": "Field", + "title": "", + "x-ms-dynamic-values": { + "operationId": "GetFields", + "value-path": "id", + "value-title": "name", + "parameters": { + "Table": { + "parameter": "TableId" + }, + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + }, + "x-ms-dynamic-list": { + "operationId": "GetFields", + "itemValuePath": "id", + "itemTitlePath": "name", + "parameters": { + "Table": { + "parameterReference": "body/TableId" + }, + "Environment": { + "parameterReference": "Environment" + }, + "Company": { + "parameterReference": "Company" + } + } + } + }, + "x-ms-summary": "Select", + "description": "Select a field you want to retrieve" + }, + "Filters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "integer", + "format": "int32", + "description": "A field from the selected table", + "x-ms-summary": "Field", + "title": "", + "x-ms-dynamic-values": { + "operationId": "GetFields", + "value-path": "id", + "value-title": "name", + "parameters": { + "Table": { + "parameter": "TableId" + }, + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + }, + "x-ms-dynamic-list": { + "operationId": "GetFields", + "itemValuePath": "id", + "itemTitlePath": "name", + "parameters": { + "Table": { + "parameterReference": "body/TableId" + }, + "Environment": { + "parameterReference": "Environment" + }, + "Company": { + "parameterReference": "Company" + } + } + } + }, + "filter": { + "type": "string", + "x-ms-summary": "Filter", + "description": "A valid Business Central filter value", + "x-ms-visibility": "advanced" + } + } + }, + "x-ms-summary": "Filterfields", + "description": "Field with filters that will be applied when retrieving data" + } + }, + "required": [ + "CallbackUrl", + "TableId" + ] + }, + "CreateRequest": { + "type": "object", + "properties": { + "table": { + "$ref": "#/definitions/TableId" + }, + "fieldvalues": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "$ref": "#/definitions/FieldId" + }, + "value": { + "type": "string", + "x-ms-summary": "Value to set", + "description": "The value to set for this field", + "x-ms-visibility": "advanced" + } + } + }, + "x-ms-summary": "Field Values", + "description": "The fields with the values to set" + } + }, + "required": [ + "table", + "fieldvalues" + ], + "x-ms-summary": "Request", + "description": "The request to insert data" + }, + "UpdateRequest": { + "type": "object", + "properties": { + "table": { + "$ref": "#/definitions/TableId" + }, + "systemId": { + "type": "string", + "x-ms-summary": "System Id", + "description": "The id of the record in Business Central" + }, + "fieldvalues": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "$ref": "#/definitions/FieldId" + }, + "value": { + "type": "string", + "x-ms-summary": "Value to set", + "description": "The value to set for this field", + "x-ms-visibility": "advanced" + } + } + }, + "x-ms-summary": "Field Values", + "description": "The fields with the values to set" + } + }, + "required": [ + "table", + "systemId", + "fieldvalues" + ], + "x-ms-summary": "Request", + "description": "The request to insert data" + } + }, + "parameters": { + "ContentType": { + "in": "header", + "name": "Content-Type", + "required": true, + "type": "string", + "default": "application/json", + "x-ms-visibility": "internal", + "x-ms-summary": "Content-Type" + }, + "ContentTypeBinary": { + "in": "header", + "name": "Content-Type", + "required": true, + "type": "string", + "default": "application/octet-stream", + "x-ms-visibility": "internal", + "x-ms-summary": "Content-Type" + }, + "Environment": { + "in": "header", + "name": "Environment", + "required": true, + "type": "string", + "x-ms-dynamic-values": { + "operationId": "GetEnvironments" + }, + "description": "The Business Central environment to connect to", + "x-ms-summary": "Environment" + }, + "Company": { + "in": "header", + "name": "Company", + "required": true, + "type": "string", + "x-ms-dynamic-values": { + "operationId": "GetCompanies", + "parameters": { + "Environment": { + "parameter": "Environment" + } + } + }, + "description": "The Business Central company to connect to", + "x-ms-summary": "Company" + }, + "Language": { + "in": "header", + "name": "Language", + "required": false, + "type": "string", + "x-ms-visibility": "advanced", + "x-ms-dynamic-values": { + "operationId": "GetLanguages", + "value-path": "id", + "value-title": "name", + "parameters": { + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + }, + "x-ms-summary": "Language", + "description": "The language in which to communicate with Business Central" + }, + "CsvDelimiter": { + "in": "query", + "name": "delimiter", + "required": false, + "type": "string", + "maxLength": 1, + "x-ms-visibility": "advanced", + "x-ms-summary": "Delimiter", + "description": "The delimiter to be used to seperate the columns" + }, + "CsvHeaders": { + "in": "query", + "name": "headers", + "required": false, + "type": "boolean", + "x-ms-visibility": "advanced", + "x-ms-summary": "Use Headers", + "description": "If set headers are used in the CSV" + }, + "TablePath": { + "in": "path", + "name": "Table", + "required": true, + "type": "integer", + "format": "int32", + "x-ms-visibility": "important", + "x-ms-url-encoding": "single", + "x-ms-dynamic-values": { + "operationId": "GetTables", + "value-path": "id", + "value-title": "name", + "parameters": { + "Environment": { + "parameter": "Environment" + }, + "Company": { + "parameter": "Company" + } + } + }, + "x-ms-summary": "Table", + "description": "The table from Business Central which is used in this request" + }, + "TableQuery": { + "in": "query", + "name": "TableId", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-visibility": "advanced", + "x-ms-dynamic-values": { + "operationId": "GetTables", + "value-path": "id", + "value-title": "name", + "parameters": { + "Environment": { + "parameter": "Environment" }, - "500": { - "$ref": "#/responses/Unexpected" + "Company": { + "parameter": "Company" } - }, - "summary": "Triggers when a record is updated (V2)", - "tags": [ - "triggers" - ], - "x-ms-trigger": "single" + } }, - "x-ms-notification-content": { - "description": "This is the system id is that is send back", - "schema": { - "description": "Response", - "properties": {}, - "title": "Response", - "type": "object", - "x-ms-dynamic-properties": { - "itemValuePath": "schema", - "operationId": "GetWebhookRequestSchema", - "parameters": { - "Company": { - "parameterReference": "Company" - }, - "Environment": { - "parameterReference": "Environment" - }, - "body/fields": { - "parameterReference": "body/Fields" - }, - "body/isBatch": { - "parameterReference": "body/IsBatch" - }, - "body/tableId": { - "parameterReference": "body/TableId" - } - } + "x-ms-summary": "Table", + "description": "The table from Business Central which is used in this request" + }, + "SystemId": { + "in": "path", + "name": "SystemId", + "required": true, + "type": "string", + "x-ms-summary": "System Id", + "x-ms-url-encoding": "single", + "description": "The id of the record in Business Central" + }, + "SystemIdQuery": { + "in": "query", + "name": "SystemId", + "required": false, + "type": "string", + "x-ms-summary": "System Id", + "description": "The id of the record in Business Central", + "x-ms-visibility": "advanced" + }, + "MediaFields": { + "in": "path", + "name": "Field", + "required": true, + "type": "integer", + "format": "int32", + "description": "A field from the selected table", + "x-ms-summary": "Field", + "x-ms-url-encoding": "single", + "x-ms-visibility": "important", + "x-ms-dynamic-values": { + "operationId": "GetFields", + "value-path": "id", + "value-title": "name", + "parameters": { + "Table": { + "parameter": "Table" }, - "x-ms-dynamic-schema": { - "operationId": "GetWebhookRequestSchema", - "parameters": { - "Company": { - "parameter": "Company" - }, - "Environment": { - "parameter": "Environment" - }, - "fields": { - "parameter": "Fields" - }, - "isBatch": { - "parameter": "IsBatch" - }, - "tableId": { - "parameter": "TableId" - } - }, - "value-path": "schema" + "Environment": { + "parameter": "Environment" }, - "x-ms-summary": "Response" + "Company": { + "parameter": "Company" + }, + "$fieldtypes": "Media|Blob" } } }, - "/api/2.0/hooks/{Id}": { - "delete": { - "description": "Deletes a webhook,", - "operationId": "DeleteTriggerV2", - "parameters": [ - { - "in": "query", - "name": "environment", - "required": true, - "type": "string" - }, - { - "in": "query", - "name": "company", - "required": true, - "type": "string" + "ReportId": { + "name": "ReportId", + "in": "path", + "required": true, + "type": "integer", + "default": 0, + "x-ms-url-encoding": "single", + "x-ms-visibility": "important", + "x-ms-dynamic-values": { + "operationId": "GetReports", + "value-path": "id", + "value-title": "name", + "parameters": { + "Environment": { + "parameter": "Environment" }, - { - "description": "The id of the registered webhook", - "in": "path", - "name": "Id", - "required": true, - "type": "string" + "Company": { + "parameter": "Company" } - ], - "responses": { - "200": { - "description": "Success", - "schema": {} - }, - "400": { - "$ref": "#/responses/Unexpected" - }, - "401": { - "$ref": "#/responses/Unauthorized" - }, - "402": { - "$ref": "#/responses/InvalidLicense" - }, - "404": { - "$ref": "#/responses/NotFound" + } + }, + "x-ms-summary": "Report", + "description": "The id of the report in Business Central to retrieve" + }, + "Configuration": { + "name": "Configuration", + "in": "path", + "required": true, + "type": "string", + "x-ms-visibility": "important", + "x-ms-url-encoding": "single", + "x-ms-dynamic-values": { + "operationId": "GetConfigurationNames", + "parameters": { + "Environment": { + "parameter": "Environment" }, - "500": { - "$ref": "#/responses/Unexpected" + "Company": { + "parameter": "Company" } - }, - "summary": "Deletes a registration webhook from the Business Central environment", - "tags": [ - "triggers" - ], - "x-ms-visibility": "internal" - } + } + }, + "x-ms-summary": "Configuration", + "description": "The configuration to use to transform the data to and from Business Central" } }, - "produces": [], "responses": { "BadRequest": { "description": "The request was not valid", @@ -4927,14 +5060,14 @@ "$ref": "#/definitions/Error" } }, - "InvalidLicense": { - "description": "No valid license found for this tenant", + "NotFound": { + "description": "The specified resource was not found", "schema": { "$ref": "#/definitions/Error" } }, - "NotFound": { - "description": "The specified resource was not found", + "InvalidLicense": { + "description": "No valid license found for this tenant", "schema": { "$ref": "#/definitions/Error" } @@ -4952,70 +5085,52 @@ } } }, - "schemes": [ - "https" - ], - "security": [ - { - "oauth2_auth": [] - } - ], "securityDefinitions": { "oauth2_auth": { - "authorizationUrl": "https://login.windows.net/common/oauth2/authorize", + "type": "oauth2", "flow": "accessCode", - "scopes": {}, + "authorizationUrl": "https://login.windows.net/common/oauth2/authorize", "tokenUrl": "https://login.windows.net/common/oauth2/authorize", - "type": "oauth2" + "scopes": {} } }, - "swagger": "2.0", - "tags": [ - { - "description": "CRUD operations on data", - "name": "data" - }, + "security": [ { - "description": "Reading and writing media data", - "name": "media" - }, + "oauth2_auth": [] + } + ], + "tags": [ { - "description": "Retrieving reports", - "name": "reports" + "name": "data", + "description": "CRUD operations on data" }, { - "description": "Perform actions", - "name": "actions" + "name": "media", + "description": "Reading and writing media data" }, { - "description": "Transforming data from and to xml", - "name": "xml" + "name": "reports", + "description": "Retrieving reports" }, { - "description": "Transforming data from and to csv", - "name": "csv" + "name": "actions", + "description": "Perform actions" }, { - "description": "Helper methods for setting parameters", - "name": "helpers" + "name": "xml", + "description": "Transforming data from and to xml" }, { - "description": "Trigger methods", - "name": "triggers" - } - ], - "x-ms-connector-metadata": [ - { - "propertyName": "Website", - "propertyValue": "https://www.gac.nl" + "name": "csv", + "description": "Transforming data from and to csv" }, { - "propertyName": "Privacy Policy", - "propertyValue": "https://www.gac.nl/disclaimer" + "name": "helpers", + "description": "Helper methods for setting parameters" }, { - "propertyName": "Categories", - "propertyValue": "Productivity;Data" + "name": "triggers", + "description": "Trigger methods" } ] -} \ No newline at end of file +}