Update AI tool
curl --request PATCH \
--url https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-tools/{toolKey} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"schema": "{}",
"maintainerId": "507f1f77bcf86cd799439011",
"maintainerTeamKey": "example-team-key",
"description": "description",
"customParameters": "{}",
"tags": [
"tags",
"tags"
]
}
'import requests
url = "https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-tools/{toolKey}"
payload = {
"schema": "{}",
"maintainerId": "507f1f77bcf86cd799439011",
"maintainerTeamKey": "example-team-key",
"description": "description",
"customParameters": "{}",
"tags": ["tags", "tags"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
schema: '{}',
maintainerId: '507f1f77bcf86cd799439011',
maintainerTeamKey: 'example-team-key',
description: 'description',
customParameters: '{}',
tags: ['tags', 'tags']
})
};
fetch('https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-tools/{toolKey}', 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.launchdarkly.com/api/v2/projects/{projectKey}/ai-tools/{toolKey}",
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([
'schema' => '{}',
'maintainerId' => '507f1f77bcf86cd799439011',
'maintainerTeamKey' => 'example-team-key',
'description' => 'description',
'customParameters' => '{}',
'tags' => [
'tags',
'tags'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-tools/{toolKey}"
payload := strings.NewReader("{\n \"schema\": \"{}\",\n \"maintainerId\": \"507f1f77bcf86cd799439011\",\n \"maintainerTeamKey\": \"example-team-key\",\n \"description\": \"description\",\n \"customParameters\": \"{}\",\n \"tags\": [\n \"tags\",\n \"tags\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-tools/{toolKey}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"schema\": \"{}\",\n \"maintainerId\": \"507f1f77bcf86cd799439011\",\n \"maintainerTeamKey\": \"example-team-key\",\n \"description\": \"description\",\n \"customParameters\": \"{}\",\n \"tags\": [\n \"tags\",\n \"tags\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-tools/{toolKey}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"schema\": \"{}\",\n \"maintainerId\": \"507f1f77bcf86cd799439011\",\n \"maintainerTeamKey\": \"example-team-key\",\n \"description\": \"description\",\n \"customParameters\": \"{}\",\n \"tags\": [\n \"tags\",\n \"tags\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"schema": "{}",
"createdAt": 6,
"_maintainer": {
"kind": "kind"
},
"_access": {
"allowed": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
],
"denied": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
]
},
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"_site": {
"href": "href",
"type": "type"
},
"description": "description",
"customParameters": "{}",
"version": 0,
"key": "key",
"tags": [
"tags",
"tags"
]
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}Update AI tool
Edit an existing AI tool.
PATCH
/
api
/
v2
/
projects
/
{projectKey}
/
ai-tools
/
{toolKey}
Update AI tool
curl --request PATCH \
--url https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-tools/{toolKey} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"schema": "{}",
"maintainerId": "507f1f77bcf86cd799439011",
"maintainerTeamKey": "example-team-key",
"description": "description",
"customParameters": "{}",
"tags": [
"tags",
"tags"
]
}
'import requests
url = "https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-tools/{toolKey}"
payload = {
"schema": "{}",
"maintainerId": "507f1f77bcf86cd799439011",
"maintainerTeamKey": "example-team-key",
"description": "description",
"customParameters": "{}",
"tags": ["tags", "tags"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
schema: '{}',
maintainerId: '507f1f77bcf86cd799439011',
maintainerTeamKey: 'example-team-key',
description: 'description',
customParameters: '{}',
tags: ['tags', 'tags']
})
};
fetch('https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-tools/{toolKey}', 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.launchdarkly.com/api/v2/projects/{projectKey}/ai-tools/{toolKey}",
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([
'schema' => '{}',
'maintainerId' => '507f1f77bcf86cd799439011',
'maintainerTeamKey' => 'example-team-key',
'description' => 'description',
'customParameters' => '{}',
'tags' => [
'tags',
'tags'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-tools/{toolKey}"
payload := strings.NewReader("{\n \"schema\": \"{}\",\n \"maintainerId\": \"507f1f77bcf86cd799439011\",\n \"maintainerTeamKey\": \"example-team-key\",\n \"description\": \"description\",\n \"customParameters\": \"{}\",\n \"tags\": [\n \"tags\",\n \"tags\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-tools/{toolKey}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"schema\": \"{}\",\n \"maintainerId\": \"507f1f77bcf86cd799439011\",\n \"maintainerTeamKey\": \"example-team-key\",\n \"description\": \"description\",\n \"customParameters\": \"{}\",\n \"tags\": [\n \"tags\",\n \"tags\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-tools/{toolKey}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"schema\": \"{}\",\n \"maintainerId\": \"507f1f77bcf86cd799439011\",\n \"maintainerTeamKey\": \"example-team-key\",\n \"description\": \"description\",\n \"customParameters\": \"{}\",\n \"tags\": [\n \"tags\",\n \"tags\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"schema": "{}",
"createdAt": 6,
"_maintainer": {
"kind": "kind"
},
"_access": {
"allowed": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
],
"denied": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
]
},
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"_site": {
"href": "href",
"type": "type"
},
"description": "description",
"customParameters": "{}",
"version": 0,
"key": "key",
"tags": [
"tags",
"tags"
]
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}Authorizations
Body
application/json
AI tool object to update
Example:
"507f1f77bcf86cd799439011"
Example:
"example-team-key"
JSON Schema defining the tool's parameters for LLM consumption
Custom metadata and configuration for application-level use (not sent to LLM)
Response
AI tool updated
JSON Schema defining the tool's parameters for LLM consumption
Show child attributes
Show child attributes
Example:
{
"allowed": [
{
"reason": {
"role_name": "role_name",
"notActions": [null, null],
"notResources": ["notResources", "notResources"],
"effect": "allow",
"resources": ["proj/*:env/*;qa_*:/flag/*"],
"actions": ["*"]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [null, null],
"notResources": ["notResources", "notResources"],
"effect": "allow",
"resources": ["proj/*:env/*;qa_*:/flag/*"],
"actions": ["*"]
},
"action": "action"
}
],
"denied": [
{
"reason": {
"role_name": "role_name",
"notActions": [null, null],
"notResources": ["notResources", "notResources"],
"effect": "allow",
"resources": ["proj/*:env/*;qa_*:/flag/*"],
"actions": ["*"]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [null, null],
"notResources": ["notResources", "notResources"],
"effect": "allow",
"resources": ["proj/*:env/*;qa_*:/flag/*"],
"actions": ["*"]
},
"action": "action"
}
]
}
The location and content type of related resources
Show child attributes
Show child attributes
Example:
{
"parent": { "href": "href", "type": "type" },
"self": { "href": "href", "type": "type" }
}
Show child attributes
Show child attributes
Example:
{ "href": "href", "type": "type" }
- Option 1
- Option 2
Show child attributes
Show child attributes
Example:
{ "kind": "kind" }
Custom metadata and configuration for application-level use (not sent to LLM)