Update a project
curl --request PATCH \
--url https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{keyOrId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"applicationId": "550e8400-e29b-41d4-a716-446655440001"
}
'import requests
url = "https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{keyOrId}"
payload = { "applicationId": "550e8400-e29b-41d4-a716-446655440001" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({applicationId: '550e8400-e29b-41d4-a716-446655440001'})
};
fetch('https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{keyOrId}', 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.qlty.sh/gh/{ownerKeyOrId}/projects/{keyOrId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'applicationId' => '550e8400-e29b-41d4-a716-446655440001'
]),
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.qlty.sh/gh/{ownerKeyOrId}/projects/{keyOrId}"
payload := strings.NewReader("{\n \"applicationId\": \"550e8400-e29b-41d4-a716-446655440001\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{keyOrId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"applicationId\": \"550e8400-e29b-41d4-a716-446655440001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{keyOrId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"applicationId\": \"550e8400-e29b-41d4-a716-446655440001\"\n}"
response = http.request(request)
puts response.read_body{
"id": "85fae897-5a48-483b-ad29-1852c0db1707",
"workspaceId": "1c47b6fd-db56-4fbd-9cf0-4d88f9631050",
"providerUrl": "https://github.com/acmeco/awesome-project",
"key": "awesome-project",
"workspaceKey": "acmeco",
"applicationId": "550e8400-e29b-41d4-a716-446655440001"
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}Projects
Update a project
Assign a Project to an Application, or pass applicationId: null to unassign it. The Workspace must have Applications enabled.
PATCH
/
gh
/
{ownerKeyOrId}
/
projects
/
{keyOrId}
Update a project
curl --request PATCH \
--url https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{keyOrId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"applicationId": "550e8400-e29b-41d4-a716-446655440001"
}
'import requests
url = "https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{keyOrId}"
payload = { "applicationId": "550e8400-e29b-41d4-a716-446655440001" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({applicationId: '550e8400-e29b-41d4-a716-446655440001'})
};
fetch('https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{keyOrId}', 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.qlty.sh/gh/{ownerKeyOrId}/projects/{keyOrId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'applicationId' => '550e8400-e29b-41d4-a716-446655440001'
]),
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.qlty.sh/gh/{ownerKeyOrId}/projects/{keyOrId}"
payload := strings.NewReader("{\n \"applicationId\": \"550e8400-e29b-41d4-a716-446655440001\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{keyOrId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"applicationId\": \"550e8400-e29b-41d4-a716-446655440001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{keyOrId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"applicationId\": \"550e8400-e29b-41d4-a716-446655440001\"\n}"
response = http.request(request)
puts response.read_body{
"id": "85fae897-5a48-483b-ad29-1852c0db1707",
"workspaceId": "1c47b6fd-db56-4fbd-9cf0-4d88f9631050",
"providerUrl": "https://github.com/acmeco/awesome-project",
"key": "awesome-project",
"workspaceKey": "acmeco",
"applicationId": "550e8400-e29b-41d4-a716-446655440001"
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}Authorizations
Generate an API token at https://qlty.sh/user/settings/tokens
Path Parameters
Repository owner name (login) or workspace ID
Minimum string length:
3Example:
"acme-corp"
Repository name or project ID
Minimum string length:
3Example:
"my-repo"
Body
application/json
Fields to update
ID of the Application to assign this Project to, or null to unassign it
Example:
"550e8400-e29b-41d4-a716-446655440001"
Response
The updated project
Example:
"550e8400-e29b-41d4-a716-446655440000"
Example:
"ws_abc123"
URL to the repository on the provider
Example:
"https://github.com/acme-corp/my-repo"
Repository name
Example:
"my-repo"
Key of the workspace this project belongs to
Example:
"acme-corp"
ID of the Application this project is assigned to, or null when unassigned
Example:
"550e8400-e29b-41d4-a716-446655440001"