Skip to main content
PUT
/
api
/
v1
/
files
/
upload
Upload File
curl --request PUT \
  --url https://api.apexxcloud.com/api/v1/files/upload \
  --header 'X-Access-Key: <api-key>' \
  --header 'X-Signature: <api-key>' \
  --header 'X-Timestamp: <api-key>'
import requests

url = "https://api.apexxcloud.com/api/v1/files/upload"

headers = {
"X-Access-Key": "<api-key>",
"X-Signature": "<api-key>",
"X-Timestamp": "<api-key>"
}

response = requests.put(url, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {
'X-Access-Key': '<api-key>',
'X-Signature': '<api-key>',
'X-Timestamp': '<api-key>'
}
};

fetch('https://api.apexxcloud.com/api/v1/files/upload', 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.apexxcloud.com/api/v1/files/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"X-Access-Key: <api-key>",
"X-Signature: <api-key>",
"X-Timestamp: <api-key>"
],
]);

$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.apexxcloud.com/api/v1/files/upload"

req, _ := http.NewRequest("PUT", url, nil)

req.Header.Add("X-Access-Key", "<api-key>")
req.Header.Add("X-Signature", "<api-key>")
req.Header.Add("X-Timestamp", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://api.apexxcloud.com/api/v1/files/upload")
.header("X-Access-Key", "<api-key>")
.header("X-Signature", "<api-key>")
.header("X-Timestamp", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.apexxcloud.com/api/v1/files/upload")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["X-Access-Key"] = '<api-key>'
request["X-Signature"] = '<api-key>'
request["X-Timestamp"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "data": {
    "message": "<string>",
    "key": "<string>",
    "location": "<string>",
    "bucket": "<string>",
    "region": "<string>",
    "visibility": "<string>",
    "size": 123,
    "content_type": "<string>"
  }
}

Authorizations

X-Access-Key
string
header
required

Your API Access Key

X-Signature
string
header
required

HMAC SHA-256 signature of the request

X-Timestamp
string
header
required

ISO 8601 timestamp of the request

Query Parameters

bucket_name
string
required
region
string
required
visibility
enum<string>
Available options:
public,
private
key
string

Response

200 - application/json

File uploaded successfully

data
object