Bulk upload project secret files
curl --request POST \
--url https://api.runaether.dev/projects/{projectID}/secret-files/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"files": [
{
"content": "<string>",
"file_path": "<string>"
}
]
}
'import requests
url = "https://api.runaether.dev/projects/{projectID}/secret-files/bulk"
payload = { "files": [
{
"content": "<string>",
"file_path": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({files: [{content: '<string>', file_path: '<string>'}]})
};
fetch('https://api.runaether.dev/projects/{projectID}/secret-files/bulk', 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.runaether.dev/projects/{projectID}/secret-files/bulk",
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([
'files' => [
[
'content' => '<string>',
'file_path' => '<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.runaether.dev/projects/{projectID}/secret-files/bulk"
payload := strings.NewReader("{\n \"files\": [\n {\n \"content\": \"<string>\",\n \"file_path\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.runaether.dev/projects/{projectID}/secret-files/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"files\": [\n {\n \"content\": \"<string>\",\n \"file_path\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/projects/{projectID}/secret-files/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"files\": [\n {\n \"content\": \"<string>\",\n \"file_path\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"created_at": "2023-11-07T05:31:56Z",
"file_key": "<string>",
"file_path": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}Secret Files
Bulk upload project secret files
Creates or replaces up to 100 secret files by path in one transaction, answering with the project's secret files after it.
Use this tool when you need to:
- Upload several secret files to a project at once, all or nothing
- Copy a set of secret files from another project or a local checkout
Examples:
- POST /projects/6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21/secret-files/bulk {"files": [{"file_path": ".env", "content": "API_KEY=sk_test_51Hx9\n"}, {"file_path": "config/secrets.json", "content": "{\"token\": \"abc\"}"}]}
Hints:
- projectID is the project's uuid. files is required, at most 100 items, each with file_path (non-empty) and content (at most 1,048,576 characters, may be empty); the schema answers 422 for more than 100 files, a missing field, an empty file_path or longer content, and a projectID that is not a uuid.
- file_path is project-relative: one containing .. or starting with / is refused with 400, as is content over 1 MiB (1,048,576 bytes) in UTF-8; every refusal writes nothing.
- Each file is created or replaced at its path, and the project's other files are kept; an empty files list writes nothing and answers the list.
- Answers 200 with every secret file of the project, sorted by file_path and without content, as listProjectSecretFiles returns them.
- Use setProjectSecretFile instead to write one file by key, and deleteProjectSecretFile to remove one.
- Restricted to an owner or admin of the project's organization: a member is refused with 403 control_forbidden, a viewer or billing member with 403 org_role_insufficient, a suspended organization with 403 org_suspended, and an agent host's grant with 403 agent_host_route_not_allowed; a project that does not exist, is archived or is in an organization the caller does not belong to is 404; 503 when the membership check is unavailable.
POST
/
projects
/
{projectID}
/
secret-files
/
bulk
Bulk upload project secret files
curl --request POST \
--url https://api.runaether.dev/projects/{projectID}/secret-files/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"files": [
{
"content": "<string>",
"file_path": "<string>"
}
]
}
'import requests
url = "https://api.runaether.dev/projects/{projectID}/secret-files/bulk"
payload = { "files": [
{
"content": "<string>",
"file_path": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({files: [{content: '<string>', file_path: '<string>'}]})
};
fetch('https://api.runaether.dev/projects/{projectID}/secret-files/bulk', 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.runaether.dev/projects/{projectID}/secret-files/bulk",
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([
'files' => [
[
'content' => '<string>',
'file_path' => '<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.runaether.dev/projects/{projectID}/secret-files/bulk"
payload := strings.NewReader("{\n \"files\": [\n {\n \"content\": \"<string>\",\n \"file_path\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.runaether.dev/projects/{projectID}/secret-files/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"files\": [\n {\n \"content\": \"<string>\",\n \"file_path\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/projects/{projectID}/secret-files/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"files\": [\n {\n \"content\": \"<string>\",\n \"file_path\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"created_at": "2023-11-07T05:31:56Z",
"file_key": "<string>",
"file_path": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}