Promotes Artifact
curl --request POST \
--url https://eu1.api.matillion.com/dpc/v1/projects/{projectId}/artifacts/promotions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceEnvironmentName": "<string>",
"targetEnvironmentName": "<string>",
"versionName": "<string>"
}
'import requests
url = "https://eu1.api.matillion.com/dpc/v1/projects/{projectId}/artifacts/promotions"
payload = {
"sourceEnvironmentName": "<string>",
"targetEnvironmentName": "<string>",
"versionName": "<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({
sourceEnvironmentName: '<string>',
targetEnvironmentName: '<string>',
versionName: '<string>'
})
};
fetch('https://eu1.api.matillion.com/dpc/v1/projects/{projectId}/artifacts/promotions', 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://eu1.api.matillion.com/dpc/v1/projects/{projectId}/artifacts/promotions",
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([
'sourceEnvironmentName' => '<string>',
'targetEnvironmentName' => '<string>',
'versionName' => '<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://eu1.api.matillion.com/dpc/v1/projects/{projectId}/artifacts/promotions"
payload := strings.NewReader("{\n \"sourceEnvironmentName\": \"<string>\",\n \"targetEnvironmentName\": \"<string>\",\n \"versionName\": \"<string>\"\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://eu1.api.matillion.com/dpc/v1/projects/{projectId}/artifacts/promotions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sourceEnvironmentName\": \"<string>\",\n \"targetEnvironmentName\": \"<string>\",\n \"versionName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu1.api.matillion.com/dpc/v1/projects/{projectId}/artifacts/promotions")
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 \"sourceEnvironmentName\": \"<string>\",\n \"targetEnvironmentName\": \"<string>\",\n \"versionName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"environmentName": "<string>",
"versionName": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}Artifacts
Promotes Artifact
An endpoint to promote artifact from one environment to another
POST
/
v1
/
projects
/
{projectId}
/
artifacts
/
promotions
Promotes Artifact
curl --request POST \
--url https://eu1.api.matillion.com/dpc/v1/projects/{projectId}/artifacts/promotions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceEnvironmentName": "<string>",
"targetEnvironmentName": "<string>",
"versionName": "<string>"
}
'import requests
url = "https://eu1.api.matillion.com/dpc/v1/projects/{projectId}/artifacts/promotions"
payload = {
"sourceEnvironmentName": "<string>",
"targetEnvironmentName": "<string>",
"versionName": "<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({
sourceEnvironmentName: '<string>',
targetEnvironmentName: '<string>',
versionName: '<string>'
})
};
fetch('https://eu1.api.matillion.com/dpc/v1/projects/{projectId}/artifacts/promotions', 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://eu1.api.matillion.com/dpc/v1/projects/{projectId}/artifacts/promotions",
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([
'sourceEnvironmentName' => '<string>',
'targetEnvironmentName' => '<string>',
'versionName' => '<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://eu1.api.matillion.com/dpc/v1/projects/{projectId}/artifacts/promotions"
payload := strings.NewReader("{\n \"sourceEnvironmentName\": \"<string>\",\n \"targetEnvironmentName\": \"<string>\",\n \"versionName\": \"<string>\"\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://eu1.api.matillion.com/dpc/v1/projects/{projectId}/artifacts/promotions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sourceEnvironmentName\": \"<string>\",\n \"targetEnvironmentName\": \"<string>\",\n \"versionName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu1.api.matillion.com/dpc/v1/projects/{projectId}/artifacts/promotions")
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 \"sourceEnvironmentName\": \"<string>\",\n \"targetEnvironmentName\": \"<string>\",\n \"versionName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"environmentName": "<string>",
"versionName": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}Authorizations
a valid bearer token
Path Parameters
Body
application/json
The name of environment to promote the artifact from
Minimum string length:
1The name of environment to promote the artifact to
Minimum string length:
1The version of the artifact to be promoted
Minimum string length:
1Was this page helpful?
Get Artifact by a given version name
Previous
Get Artifact with assets details by a given version name
Next
⌘I
