Change a package's visibility or deprecation notice
curl --request PATCH \
--url https://api.primeintellect.ai/api/v1/hub/packages/{owner}/{name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deprecation_notice": "<string>"
}
'import requests
url = "https://api.primeintellect.ai/api/v1/hub/packages/{owner}/{name}"
payload = { "deprecation_notice": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({deprecation_notice: '<string>'})
};
fetch('https://api.primeintellect.ai/api/v1/hub/packages/{owner}/{name}', 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.primeintellect.ai/api/v1/hub/packages/{owner}/{name}",
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([
'deprecation_notice' => '<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.primeintellect.ai/api/v1/hub/packages/{owner}/{name}"
payload := strings.NewReader("{\n \"deprecation_notice\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.primeintellect.ai/api/v1/hub/packages/{owner}/{name}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"deprecation_notice\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.primeintellect.ai/api/v1/hub/packages/{owner}/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"deprecation_notice\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"owner": {
"kind": "user",
"slug": "<string>",
"id": "<string>",
"name": "<string>",
"image": "<string>"
},
"user_id": "<string>",
"name": "<string>",
"description": "<string>",
"license": "<string>",
"tags": [
"<string>"
],
"visibility": "public",
"is_hidden": true,
"is_featured": true,
"framework": "v0",
"bookmark_count": 123,
"install_count": 123,
"latest": {
"id": "<string>",
"version": "<string>",
"display_version": "<string>",
"content_hash": "<string>",
"framework": "v0",
"created_at": "2023-11-07T05:31:56Z",
"source": {
"filename": "<string>",
"sha256": "<string>"
},
"wheel": {
"filename": "<string>",
"sha256": "<string>"
},
"index_status": "processing",
"pushed_by": {
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"image": "<string>"
},
"refs": [
"<string>"
],
"yanked": false,
"yank_reason": "<string>",
"metadata": {}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"release_count": 123,
"latest_indexed_id": "<string>",
"allow_sandbox_access": true,
"allow_instances_access": true,
"allow_tunnel_access": true,
"forked_from": {
"id": "<string>",
"name": "<string>",
"owner": {
"kind": "user",
"slug": "<string>",
"id": "<string>",
"name": "<string>",
"image": "<string>"
}
},
"has_write_access": true,
"deprecation_notice": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Hub
Change a package's visibility or deprecation notice
PATCH
/
api
/
v1
/
hub
/
packages
/
{owner}
/
{name}
Change a package's visibility or deprecation notice
curl --request PATCH \
--url https://api.primeintellect.ai/api/v1/hub/packages/{owner}/{name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deprecation_notice": "<string>"
}
'import requests
url = "https://api.primeintellect.ai/api/v1/hub/packages/{owner}/{name}"
payload = { "deprecation_notice": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({deprecation_notice: '<string>'})
};
fetch('https://api.primeintellect.ai/api/v1/hub/packages/{owner}/{name}', 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.primeintellect.ai/api/v1/hub/packages/{owner}/{name}",
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([
'deprecation_notice' => '<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.primeintellect.ai/api/v1/hub/packages/{owner}/{name}"
payload := strings.NewReader("{\n \"deprecation_notice\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.primeintellect.ai/api/v1/hub/packages/{owner}/{name}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"deprecation_notice\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.primeintellect.ai/api/v1/hub/packages/{owner}/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"deprecation_notice\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"owner": {
"kind": "user",
"slug": "<string>",
"id": "<string>",
"name": "<string>",
"image": "<string>"
},
"user_id": "<string>",
"name": "<string>",
"description": "<string>",
"license": "<string>",
"tags": [
"<string>"
],
"visibility": "public",
"is_hidden": true,
"is_featured": true,
"framework": "v0",
"bookmark_count": 123,
"install_count": 123,
"latest": {
"id": "<string>",
"version": "<string>",
"display_version": "<string>",
"content_hash": "<string>",
"framework": "v0",
"created_at": "2023-11-07T05:31:56Z",
"source": {
"filename": "<string>",
"sha256": "<string>"
},
"wheel": {
"filename": "<string>",
"sha256": "<string>"
},
"index_status": "processing",
"pushed_by": {
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"image": "<string>"
},
"refs": [
"<string>"
],
"yanked": false,
"yank_reason": "<string>",
"metadata": {}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"release_count": 123,
"latest_indexed_id": "<string>",
"allow_sandbox_access": true,
"allow_instances_access": true,
"allow_tunnel_access": true,
"forked_from": {
"id": "<string>",
"name": "<string>",
"owner": {
"kind": "user",
"slug": "<string>",
"id": "<string>",
"name": "<string>",
"image": "<string>"
}
},
"has_write_access": true,
"deprecation_notice": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Authorizations
Path Parameters
Body
application/json
Response
Successful Response
Was this page helpful?