Move Application File or Folder
curl --request PATCH \
--url https://api.vertracloud.app/v1/apps/{id}/filesimport requests
url = "https://api.vertracloud.app/v1/apps/{id}/files"
response = requests.patch(url)
print(response.text)const options = {method: 'PATCH'};
fetch('https://api.vertracloud.app/v1/apps/{id}/files', 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.vertracloud.app/v1/apps/{id}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
]);
$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://api.vertracloud.app/v1/apps/{id}/files"
req, _ := http.NewRequest("PATCH", url, nil)
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.vertracloud.app/v1/apps/{id}/files")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/apps/{id}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
response = http.request(request)
puts response.read_body{
"response": null
}
File Manager
Move Application File or Folder
Moves a file or folder within an application to a new location by its ID.
PATCH
/
v1
/
apps
/
{id}
/
files
Move Application File or Folder
curl --request PATCH \
--url https://api.vertracloud.app/v1/apps/{id}/filesimport requests
url = "https://api.vertracloud.app/v1/apps/{id}/files"
response = requests.patch(url)
print(response.text)const options = {method: 'PATCH'};
fetch('https://api.vertracloud.app/v1/apps/{id}/files', 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.vertracloud.app/v1/apps/{id}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
]);
$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://api.vertracloud.app/v1/apps/{id}/files"
req, _ := http.NewRequest("PATCH", url, nil)
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.vertracloud.app/v1/apps/{id}/files")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/apps/{id}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
response = http.request(request)
puts response.read_body{
"response": null
}
string
required
The ID of the application to move the file or folder within. If the application belongs to a workspace, pass its ID in the
workspace_id query parameter.string
If the application belongs to a workspace, the workspace’s ID. Members with an Owner, Admin or Developer role can use the file manager on a workspace app they don’t own; without this, only the app’s own owner can.
string
required
The source path of the file or folder to move.
string
required
The destination path to move the file or folder to.
Response
A success returns200 with { "response": null }.
{
"response": null
}
Error Responses
string
The error code indicating the reason for failure. Possible values:
UNAUTHORIZED: The user is not authenticated or lacks sufficient permissions.FORBIDDEN: The user does not have permission to access the application.APP_NOT_FOUND: The specified application does not exist.PLAN_RESTRICTED_FEATURE: The user’s plan does not support file manager access.MISSING_PATH_OR_DESTINATION: The path or destination query parameter was not provided.FORBIDDEN_PATH: The specified source path is restricted.FILE_MOVE_FAILED: Failed to move the file or folder.
string
A descriptive message providing additional details about the error.
{
"code": "UNAUTHORIZED"
}
{
"code": "APP_NOT_FOUND"
}
{
"code": "MISSING_PATH_OR_DESTINATION",
"message": "Both 'path' and 'to' query parameters are required"
}