Archive a repo
curl --request POST \
--url https://app.kosli.com/api/v2/repos/{org}/{repo}/archive \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.kosli.com/api/v2/repos/{org}/{repo}/archive"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.kosli.com/api/v2/repos/{org}/{repo}/archive', 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://app.kosli.com/api/v2/repos/{org}/{repo}/archive",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.kosli.com/api/v2/repos/{org}/{repo}/archive"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.kosli.com/api/v2/repos/{org}/{repo}/archive")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kosli.com/api/v2/repos/{org}/{repo}/archive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"url": "<string>",
"short_name": "<string>",
"provider": "github",
"repo_id": "<string>",
"vcs_instance": "<string>",
"namespace_path": [
"<string>"
],
"additional_info": {},
"description": "<string>",
"tags": {},
"_links": {},
"moved_to": "<string>",
"moved_at": 123,
"moved_by": "<string>",
"archived_at": 123,
"archived_by": "<string>",
"moved_from": [
"<string>"
]
}{
"message": "Only an org admin can archive repos"
}{
"message": "Repo not found"
}Archive a repo
Beta — the Repo moves feature is in beta. Requests from organizations without it enabled receive 403 Forbidden.
Archive the repo with internal id {repo}: it leaves the repo list and its filter options unless archived=true is given, and a lookup by id still finds it. Reported evidence is unchanged, and new reports for the repo are still accepted without unarchiving it. Archiving an archived repo changes nothing.
POST
/
repos
/
{org}
/
{repo}
/
archive
Archive a repo
curl --request POST \
--url https://app.kosli.com/api/v2/repos/{org}/{repo}/archive \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.kosli.com/api/v2/repos/{org}/{repo}/archive"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.kosli.com/api/v2/repos/{org}/{repo}/archive', 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://app.kosli.com/api/v2/repos/{org}/{repo}/archive",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.kosli.com/api/v2/repos/{org}/{repo}/archive"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.kosli.com/api/v2/repos/{org}/{repo}/archive")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kosli.com/api/v2/repos/{org}/{repo}/archive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"url": "<string>",
"short_name": "<string>",
"provider": "github",
"repo_id": "<string>",
"vcs_instance": "<string>",
"namespace_path": [
"<string>"
],
"additional_info": {},
"description": "<string>",
"tags": {},
"_links": {},
"moved_to": "<string>",
"moved_at": 123,
"moved_by": "<string>",
"archived_at": 123,
"archived_by": "<string>",
"moved_from": [
"<string>"
]
}{
"message": "Only an org admin can archive repos"
}{
"message": "Repo not found"
}Authorizations
Response
Successful Response