curl --request POST \
--url https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"maintainerId": "507f1f77bcf86cd799439011",
"name": "PDF extraction",
"markdown": "markdown",
"maintainerTeamKey": "example-team-key",
"description": "Extracts text and tables from PDF files.",
"key": "pdf-extraction",
"tags": [
"documents"
]
}
'import requests
url = "https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills"
payload = {
"maintainerId": "507f1f77bcf86cd799439011",
"name": "PDF extraction",
"markdown": "markdown",
"maintainerTeamKey": "example-team-key",
"description": "Extracts text and tables from PDF files.",
"key": "pdf-extraction",
"tags": ["documents"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
maintainerId: '507f1f77bcf86cd799439011',
name: 'PDF extraction',
markdown: 'markdown',
maintainerTeamKey: 'example-team-key',
description: 'Extracts text and tables from PDF files.',
key: 'pdf-extraction',
tags: ['documents']
})
};
fetch('https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills', 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-configs/skills",
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([
'maintainerId' => '507f1f77bcf86cd799439011',
'name' => 'PDF extraction',
'markdown' => 'markdown',
'maintainerTeamKey' => 'example-team-key',
'description' => 'Extracts text and tables from PDF files.',
'key' => 'pdf-extraction',
'tags' => [
'documents'
]
]),
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-configs/skills"
payload := strings.NewReader("{\n \"maintainerId\": \"507f1f77bcf86cd799439011\",\n \"name\": \"PDF extraction\",\n \"markdown\": \"markdown\",\n \"maintainerTeamKey\": \"example-team-key\",\n \"description\": \"Extracts text and tables from PDF files.\",\n \"key\": \"pdf-extraction\",\n \"tags\": [\n \"documents\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"maintainerId\": \"507f1f77bcf86cd799439011\",\n \"name\": \"PDF extraction\",\n \"markdown\": \"markdown\",\n \"maintainerTeamKey\": \"example-team-key\",\n \"description\": \"Extracts text and tables from PDF files.\",\n \"key\": \"pdf-extraction\",\n \"tags\": [\n \"documents\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"maintainerId\": \"507f1f77bcf86cd799439011\",\n \"name\": \"PDF extraction\",\n \"markdown\": \"markdown\",\n \"maintainerTeamKey\": \"example-team-key\",\n \"description\": \"Extracts text and tables from PDF files.\",\n \"key\": \"pdf-extraction\",\n \"tags\": [\n \"documents\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"createdAt": 0,
"_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"
}
},
"name": "PDF extraction",
"markdown": "markdown",
"description": "Extracts text and tables from PDF files.",
"version": 2,
"key": "key",
"tags": [
"documents"
]
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}Create an agent skill
Create a new agent skill within the given project.
curl --request POST \
--url https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"maintainerId": "507f1f77bcf86cd799439011",
"name": "PDF extraction",
"markdown": "markdown",
"maintainerTeamKey": "example-team-key",
"description": "Extracts text and tables from PDF files.",
"key": "pdf-extraction",
"tags": [
"documents"
]
}
'import requests
url = "https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills"
payload = {
"maintainerId": "507f1f77bcf86cd799439011",
"name": "PDF extraction",
"markdown": "markdown",
"maintainerTeamKey": "example-team-key",
"description": "Extracts text and tables from PDF files.",
"key": "pdf-extraction",
"tags": ["documents"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
maintainerId: '507f1f77bcf86cd799439011',
name: 'PDF extraction',
markdown: 'markdown',
maintainerTeamKey: 'example-team-key',
description: 'Extracts text and tables from PDF files.',
key: 'pdf-extraction',
tags: ['documents']
})
};
fetch('https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills', 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-configs/skills",
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([
'maintainerId' => '507f1f77bcf86cd799439011',
'name' => 'PDF extraction',
'markdown' => 'markdown',
'maintainerTeamKey' => 'example-team-key',
'description' => 'Extracts text and tables from PDF files.',
'key' => 'pdf-extraction',
'tags' => [
'documents'
]
]),
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-configs/skills"
payload := strings.NewReader("{\n \"maintainerId\": \"507f1f77bcf86cd799439011\",\n \"name\": \"PDF extraction\",\n \"markdown\": \"markdown\",\n \"maintainerTeamKey\": \"example-team-key\",\n \"description\": \"Extracts text and tables from PDF files.\",\n \"key\": \"pdf-extraction\",\n \"tags\": [\n \"documents\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"maintainerId\": \"507f1f77bcf86cd799439011\",\n \"name\": \"PDF extraction\",\n \"markdown\": \"markdown\",\n \"maintainerTeamKey\": \"example-team-key\",\n \"description\": \"Extracts text and tables from PDF files.\",\n \"key\": \"pdf-extraction\",\n \"tags\": [\n \"documents\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"maintainerId\": \"507f1f77bcf86cd799439011\",\n \"name\": \"PDF extraction\",\n \"markdown\": \"markdown\",\n \"maintainerTeamKey\": \"example-team-key\",\n \"description\": \"Extracts text and tables from PDF files.\",\n \"key\": \"pdf-extraction\",\n \"tags\": [\n \"documents\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"createdAt": 0,
"_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"
}
},
"name": "PDF extraction",
"markdown": "markdown",
"description": "Extracts text and tables from PDF files.",
"version": 2,
"key": "key",
"tags": [
"documents"
]
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}Authorizations
Path Parameters
The project key
Body
Agent skill object to create
A unique key for the agent skill. The key must match ^[a-z0-9][a-z0-9-]*$: it can only contain lowercase letters, numbers, or '-', and must start with a lowercase letter or number. The key can be at most 64 characters, and Windows reserved file names (con, prn, aux, nul, com0-com9, and lpt0-lpt9) aren't allowed.
"pdf-extraction"
Human-readable name of the agent skill.
"PDF extraction"
The verbatim SKILL.md content of the agent skill
Human-readable description of what the agent skill does.
"Extracts text and tables from PDF files."
The ID of the member who maintains this resource
"507f1f77bcf86cd799439011"
The key of the team that maintains this resource
"example-team-key"
Tags for the agent skill. Tags can be used in custom role policies.
["documents"]
Response
Agent skill created
The agent skill key
Human-readable name of the agent skill.
"PDF extraction"
The verbatim SKILL.md content of the agent skill
Tags for the agent skill. Tags can be used in custom role policies.
["documents"]
Version of the agent skill. Starts at 1, and each update that changes the name, description, or markdown creates a new version. Pass this value with key in a variation's skills: [{key, version}].
2
Show child attributes
Show child attributes
{
"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
{
"parent": { "href": "href", "type": "type" },
"self": { "href": "href", "type": "type" }
}
The member or team that maintains this resource
- Option 1
- Option 2
Show child attributes
Show child attributes
{ "kind": "kind" }
Human-readable description of what the agent skill does.
"Extracts text and tables from PDF files."