cURL
curl --request POST \
--url https://platform.versori.com/api/switchboard/v1alpha1/organisations/{organisationId}/data-mappings \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceAppId": "<string>",
"sourceSchemaId": "<string>",
"targetAppId": "<string>",
"targetSchemaId": "<string>",
"definition": [
{
"sourceField": "<string>",
"targetField": "<string>"
}
]
}
'import requests
url = "https://platform.versori.com/api/switchboard/v1alpha1/organisations/{organisationId}/data-mappings"
payload = {
"sourceAppId": "<string>",
"sourceSchemaId": "<string>",
"targetAppId": "<string>",
"targetSchemaId": "<string>",
"definition": [
{
"sourceField": "<string>",
"targetField": "<string>"
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sourceAppId: '<string>',
sourceSchemaId: '<string>',
targetAppId: '<string>',
targetSchemaId: '<string>',
definition: [{sourceField: '<string>', targetField: '<string>'}]
})
};
fetch('https://platform.versori.com/api/switchboard/v1alpha1/organisations/{organisationId}/data-mappings', 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://platform.versori.com/api/switchboard/v1alpha1/organisations/{organisationId}/data-mappings",
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([
'sourceAppId' => '<string>',
'sourceSchemaId' => '<string>',
'targetAppId' => '<string>',
'targetSchemaId' => '<string>',
'definition' => [
[
'sourceField' => '<string>',
'targetField' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://platform.versori.com/api/switchboard/v1alpha1/organisations/{organisationId}/data-mappings"
payload := strings.NewReader("{\n \"sourceAppId\": \"<string>\",\n \"sourceSchemaId\": \"<string>\",\n \"targetAppId\": \"<string>\",\n \"targetSchemaId\": \"<string>\",\n \"definition\": [\n {\n \"sourceField\": \"<string>\",\n \"targetField\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://platform.versori.com/api/switchboard/v1alpha1/organisations/{organisationId}/data-mappings")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sourceAppId\": \"<string>\",\n \"sourceSchemaId\": \"<string>\",\n \"targetAppId\": \"<string>\",\n \"targetSchemaId\": \"<string>\",\n \"definition\": [\n {\n \"sourceField\": \"<string>\",\n \"targetField\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.versori.com/api/switchboard/v1alpha1/organisations/{organisationId}/data-mappings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sourceAppId\": \"<string>\",\n \"sourceSchemaId\": \"<string>\",\n \"targetAppId\": \"<string>\",\n \"targetSchemaId\": \"<string>\",\n \"definition\": [\n {\n \"sourceField\": \"<string>\",\n \"targetField\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"orgId": "<string>",
"sourceSchemaId": "<string>",
"targetSchemaId": "<string>",
"definition": [
{
"sourceField": "<string>",
"targetField": "<string>"
}
],
"sourceApp": {
"id": "<string>",
"orgId": "<string>",
"name": "<string>",
"public": true,
"server": {
"name": "<string>",
"url": "<string>"
},
"schemaMetadata": {
"type": "<string>",
"version": "<string>",
"url": "<string>"
},
"schema": {
"id": "<string>",
"type": "<string>",
"version": "<string>",
"sourceUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"supportedAuthConfigs": [
{
"type": "<string>",
"isValid": true,
"data": {
"discoveryUrl": "<string>",
"clientId": "<string>",
"clientSecret": "<string>",
"scopes": {}
}
}
],
"imageUrl": "<string>",
"schemaId": "<string>",
"deletedAt": "2023-11-07T05:31:56Z"
},
"targetApp": {
"id": "<string>",
"orgId": "<string>",
"name": "<string>",
"public": true,
"server": {
"name": "<string>",
"url": "<string>"
},
"schemaMetadata": {
"type": "<string>",
"version": "<string>",
"url": "<string>"
},
"schema": {
"id": "<string>",
"type": "<string>",
"version": "<string>",
"sourceUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"supportedAuthConfigs": [
{
"type": "<string>",
"isValid": true,
"data": {
"discoveryUrl": "<string>",
"clientId": "<string>",
"clientSecret": "<string>",
"scopes": {}
}
}
],
"imageUrl": "<string>",
"schemaId": "<string>",
"deletedAt": "2023-11-07T05:31:56Z"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"extensions": {}
}data-mappings
Post organisations data mappings
Create a new DataMapping for the provided organisation.
POST
/
organisations
/
{organisationId}
/
data-mappings
cURL
curl --request POST \
--url https://platform.versori.com/api/switchboard/v1alpha1/organisations/{organisationId}/data-mappings \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceAppId": "<string>",
"sourceSchemaId": "<string>",
"targetAppId": "<string>",
"targetSchemaId": "<string>",
"definition": [
{
"sourceField": "<string>",
"targetField": "<string>"
}
]
}
'import requests
url = "https://platform.versori.com/api/switchboard/v1alpha1/organisations/{organisationId}/data-mappings"
payload = {
"sourceAppId": "<string>",
"sourceSchemaId": "<string>",
"targetAppId": "<string>",
"targetSchemaId": "<string>",
"definition": [
{
"sourceField": "<string>",
"targetField": "<string>"
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sourceAppId: '<string>',
sourceSchemaId: '<string>',
targetAppId: '<string>',
targetSchemaId: '<string>',
definition: [{sourceField: '<string>', targetField: '<string>'}]
})
};
fetch('https://platform.versori.com/api/switchboard/v1alpha1/organisations/{organisationId}/data-mappings', 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://platform.versori.com/api/switchboard/v1alpha1/organisations/{organisationId}/data-mappings",
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([
'sourceAppId' => '<string>',
'sourceSchemaId' => '<string>',
'targetAppId' => '<string>',
'targetSchemaId' => '<string>',
'definition' => [
[
'sourceField' => '<string>',
'targetField' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://platform.versori.com/api/switchboard/v1alpha1/organisations/{organisationId}/data-mappings"
payload := strings.NewReader("{\n \"sourceAppId\": \"<string>\",\n \"sourceSchemaId\": \"<string>\",\n \"targetAppId\": \"<string>\",\n \"targetSchemaId\": \"<string>\",\n \"definition\": [\n {\n \"sourceField\": \"<string>\",\n \"targetField\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://platform.versori.com/api/switchboard/v1alpha1/organisations/{organisationId}/data-mappings")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sourceAppId\": \"<string>\",\n \"sourceSchemaId\": \"<string>\",\n \"targetAppId\": \"<string>\",\n \"targetSchemaId\": \"<string>\",\n \"definition\": [\n {\n \"sourceField\": \"<string>\",\n \"targetField\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.versori.com/api/switchboard/v1alpha1/organisations/{organisationId}/data-mappings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sourceAppId\": \"<string>\",\n \"sourceSchemaId\": \"<string>\",\n \"targetAppId\": \"<string>\",\n \"targetSchemaId\": \"<string>\",\n \"definition\": [\n {\n \"sourceField\": \"<string>\",\n \"targetField\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"orgId": "<string>",
"sourceSchemaId": "<string>",
"targetSchemaId": "<string>",
"definition": [
{
"sourceField": "<string>",
"targetField": "<string>"
}
],
"sourceApp": {
"id": "<string>",
"orgId": "<string>",
"name": "<string>",
"public": true,
"server": {
"name": "<string>",
"url": "<string>"
},
"schemaMetadata": {
"type": "<string>",
"version": "<string>",
"url": "<string>"
},
"schema": {
"id": "<string>",
"type": "<string>",
"version": "<string>",
"sourceUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"supportedAuthConfigs": [
{
"type": "<string>",
"isValid": true,
"data": {
"discoveryUrl": "<string>",
"clientId": "<string>",
"clientSecret": "<string>",
"scopes": {}
}
}
],
"imageUrl": "<string>",
"schemaId": "<string>",
"deletedAt": "2023-11-07T05:31:56Z"
},
"targetApp": {
"id": "<string>",
"orgId": "<string>",
"name": "<string>",
"public": true,
"server": {
"name": "<string>",
"url": "<string>"
},
"schemaMetadata": {
"type": "<string>",
"version": "<string>",
"url": "<string>"
},
"schema": {
"id": "<string>",
"type": "<string>",
"version": "<string>",
"sourceUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"supportedAuthConfigs": [
{
"type": "<string>",
"isValid": true,
"data": {
"discoveryUrl": "<string>",
"clientId": "<string>",
"clientSecret": "<string>",
"scopes": {}
}
}
],
"imageUrl": "<string>",
"schemaId": "<string>",
"deletedAt": "2023-11-07T05:31:56Z"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"extensions": {}
}Authorizations
Path Parameters
Body
application/json
Payload to create a new DataMapping.
DataMappingCreate is the request body to create a new data mapping. The ID is automatically generated and the organisation ID is defined by the request's path parameter.
The ID of the source App instance.
The ID of the source app operation, for OpenAPI this will be the operationId field if set, otherwise the
request's type and path.
The ID of the target App instance.
The ID of the target app operation, for OpenAPI this will be the operationId field if set, otherwise the
request's type and path.
Show child attributes
Show child attributes
Response
A single DataMapping result
⌘I