Bulk remove repositories from indexing
curl --request DELETE \
--url https://api.devin.ai/v3beta1/organizations/{org_id}/repositories/indexing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"repository_paths": [
"<string>"
]
}
'import requests
url = "https://api.devin.ai/v3beta1/organizations/{org_id}/repositories/indexing"
payload = { "repository_paths": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({repository_paths: ['<string>']})
};
fetch('https://api.devin.ai/v3beta1/organizations/{org_id}/repositories/indexing', 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.devin.ai/v3beta1/organizations/{org_id}/repositories/indexing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'repository_paths' => [
'<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://api.devin.ai/v3beta1/organizations/{org_id}/repositories/indexing"
payload := strings.NewReader("{\n \"repository_paths\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.devin.ai/v3beta1/organizations/{org_id}/repositories/indexing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"repository_paths\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3beta1/organizations/{org_id}/repositories/indexing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"repository_paths\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"branches": [
"<string>"
],
"indexing_enabled": true,
"repository_path": "<string>",
"indexing_status": {
"indexing_enabled": true,
"latest_completed_search_index_job": {
"branch_name": "<string>",
"commit": "<string>",
"created_at": 123,
"job_id": "<string>",
"status": "failed"
},
"latest_completed_wiki_index_job": {
"branch_name": "<string>",
"commit": "<string>",
"created_at": 123,
"job_id": "<string>",
"status": "failed"
},
"latest_indexes": [
{
"branch_name": "<string>",
"commit": "<string>",
"created_at": 123,
"job_id": "<string>",
"status": "failed"
}
]
}
}
]{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}Repositories (Organization)
Bulk remove repositories from indexing
Disables indexing and clears configured branches for a batch of repositories.
DELETE
/
v3beta1
/
organizations
/
{org_id}
/
repositories
/
indexing
Bulk remove repositories from indexing
curl --request DELETE \
--url https://api.devin.ai/v3beta1/organizations/{org_id}/repositories/indexing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"repository_paths": [
"<string>"
]
}
'import requests
url = "https://api.devin.ai/v3beta1/organizations/{org_id}/repositories/indexing"
payload = { "repository_paths": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({repository_paths: ['<string>']})
};
fetch('https://api.devin.ai/v3beta1/organizations/{org_id}/repositories/indexing', 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.devin.ai/v3beta1/organizations/{org_id}/repositories/indexing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'repository_paths' => [
'<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://api.devin.ai/v3beta1/organizations/{org_id}/repositories/indexing"
payload := strings.NewReader("{\n \"repository_paths\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.devin.ai/v3beta1/organizations/{org_id}/repositories/indexing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"repository_paths\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3beta1/organizations/{org_id}/repositories/indexing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"repository_paths\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"branches": [
"<string>"
],
"indexing_enabled": true,
"repository_path": "<string>",
"indexing_status": {
"indexing_enabled": true,
"latest_completed_search_index_job": {
"branch_name": "<string>",
"commit": "<string>",
"created_at": 123,
"job_id": "<string>",
"status": "failed"
},
"latest_completed_wiki_index_job": {
"branch_name": "<string>",
"commit": "<string>",
"created_at": 123,
"job_id": "<string>",
"status": "failed"
},
"latest_indexes": [
{
"branch_name": "<string>",
"commit": "<string>",
"created_at": 123,
"job_id": "<string>",
"status": "failed"
}
]
}
}
]{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}Permissions
Requires a service user or personal access token. The permission check depends on how repository access is managed for your organization:- Organization-level permissions: the caller needs the
IndexOrgRepositoriespermission at the organization level. - Granular repository grants:
IndexOrgRepositoriesis not checked. The caller needs theReadpermission at the organization level, plus both therepo.use_readandrepo.indexgrants on every repository in the request. If any repository is missing either grant, the entire request is rejected with403and no repositories are removed.
Behavior
Disables indexing and clears all configured branches for the specified repositories. Returns 404 if any of the specified repositories are not found.Authorizations
Service User credential (prefix: cog_)
Path Parameters
Organization ID (prefix: org-)
Example:
"org-abc123def456"
Body
application/json
Required array length:
1 - 100 elements
