Import a Workflow definition
curl --request POST \
--url https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"code": "<string>",
"description": "<string>",
"originalOrgId": "<string>",
"version": 123,
"versionDescription": "<string>",
"functions": [
{
"functionId": "<string>",
"title": "<string>",
"description": "<string>",
"className": "<string>",
"parameters": {},
"exits": {
"TRUE": "<string>",
"FALSE": "<string>",
"VALID": "<string>",
"INVALID": "<string>",
"NEXT": "<string>",
"TERMINATE": "<string>",
"ERROR": "<string>"
}
}
],
"globalParameters": [
{
"type": "<string>",
"name": "<string>",
"constraints": {}
}
],
"trigger": {
"enabled": true,
"firstFunction": "<string>"
},
"transformations": [
{
"orgId": "<string>",
"transformationId": "<string>",
"name": "<string>",
"code": "<string>",
"description": "<string>",
"sourceSystem": "<string>",
"destinationSystem": "<string>",
"sourceTable": "<string>",
"destinationTable": "<string>",
"transformations": [
{
"destinationField": "<string>"
}
]
}
],
"credentials": [
{
"credentialsId": "<string>",
"name": "<string>"
}
],
"webhooks": [
{
"webhookDestinationId": "<string>",
"webhookUrl": "<string>"
}
]
}
'import requests
url = "https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/import"
payload = {
"name": "<string>",
"code": "<string>",
"description": "<string>",
"originalOrgId": "<string>",
"version": 123,
"versionDescription": "<string>",
"functions": [
{
"functionId": "<string>",
"title": "<string>",
"description": "<string>",
"className": "<string>",
"parameters": {},
"exits": {
"TRUE": "<string>",
"FALSE": "<string>",
"VALID": "<string>",
"INVALID": "<string>",
"NEXT": "<string>",
"TERMINATE": "<string>",
"ERROR": "<string>"
}
}
],
"globalParameters": [
{
"type": "<string>",
"name": "<string>",
"constraints": {}
}
],
"trigger": {
"enabled": True,
"firstFunction": "<string>"
},
"transformations": [
{
"orgId": "<string>",
"transformationId": "<string>",
"name": "<string>",
"code": "<string>",
"description": "<string>",
"sourceSystem": "<string>",
"destinationSystem": "<string>",
"sourceTable": "<string>",
"destinationTable": "<string>",
"transformations": [{ "destinationField": "<string>" }]
}
],
"credentials": [
{
"credentialsId": "<string>",
"name": "<string>"
}
],
"webhooks": [
{
"webhookDestinationId": "<string>",
"webhookUrl": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
code: '<string>',
description: '<string>',
originalOrgId: '<string>',
version: 123,
versionDescription: '<string>',
functions: [
{
functionId: '<string>',
title: '<string>',
description: '<string>',
className: '<string>',
parameters: {},
exits: {
TRUE: '<string>',
FALSE: '<string>',
VALID: '<string>',
INVALID: '<string>',
NEXT: '<string>',
TERMINATE: '<string>',
ERROR: '<string>'
}
}
],
globalParameters: [{type: '<string>', name: '<string>', constraints: {}}],
trigger: {enabled: true, firstFunction: '<string>'},
transformations: [
{
orgId: '<string>',
transformationId: '<string>',
name: '<string>',
code: '<string>',
description: '<string>',
sourceSystem: '<string>',
destinationSystem: '<string>',
sourceTable: '<string>',
destinationTable: '<string>',
transformations: [{destinationField: '<string>'}]
}
],
credentials: [{credentialsId: '<string>', name: '<string>'}],
webhooks: [{webhookDestinationId: '<string>', webhookUrl: '<string>'}]
})
};
fetch('https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'code' => '<string>',
'description' => '<string>',
'originalOrgId' => '<string>',
'version' => 123,
'versionDescription' => '<string>',
'functions' => [
[
'functionId' => '<string>',
'title' => '<string>',
'description' => '<string>',
'className' => '<string>',
'parameters' => [
],
'exits' => [
'TRUE' => '<string>',
'FALSE' => '<string>',
'VALID' => '<string>',
'INVALID' => '<string>',
'NEXT' => '<string>',
'TERMINATE' => '<string>',
'ERROR' => '<string>'
]
]
],
'globalParameters' => [
[
'type' => '<string>',
'name' => '<string>',
'constraints' => [
]
]
],
'trigger' => [
'enabled' => true,
'firstFunction' => '<string>'
],
'transformations' => [
[
'orgId' => '<string>',
'transformationId' => '<string>',
'name' => '<string>',
'code' => '<string>',
'description' => '<string>',
'sourceSystem' => '<string>',
'destinationSystem' => '<string>',
'sourceTable' => '<string>',
'destinationTable' => '<string>',
'transformations' => [
[
'destinationField' => '<string>'
]
]
]
],
'credentials' => [
[
'credentialsId' => '<string>',
'name' => '<string>'
]
],
'webhooks' => [
[
'webhookDestinationId' => '<string>',
'webhookUrl' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/import"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"originalOrgId\": \"<string>\",\n \"version\": 123,\n \"versionDescription\": \"<string>\",\n \"functions\": [\n {\n \"functionId\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"className\": \"<string>\",\n \"parameters\": {},\n \"exits\": {\n \"TRUE\": \"<string>\",\n \"FALSE\": \"<string>\",\n \"VALID\": \"<string>\",\n \"INVALID\": \"<string>\",\n \"NEXT\": \"<string>\",\n \"TERMINATE\": \"<string>\",\n \"ERROR\": \"<string>\"\n }\n }\n ],\n \"globalParameters\": [\n {\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"constraints\": {}\n }\n ],\n \"trigger\": {\n \"enabled\": true,\n \"firstFunction\": \"<string>\"\n },\n \"transformations\": [\n {\n \"orgId\": \"<string>\",\n \"transformationId\": \"<string>\",\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"sourceSystem\": \"<string>\",\n \"destinationSystem\": \"<string>\",\n \"sourceTable\": \"<string>\",\n \"destinationTable\": \"<string>\",\n \"transformations\": [\n {\n \"destinationField\": \"<string>\"\n }\n ]\n }\n ],\n \"credentials\": [\n {\n \"credentialsId\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"webhooks\": [\n {\n \"webhookDestinationId\": \"<string>\",\n \"webhookUrl\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"originalOrgId\": \"<string>\",\n \"version\": 123,\n \"versionDescription\": \"<string>\",\n \"functions\": [\n {\n \"functionId\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"className\": \"<string>\",\n \"parameters\": {},\n \"exits\": {\n \"TRUE\": \"<string>\",\n \"FALSE\": \"<string>\",\n \"VALID\": \"<string>\",\n \"INVALID\": \"<string>\",\n \"NEXT\": \"<string>\",\n \"TERMINATE\": \"<string>\",\n \"ERROR\": \"<string>\"\n }\n }\n ],\n \"globalParameters\": [\n {\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"constraints\": {}\n }\n ],\n \"trigger\": {\n \"enabled\": true,\n \"firstFunction\": \"<string>\"\n },\n \"transformations\": [\n {\n \"orgId\": \"<string>\",\n \"transformationId\": \"<string>\",\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"sourceSystem\": \"<string>\",\n \"destinationSystem\": \"<string>\",\n \"sourceTable\": \"<string>\",\n \"destinationTable\": \"<string>\",\n \"transformations\": [\n {\n \"destinationField\": \"<string>\"\n }\n ]\n }\n ],\n \"credentials\": [\n {\n \"credentialsId\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"webhooks\": [\n {\n \"webhookDestinationId\": \"<string>\",\n \"webhookUrl\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"originalOrgId\": \"<string>\",\n \"version\": 123,\n \"versionDescription\": \"<string>\",\n \"functions\": [\n {\n \"functionId\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"className\": \"<string>\",\n \"parameters\": {},\n \"exits\": {\n \"TRUE\": \"<string>\",\n \"FALSE\": \"<string>\",\n \"VALID\": \"<string>\",\n \"INVALID\": \"<string>\",\n \"NEXT\": \"<string>\",\n \"TERMINATE\": \"<string>\",\n \"ERROR\": \"<string>\"\n }\n }\n ],\n \"globalParameters\": [\n {\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"constraints\": {}\n }\n ],\n \"trigger\": {\n \"enabled\": true,\n \"firstFunction\": \"<string>\"\n },\n \"transformations\": [\n {\n \"orgId\": \"<string>\",\n \"transformationId\": \"<string>\",\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"sourceSystem\": \"<string>\",\n \"destinationSystem\": \"<string>\",\n \"sourceTable\": \"<string>\",\n \"destinationTable\": \"<string>\",\n \"transformations\": [\n {\n \"destinationField\": \"<string>\"\n }\n ]\n }\n ],\n \"credentials\": [\n {\n \"credentialsId\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"webhooks\": [\n {\n \"webhookDestinationId\": \"<string>\",\n \"webhookUrl\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"version": 123,
"dtCreated": "2023-11-07T05:31:56Z",
"dtLastModified": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"lastModifiedBy": "<string>",
"name": "<string>",
"description": "<string>",
"code": "<string>",
"active": true,
"trigger": {
"enabled": true,
"firstFunction": "<string>"
},
"functions": [
{
"functionId": "<string>",
"title": "<string>",
"description": "<string>",
"className": "<string>",
"parameters": {},
"exits": {
"TRUE": "<string>",
"FALSE": "<string>",
"VALID": "<string>",
"INVALID": "<string>",
"NEXT": "<string>",
"TERMINATE": "<string>",
"ERROR": "<string>"
}
}
],
"globalParameters": [
{
"type": "<string>",
"name": "<string>",
"constraints": {}
}
],
"templateOverrides": {},
"validationErrors": {},
"currentVersion": 123,
"workflowVersion": 123,
"draft": true,
"useDraftVersion": true,
"versions": [
{
"version": 123,
"description": "<string>",
"dtCreated": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"draftVersion": "<string>",
"templateId": "<string>",
"platform": true,
"templateVersion": 123
}
],
"drafts": [
{
"version": 123,
"description": "<string>",
"dtCreated": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"draftVersion": "<string>",
"templateId": "<string>",
"platform": true,
"templateVersion": 123
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}Import a Workflow definition
Import a workflow.
POST
/
organizations
/
{orgId}
/
integrationdestinations
/
workflows
/
import
Import a Workflow definition
curl --request POST \
--url https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"code": "<string>",
"description": "<string>",
"originalOrgId": "<string>",
"version": 123,
"versionDescription": "<string>",
"functions": [
{
"functionId": "<string>",
"title": "<string>",
"description": "<string>",
"className": "<string>",
"parameters": {},
"exits": {
"TRUE": "<string>",
"FALSE": "<string>",
"VALID": "<string>",
"INVALID": "<string>",
"NEXT": "<string>",
"TERMINATE": "<string>",
"ERROR": "<string>"
}
}
],
"globalParameters": [
{
"type": "<string>",
"name": "<string>",
"constraints": {}
}
],
"trigger": {
"enabled": true,
"firstFunction": "<string>"
},
"transformations": [
{
"orgId": "<string>",
"transformationId": "<string>",
"name": "<string>",
"code": "<string>",
"description": "<string>",
"sourceSystem": "<string>",
"destinationSystem": "<string>",
"sourceTable": "<string>",
"destinationTable": "<string>",
"transformations": [
{
"destinationField": "<string>"
}
]
}
],
"credentials": [
{
"credentialsId": "<string>",
"name": "<string>"
}
],
"webhooks": [
{
"webhookDestinationId": "<string>",
"webhookUrl": "<string>"
}
]
}
'import requests
url = "https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/import"
payload = {
"name": "<string>",
"code": "<string>",
"description": "<string>",
"originalOrgId": "<string>",
"version": 123,
"versionDescription": "<string>",
"functions": [
{
"functionId": "<string>",
"title": "<string>",
"description": "<string>",
"className": "<string>",
"parameters": {},
"exits": {
"TRUE": "<string>",
"FALSE": "<string>",
"VALID": "<string>",
"INVALID": "<string>",
"NEXT": "<string>",
"TERMINATE": "<string>",
"ERROR": "<string>"
}
}
],
"globalParameters": [
{
"type": "<string>",
"name": "<string>",
"constraints": {}
}
],
"trigger": {
"enabled": True,
"firstFunction": "<string>"
},
"transformations": [
{
"orgId": "<string>",
"transformationId": "<string>",
"name": "<string>",
"code": "<string>",
"description": "<string>",
"sourceSystem": "<string>",
"destinationSystem": "<string>",
"sourceTable": "<string>",
"destinationTable": "<string>",
"transformations": [{ "destinationField": "<string>" }]
}
],
"credentials": [
{
"credentialsId": "<string>",
"name": "<string>"
}
],
"webhooks": [
{
"webhookDestinationId": "<string>",
"webhookUrl": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
code: '<string>',
description: '<string>',
originalOrgId: '<string>',
version: 123,
versionDescription: '<string>',
functions: [
{
functionId: '<string>',
title: '<string>',
description: '<string>',
className: '<string>',
parameters: {},
exits: {
TRUE: '<string>',
FALSE: '<string>',
VALID: '<string>',
INVALID: '<string>',
NEXT: '<string>',
TERMINATE: '<string>',
ERROR: '<string>'
}
}
],
globalParameters: [{type: '<string>', name: '<string>', constraints: {}}],
trigger: {enabled: true, firstFunction: '<string>'},
transformations: [
{
orgId: '<string>',
transformationId: '<string>',
name: '<string>',
code: '<string>',
description: '<string>',
sourceSystem: '<string>',
destinationSystem: '<string>',
sourceTable: '<string>',
destinationTable: '<string>',
transformations: [{destinationField: '<string>'}]
}
],
credentials: [{credentialsId: '<string>', name: '<string>'}],
webhooks: [{webhookDestinationId: '<string>', webhookUrl: '<string>'}]
})
};
fetch('https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'code' => '<string>',
'description' => '<string>',
'originalOrgId' => '<string>',
'version' => 123,
'versionDescription' => '<string>',
'functions' => [
[
'functionId' => '<string>',
'title' => '<string>',
'description' => '<string>',
'className' => '<string>',
'parameters' => [
],
'exits' => [
'TRUE' => '<string>',
'FALSE' => '<string>',
'VALID' => '<string>',
'INVALID' => '<string>',
'NEXT' => '<string>',
'TERMINATE' => '<string>',
'ERROR' => '<string>'
]
]
],
'globalParameters' => [
[
'type' => '<string>',
'name' => '<string>',
'constraints' => [
]
]
],
'trigger' => [
'enabled' => true,
'firstFunction' => '<string>'
],
'transformations' => [
[
'orgId' => '<string>',
'transformationId' => '<string>',
'name' => '<string>',
'code' => '<string>',
'description' => '<string>',
'sourceSystem' => '<string>',
'destinationSystem' => '<string>',
'sourceTable' => '<string>',
'destinationTable' => '<string>',
'transformations' => [
[
'destinationField' => '<string>'
]
]
]
],
'credentials' => [
[
'credentialsId' => '<string>',
'name' => '<string>'
]
],
'webhooks' => [
[
'webhookDestinationId' => '<string>',
'webhookUrl' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/import"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"originalOrgId\": \"<string>\",\n \"version\": 123,\n \"versionDescription\": \"<string>\",\n \"functions\": [\n {\n \"functionId\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"className\": \"<string>\",\n \"parameters\": {},\n \"exits\": {\n \"TRUE\": \"<string>\",\n \"FALSE\": \"<string>\",\n \"VALID\": \"<string>\",\n \"INVALID\": \"<string>\",\n \"NEXT\": \"<string>\",\n \"TERMINATE\": \"<string>\",\n \"ERROR\": \"<string>\"\n }\n }\n ],\n \"globalParameters\": [\n {\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"constraints\": {}\n }\n ],\n \"trigger\": {\n \"enabled\": true,\n \"firstFunction\": \"<string>\"\n },\n \"transformations\": [\n {\n \"orgId\": \"<string>\",\n \"transformationId\": \"<string>\",\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"sourceSystem\": \"<string>\",\n \"destinationSystem\": \"<string>\",\n \"sourceTable\": \"<string>\",\n \"destinationTable\": \"<string>\",\n \"transformations\": [\n {\n \"destinationField\": \"<string>\"\n }\n ]\n }\n ],\n \"credentials\": [\n {\n \"credentialsId\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"webhooks\": [\n {\n \"webhookDestinationId\": \"<string>\",\n \"webhookUrl\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"originalOrgId\": \"<string>\",\n \"version\": 123,\n \"versionDescription\": \"<string>\",\n \"functions\": [\n {\n \"functionId\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"className\": \"<string>\",\n \"parameters\": {},\n \"exits\": {\n \"TRUE\": \"<string>\",\n \"FALSE\": \"<string>\",\n \"VALID\": \"<string>\",\n \"INVALID\": \"<string>\",\n \"NEXT\": \"<string>\",\n \"TERMINATE\": \"<string>\",\n \"ERROR\": \"<string>\"\n }\n }\n ],\n \"globalParameters\": [\n {\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"constraints\": {}\n }\n ],\n \"trigger\": {\n \"enabled\": true,\n \"firstFunction\": \"<string>\"\n },\n \"transformations\": [\n {\n \"orgId\": \"<string>\",\n \"transformationId\": \"<string>\",\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"sourceSystem\": \"<string>\",\n \"destinationSystem\": \"<string>\",\n \"sourceTable\": \"<string>\",\n \"destinationTable\": \"<string>\",\n \"transformations\": [\n {\n \"destinationField\": \"<string>\"\n }\n ]\n }\n ],\n \"credentials\": [\n {\n \"credentialsId\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"webhooks\": [\n {\n \"webhookDestinationId\": \"<string>\",\n \"webhookUrl\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"originalOrgId\": \"<string>\",\n \"version\": 123,\n \"versionDescription\": \"<string>\",\n \"functions\": [\n {\n \"functionId\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"className\": \"<string>\",\n \"parameters\": {},\n \"exits\": {\n \"TRUE\": \"<string>\",\n \"FALSE\": \"<string>\",\n \"VALID\": \"<string>\",\n \"INVALID\": \"<string>\",\n \"NEXT\": \"<string>\",\n \"TERMINATE\": \"<string>\",\n \"ERROR\": \"<string>\"\n }\n }\n ],\n \"globalParameters\": [\n {\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"constraints\": {}\n }\n ],\n \"trigger\": {\n \"enabled\": true,\n \"firstFunction\": \"<string>\"\n },\n \"transformations\": [\n {\n \"orgId\": \"<string>\",\n \"transformationId\": \"<string>\",\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"sourceSystem\": \"<string>\",\n \"destinationSystem\": \"<string>\",\n \"sourceTable\": \"<string>\",\n \"destinationTable\": \"<string>\",\n \"transformations\": [\n {\n \"destinationField\": \"<string>\"\n }\n ]\n }\n ],\n \"credentials\": [\n {\n \"credentialsId\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"webhooks\": [\n {\n \"webhookDestinationId\": \"<string>\",\n \"webhookUrl\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"version": 123,
"dtCreated": "2023-11-07T05:31:56Z",
"dtLastModified": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"lastModifiedBy": "<string>",
"name": "<string>",
"description": "<string>",
"code": "<string>",
"active": true,
"trigger": {
"enabled": true,
"firstFunction": "<string>"
},
"functions": [
{
"functionId": "<string>",
"title": "<string>",
"description": "<string>",
"className": "<string>",
"parameters": {},
"exits": {
"TRUE": "<string>",
"FALSE": "<string>",
"VALID": "<string>",
"INVALID": "<string>",
"NEXT": "<string>",
"TERMINATE": "<string>",
"ERROR": "<string>"
}
}
],
"globalParameters": [
{
"type": "<string>",
"name": "<string>",
"constraints": {}
}
],
"templateOverrides": {},
"validationErrors": {},
"currentVersion": 123,
"workflowVersion": 123,
"draft": true,
"useDraftVersion": true,
"versions": [
{
"version": 123,
"description": "<string>",
"dtCreated": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"draftVersion": "<string>",
"templateId": "<string>",
"platform": true,
"templateVersion": 123
}
],
"drafts": [
{
"version": 123,
"description": "<string>",
"dtCreated": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"draftVersion": "<string>",
"templateId": "<string>",
"platform": true,
"templateVersion": 123
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Body
application/json
Response
ImportWorkflow 200 response
Response containing a workflow