curl --request POST \
--url https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/upload-tokens \
--header 'Content-Type: application/json' \
--cookie apsio_session= \
--data '
{
"name": "<string>",
"days": 90
}
'import requests
url = "https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/upload-tokens"
payload = {
"name": "<string>",
"days": 90
}
headers = {
"cookie": "apsio_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'apsio_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', days: 90})
};
fetch('https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/upload-tokens', 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.apsio.io/v1/orgs/{orgId}/projects/{projectId}/upload-tokens",
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([
'name' => '<string>',
'days' => 90
]),
CURLOPT_COOKIE => "apsio_session=",
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://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/upload-tokens"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"days\": 90\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "apsio_session=")
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.apsio.io/v1/orgs/{orgId}/projects/{projectId}/upload-tokens")
.header("cookie", "apsio_session=")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"days\": 90\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/upload-tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'apsio_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"days\": 90\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"project_id": "<string>",
"name": "<string>",
"created_by": "<string>",
"created_by_name": "<string>",
"created_at": "<string>",
"expires_at": "<string>",
"last_used_at": "<string>",
"token": "<string>"
}Create a symbol upload token
A token that uploads this project’s symbols (dSYMs, R8 mappings, NDK libraries, source maps) and nothing else, for 7, 30, 90, 365 days (90 by default). Owners and admins, from a console session only; audited as symbol_upload_token.create. The token is in this answer only: Apsio keeps its SHA-256, never the token. A project has at most 50 live tokens: past that, a 422 (revoke one first).
curl --request POST \
--url https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/upload-tokens \
--header 'Content-Type: application/json' \
--cookie apsio_session= \
--data '
{
"name": "<string>",
"days": 90
}
'import requests
url = "https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/upload-tokens"
payload = {
"name": "<string>",
"days": 90
}
headers = {
"cookie": "apsio_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'apsio_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', days: 90})
};
fetch('https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/upload-tokens', 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.apsio.io/v1/orgs/{orgId}/projects/{projectId}/upload-tokens",
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([
'name' => '<string>',
'days' => 90
]),
CURLOPT_COOKIE => "apsio_session=",
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://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/upload-tokens"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"days\": 90\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "apsio_session=")
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.apsio.io/v1/orgs/{orgId}/projects/{projectId}/upload-tokens")
.header("cookie", "apsio_session=")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"days\": 90\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/upload-tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'apsio_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"days\": 90\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"project_id": "<string>",
"name": "<string>",
"created_by": "<string>",
"created_by_name": "<string>",
"created_at": "<string>",
"expires_at": "<string>",
"last_used_at": "<string>",
"token": "<string>"
}Authorizations
The console session, set by /v1/auth/callback (__Host-apsio_session when host-only).
Path Parameters
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"0192f3a4-0000-7000-8000-00000000a001"
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"0192f3a4-0000-7000-8000-00000000a001"
Body
Response
The token, once
The token's row id, for revoking it; never the token.
Empty for a user since erased.
The last upload with it, written at most every 5 minutes.
The token itself (apsio_ut_v0_…), shown this once. Keep it as a CI secret and pass it to apsio upload; Apsio cannot show it again.