curl --request PUT \
--url https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/{id}/draft \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"code": "<string>",
"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": {}
}
],
"enabled": true,
"templateSource": {
"templateId": "<string>",
"platform": true,
"templateVersion": 123,
"templateOverrides": {}
}
}
'import requests
url = "https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/{id}/draft"
payload = {
"name": "<string>",
"description": "<string>",
"code": "<string>",
"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": {}
}
],
"enabled": True,
"templateSource": {
"templateId": "<string>",
"platform": True,
"templateVersion": 123,
"templateOverrides": {}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
code: '<string>',
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: {}}],
enabled: true,
templateSource: {
templateId: '<string>',
platform: true,
templateVersion: 123,
templateOverrides: {}
}
})
};
fetch('https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/{id}/draft', 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/{id}/draft",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'code' => '<string>',
'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' => [
]
]
],
'enabled' => true,
'templateSource' => [
'templateId' => '<string>',
'platform' => true,
'templateVersion' => 123,
'templateOverrides' => [
]
]
]),
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/{id}/draft"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"code\": \"<string>\",\n \"trigger\": {\n \"enabled\": true,\n \"firstFunction\": \"<string>\"\n },\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 \"enabled\": true,\n \"templateSource\": {\n \"templateId\": \"<string>\",\n \"platform\": true,\n \"templateVersion\": 123,\n \"templateOverrides\": {}\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/{id}/draft")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"code\": \"<string>\",\n \"trigger\": {\n \"enabled\": true,\n \"firstFunction\": \"<string>\"\n },\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 \"enabled\": true,\n \"templateSource\": {\n \"templateId\": \"<string>\",\n \"platform\": true,\n \"templateVersion\": 123,\n \"templateOverrides\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/{id}/draft")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"code\": \"<string>\",\n \"trigger\": {\n \"enabled\": true,\n \"firstFunction\": \"<string>\"\n },\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 \"enabled\": true,\n \"templateSource\": {\n \"templateId\": \"<string>\",\n \"platform\": true,\n \"templateVersion\": 123,\n \"templateOverrides\": {}\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": {},
"enabled": true,
"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>"
}Save Workflow Draft
Save a draft of the workflow without publishing it as a new version
curl --request PUT \
--url https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/{id}/draft \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"code": "<string>",
"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": {}
}
],
"enabled": true,
"templateSource": {
"templateId": "<string>",
"platform": true,
"templateVersion": 123,
"templateOverrides": {}
}
}
'import requests
url = "https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/{id}/draft"
payload = {
"name": "<string>",
"description": "<string>",
"code": "<string>",
"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": {}
}
],
"enabled": True,
"templateSource": {
"templateId": "<string>",
"platform": True,
"templateVersion": 123,
"templateOverrides": {}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
code: '<string>',
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: {}}],
enabled: true,
templateSource: {
templateId: '<string>',
platform: true,
templateVersion: 123,
templateOverrides: {}
}
})
};
fetch('https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/{id}/draft', 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/{id}/draft",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'code' => '<string>',
'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' => [
]
]
],
'enabled' => true,
'templateSource' => [
'templateId' => '<string>',
'platform' => true,
'templateVersion' => 123,
'templateOverrides' => [
]
]
]),
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/{id}/draft"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"code\": \"<string>\",\n \"trigger\": {\n \"enabled\": true,\n \"firstFunction\": \"<string>\"\n },\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 \"enabled\": true,\n \"templateSource\": {\n \"templateId\": \"<string>\",\n \"platform\": true,\n \"templateVersion\": 123,\n \"templateOverrides\": {}\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/{id}/draft")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"code\": \"<string>\",\n \"trigger\": {\n \"enabled\": true,\n \"firstFunction\": \"<string>\"\n },\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 \"enabled\": true,\n \"templateSource\": {\n \"templateId\": \"<string>\",\n \"platform\": true,\n \"templateVersion\": 123,\n \"templateOverrides\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/{id}/draft")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"code\": \"<string>\",\n \"trigger\": {\n \"enabled\": true,\n \"firstFunction\": \"<string>\"\n },\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 \"enabled\": true,\n \"templateSource\": {\n \"templateId\": \"<string>\",\n \"platform\": true,\n \"templateVersion\": 123,\n \"templateOverrides\": {}\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": {},
"enabled": true,
"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
m3ter supports machine to machine authentication using the clientCredentials OAuth2 flow.
The authorizationCode flow controls access for human users via the m3ter Console application.
Body
1 - 501 - 2001 - 80^([^[\p{Cntrl}\s]])|([^[\p{Cntrl}\s]][[^[\p{Cntrl}\s]] ]*[^[\p{Cntrl}\s]])$Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
SaveWorkflowDraft 200 response
Response containing a workflow
The UUID of the entity.
The version number:
- Create: On initial Create to insert a new entity, the version is set at 1 in the response.
- Update: On successful Update, the version is incremented by 1 in the response.
The DateTime when this item was created (in ISO-8601 format).
The DateTime when this item was last modified (in ISO-8601 format).
The ID of the user who created this item.
The ID of the user who last modified this item.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes