cURL
curl --request POST \
--url https://us.infisical.com/api/v1/agent-vault/skills/{skillId}/versions/{version}/restoreimport requests
url = "https://us.infisical.com/api/v1/agent-vault/skills/{skillId}/versions/{version}/restore"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://us.infisical.com/api/v1/agent-vault/skills/{skillId}/versions/{version}/restore', 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}/versions/{version}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://us.infisical.com/api/v1/agent-vault/skills/{skillId}/versions/{version}/restore"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://us.infisical.com/api/v1/agent-vault/skills/{skillId}/versions/{version}/restore")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.infisical.com/api/v1/agent-vault/skills/{skillId}/versions/{version}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
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>"
}Restore skill version
Restore an earlier version of a skill by publishing a copy of its files as a new version. The versions in between are kept. The skill keeps its current name: if the restored SKILL.md names it differently, its name line is changed to the current name. If the files match the latest version, nothing is published and that version is returned.
POST
/
api
/
v1
/
agent-vault
/
skills
/
{skillId}
/
versions
/
{version}
/
restore
cURL
curl --request POST \
--url https://us.infisical.com/api/v1/agent-vault/skills/{skillId}/versions/{version}/restoreimport requests
url = "https://us.infisical.com/api/v1/agent-vault/skills/{skillId}/versions/{version}/restore"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://us.infisical.com/api/v1/agent-vault/skills/{skillId}/versions/{version}/restore', 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}/versions/{version}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://us.infisical.com/api/v1/agent-vault/skills/{skillId}/versions/{version}/restore"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://us.infisical.com/api/v1/agent-vault/skills/{skillId}/versions/{version}/restore")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.infisical.com/api/v1/agent-vault/skills/{skillId}/versions/{version}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
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.
The version number. Versions count up from 1, and the newest 20 are kept.
Required range:
1 <= x <= 2147483647Was this page helpful?