cURL
curl --request PATCH \
--url https://us.infisical.com/api/v1/agent-vault/skills/{skillId} \
--header 'Content-Type: application/json' \
--data '
{
"files": [
{
"path": "<string>",
"contentBase64": "<string>"
}
],
"baseVersion": 1
}
'import requests
url = "https://us.infisical.com/api/v1/agent-vault/skills/{skillId}"
payload = {
"files": [
{
"path": "<string>",
"contentBase64": "<string>"
}
],
"baseVersion": 1
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({files: [{path: '<string>', contentBase64: '<string>'}], baseVersion: 1})
};
fetch('https://us.infisical.com/api/v1/agent-vault/skills/{skillId}', 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://us.infisical.com/api/v1/agent-vault/skills/{skillId}",
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([
'files' => [
[
'path' => '<string>',
'contentBase64' => '<string>'
]
],
'baseVersion' => 1
]),
CURLOPT_HTTPHEADER => [
"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://us.infisical.com/api/v1/agent-vault/skills/{skillId}"
payload := strings.NewReader("{\n \"files\": [\n {\n \"path\": \"<string>\",\n \"contentBase64\": \"<string>\"\n }\n ],\n \"baseVersion\": 1\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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://us.infisical.com/api/v1/agent-vault/skills/{skillId}")
.header("Content-Type", "application/json")
.body("{\n \"files\": [\n {\n \"path\": \"<string>\",\n \"contentBase64\": \"<string>\"\n }\n ],\n \"baseVersion\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.infisical.com/api/v1/agent-vault/skills/{skillId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"files\": [\n {\n \"path\": \"<string>\",\n \"contentBase64\": \"<string>\"\n }\n ],\n \"baseVersion\": 1\n}"
response = http.request(request)
puts response.read_body{
"skill": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"latestVersion": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"version": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"sha256": "<string>",
"sizeBytes": 123,
"fileCount": 123,
"createdAt": "2023-11-07T05:31:56Z"
},
"unchanged": true
}{
"reqId": "<string>",
"statusCode": 400,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 401,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 403,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 404,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 422,
"error": "<string>",
"message": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 500,
"message": "<string>",
"error": "<string>"
}Update skill
Update a skill’s files. Each change is saved as a new version; if the files match the latest version, nothing is saved and that version is returned. If the name in SKILL.md differs, the skill is renamed, unless another skill already has that name.
PATCH
/
api
/
v1
/
agent-vault
/
skills
/
{skillId}
cURL
curl --request PATCH \
--url https://us.infisical.com/api/v1/agent-vault/skills/{skillId} \
--header 'Content-Type: application/json' \
--data '
{
"files": [
{
"path": "<string>",
"contentBase64": "<string>"
}
],
"baseVersion": 1
}
'import requests
url = "https://us.infisical.com/api/v1/agent-vault/skills/{skillId}"
payload = {
"files": [
{
"path": "<string>",
"contentBase64": "<string>"
}
],
"baseVersion": 1
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({files: [{path: '<string>', contentBase64: '<string>'}], baseVersion: 1})
};
fetch('https://us.infisical.com/api/v1/agent-vault/skills/{skillId}', 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://us.infisical.com/api/v1/agent-vault/skills/{skillId}",
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([
'files' => [
[
'path' => '<string>',
'contentBase64' => '<string>'
]
],
'baseVersion' => 1
]),
CURLOPT_HTTPHEADER => [
"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://us.infisical.com/api/v1/agent-vault/skills/{skillId}"
payload := strings.NewReader("{\n \"files\": [\n {\n \"path\": \"<string>\",\n \"contentBase64\": \"<string>\"\n }\n ],\n \"baseVersion\": 1\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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://us.infisical.com/api/v1/agent-vault/skills/{skillId}")
.header("Content-Type", "application/json")
.body("{\n \"files\": [\n {\n \"path\": \"<string>\",\n \"contentBase64\": \"<string>\"\n }\n ],\n \"baseVersion\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.infisical.com/api/v1/agent-vault/skills/{skillId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"files\": [\n {\n \"path\": \"<string>\",\n \"contentBase64\": \"<string>\"\n }\n ],\n \"baseVersion\": 1\n}"
response = http.request(request)
puts response.read_body{
"skill": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"latestVersion": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"version": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"sha256": "<string>",
"sizeBytes": 123,
"fileCount": 123,
"createdAt": "2023-11-07T05:31:56Z"
},
"unchanged": true
}{
"reqId": "<string>",
"statusCode": 400,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 401,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 403,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 404,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 422,
"error": "<string>",
"message": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 500,
"message": "<string>",
"error": "<string>"
}Path Parameters
The ID of the skill.
Body
application/json
Every file in the skill folder. One must be SKILL.md at the root, starting with a YAML header that sets name and description. At most 50 files, 256 KB per file and 1 MB in total.
Required array length:
1 - 1000 elementsShow child attributes
Show child attributes
The version these files were edited from. If a newer version has been saved since, nothing is saved and the request fails with 409. Omit it to update regardless.
Required range:
x > 0Was this page helpful?