cURL
curl --request POST \
--url https://api.glideapps.com/apps/{appID}/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contentType": "image/png",
"fileName": "logo.png"
}
'import requests
url = "https://api.glideapps.com/apps/{appID}/uploads"
payload = {
"contentType": "image/png",
"fileName": "logo.png"
}
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({contentType: 'image/png', fileName: 'logo.png'})
};
fetch('https://api.glideapps.com/apps/{appID}/uploads', 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.glideapps.com/apps/{appID}/uploads",
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([
'contentType' => 'image/png',
'fileName' => 'logo.png'
]),
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.glideapps.com/apps/{appID}/uploads"
payload := strings.NewReader("{\n \"contentType\": \"image/png\",\n \"fileName\": \"logo.png\"\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.glideapps.com/apps/{appID}/uploads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contentType\": \"image/png\",\n \"fileName\": \"logo.png\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.glideapps.com/apps/{appID}/uploads")
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 \"contentType\": \"image/png\",\n \"fileName\": \"logo.png\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"uploadID": "upload-123",
"uploadLocation": "https://storage.googleapis.com/glide-uploads/example?X-Goog-Algorithm=GOOG4-RSA-SHA256"
}
}{
"error": {
"type": "<string>",
"message": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>"
}
}Uploads
Create Upload
POST
/
apps
/
{appID}
/
uploads
cURL
curl --request POST \
--url https://api.glideapps.com/apps/{appID}/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contentType": "image/png",
"fileName": "logo.png"
}
'import requests
url = "https://api.glideapps.com/apps/{appID}/uploads"
payload = {
"contentType": "image/png",
"fileName": "logo.png"
}
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({contentType: 'image/png', fileName: 'logo.png'})
};
fetch('https://api.glideapps.com/apps/{appID}/uploads', 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.glideapps.com/apps/{appID}/uploads",
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([
'contentType' => 'image/png',
'fileName' => 'logo.png'
]),
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.glideapps.com/apps/{appID}/uploads"
payload := strings.NewReader("{\n \"contentType\": \"image/png\",\n \"fileName\": \"logo.png\"\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.glideapps.com/apps/{appID}/uploads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contentType\": \"image/png\",\n \"fileName\": \"logo.png\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.glideapps.com/apps/{appID}/uploads")
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 \"contentType\": \"image/png\",\n \"fileName\": \"logo.png\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"uploadID": "upload-123",
"uploadLocation": "https://storage.googleapis.com/glide-uploads/example?X-Goog-Algorithm=GOOG4-RSA-SHA256"
}
}{
"error": {
"type": "<string>",
"message": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>"
}
}Create an upload session and get a pre-signed upload URL. Upload the file bytes to the
Response:
Then upload the file bytes to
Finally, complete the upload:
Note that Glide will delete this file within 30 days if the URL is not stored in a table in Glide.
uploadLocation, then call the complete endpoint to finalize the file and receive a public URL.
Example
curl --request POST \
--url https://api.glideapps.com/apps/$APP_ID/uploads \
--header "Authorization: Bearer $GLIDE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"contentType": "image/png",
"fileName": "logo.png"
}'
{
"data": {
"uploadID": "upload-123",
"uploadLocation": "https://storage.googleapis.com/glide-uploads/example?X-Goog-Algorithm=GOOG4-RSA-SHA256"
}
}
uploadLocation:
curl --request PUT \
--url "$UPLOAD_LOCATION" \
--header "Content-Type: image/png" \
--upload-file ./logo.png
curl --request POST \
--url https://api.glideapps.com/apps/$APP_ID/uploads/$UPLOAD_ID/complete \
--header "Authorization: Bearer $GLIDE_API_KEY"
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the app, e.g., mT91fPcZCWigkZXgSZGJ
Example:
"mT91fPcZCWigkZXgSZGJ"
Body
application/json
Response
Show child attributes
Show child attributes
Was this page helpful?
⌘I