Upload a tar
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/x-tar'},
body: '<string>'
};
fetch('https://vms.dev/api/v1/sandboxes/{id}/files/tar', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://vms.dev/api/v1/sandboxes/{id}/files/tar \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-tar' \
--data '<string>'import requests
url = "https://vms.dev/api/v1/sandboxes/{id}/files/tar"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-tar"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text){
"sandboxId": "<string>",
"path": "<string>",
"entries": 4503599627370495,
"bytes": 4503599627370495
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}Files
Upload a tar
Extracts a tar or a gzip tar into a folder. Creates the folder if it does not exist, and replaces the files that the tar contains. Send the content type application/x-tar or application/gzip. The body can be up to 128 MiB. A larger body gets 413. Needs the sandboxes:files scope.
POST
/
v1
/
sandboxes
/
{id}
/
files
/
tar
Upload a tar
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/x-tar'},
body: '<string>'
};
fetch('https://vms.dev/api/v1/sandboxes/{id}/files/tar', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://vms.dev/api/v1/sandboxes/{id}/files/tar \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-tar' \
--data '<string>'import requests
url = "https://vms.dev/api/v1/sandboxes/{id}/files/tar"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-tar"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text){
"sandboxId": "<string>",
"path": "<string>",
"entries": 4503599627370495,
"bytes": 4503599627370495
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}Authorizations
Query Parameters
Body
application/x-tarapplication/gzip
The body is of type file.
Response
The tar is extracted.