cURL
curl --request POST \
--url https://api.staging.qyl.dev/api/v1/deployments \
--header 'Content-Type: application/json' \
--data '
{
"service_name": "<string>",
"service_version": "2.1.0",
"deployed_by": "<string>",
"git_commit": "<string>",
"git_branch": "<string>"
}
'import requests
url = "https://api.staging.qyl.dev/api/v1/deployments"
payload = {
"service_name": "<string>",
"service_version": "2.1.0",
"deployed_by": "<string>",
"git_commit": "<string>",
"git_branch": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
service_name: '<string>',
service_version: '2.1.0',
deployed_by: '<string>',
git_commit: '<string>',
git_branch: '<string>'
})
};
fetch('https://api.staging.qyl.dev/api/v1/deployments', 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.staging.qyl.dev/api/v1/deployments",
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([
'service_name' => '<string>',
'service_version' => '2.1.0',
'deployed_by' => '<string>',
'git_commit' => '<string>',
'git_branch' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.staging.qyl.dev/api/v1/deployments"
payload := strings.NewReader("{\n \"service_name\": \"<string>\",\n \"service_version\": \"2.1.0\",\n \"deployed_by\": \"<string>\",\n \"git_commit\": \"<string>\",\n \"git_branch\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.staging.qyl.dev/api/v1/deployments")
.header("Content-Type", "application/json")
.body("{\n \"service_name\": \"<string>\",\n \"service_version\": \"2.1.0\",\n \"deployed_by\": \"<string>\",\n \"git_commit\": \"<string>\",\n \"git_branch\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.qyl.dev/api/v1/deployments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"service_name\": \"<string>\",\n \"service_version\": \"2.1.0\",\n \"deployed_by\": \"<string>\",\n \"git_commit\": \"<string>\",\n \"git_branch\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"deployment.id": "<string>",
"service.name": "<string>",
"service.version": "2.1.0",
"environment": "development",
"status": "pending",
"strategy": "rolling",
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z",
"duration_s": 1,
"deployed_by": "<string>",
"git_commit": "<string>",
"git_branch": "<string>",
"previous_version": "2.1.0",
"rollback_target": "<string>",
"replica_count": 123,
"healthy_replicas": 123,
"error_message": "<string>"
}{
"type": "about:blank",
"title": "Validation Failed",
"status": 123,
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>",
"rejected_value": "<string>"
}
],
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"type": "about:blank",
"title": "Internal Server Error",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"error_code": "<string>"
}Deployments
Post apiv1deployments
Record new deployment
POST
/
api
/
v1
/
deployments
cURL
curl --request POST \
--url https://api.staging.qyl.dev/api/v1/deployments \
--header 'Content-Type: application/json' \
--data '
{
"service_name": "<string>",
"service_version": "2.1.0",
"deployed_by": "<string>",
"git_commit": "<string>",
"git_branch": "<string>"
}
'import requests
url = "https://api.staging.qyl.dev/api/v1/deployments"
payload = {
"service_name": "<string>",
"service_version": "2.1.0",
"deployed_by": "<string>",
"git_commit": "<string>",
"git_branch": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
service_name: '<string>',
service_version: '2.1.0',
deployed_by: '<string>',
git_commit: '<string>',
git_branch: '<string>'
})
};
fetch('https://api.staging.qyl.dev/api/v1/deployments', 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.staging.qyl.dev/api/v1/deployments",
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([
'service_name' => '<string>',
'service_version' => '2.1.0',
'deployed_by' => '<string>',
'git_commit' => '<string>',
'git_branch' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.staging.qyl.dev/api/v1/deployments"
payload := strings.NewReader("{\n \"service_name\": \"<string>\",\n \"service_version\": \"2.1.0\",\n \"deployed_by\": \"<string>\",\n \"git_commit\": \"<string>\",\n \"git_branch\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.staging.qyl.dev/api/v1/deployments")
.header("Content-Type", "application/json")
.body("{\n \"service_name\": \"<string>\",\n \"service_version\": \"2.1.0\",\n \"deployed_by\": \"<string>\",\n \"git_commit\": \"<string>\",\n \"git_branch\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.qyl.dev/api/v1/deployments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"service_name\": \"<string>\",\n \"service_version\": \"2.1.0\",\n \"deployed_by\": \"<string>\",\n \"git_commit\": \"<string>\",\n \"git_branch\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"deployment.id": "<string>",
"service.name": "<string>",
"service.version": "2.1.0",
"environment": "development",
"status": "pending",
"strategy": "rolling",
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z",
"duration_s": 1,
"deployed_by": "<string>",
"git_commit": "<string>",
"git_branch": "<string>",
"previous_version": "2.1.0",
"rollback_target": "<string>",
"replica_count": 123,
"healthy_replicas": 123,
"error_message": "<string>"
}{
"type": "about:blank",
"title": "Validation Failed",
"status": 123,
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>",
"rejected_value": "<string>"
}
],
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"type": "about:blank",
"title": "Internal Server Error",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"error_code": "<string>"
}Body
application/json
Deployment creation request
Service name
Service version
Pattern:
^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$Example:
"2.1.0"
Environment
Available options:
development, testing, staging, production, preview, canary Strategy
Available options:
rolling, blue_green, canary, recreate, ab_test, shadow, feature_flag Deployed by
Git commit SHA
Git branch
Response
The request has succeeded.
Complete deployment record
Deployment ID
Service name
Service version
Pattern:
^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$Example:
"2.1.0"
Environment
Available options:
development, testing, staging, production, preview, canary Status
Available options:
pending, in_progress, success, failed, rolled_back, cancelled Strategy
Available options:
rolling, blue_green, canary, recreate, ab_test, shadow, feature_flag Start time
End time
Duration in seconds
Required range:
x >= 0Deployed by (user/system)
Git commit SHA
Git branch
Previous version
Pattern:
^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$Example:
"2.1.0"
Rollback target (if rolled back)
Replica count
Healthy replica count
Error message (if failed)
Was this page helpful?
