Turn on the public image URL
curl --request POST \
--url https://{companyName}.api.joinluminous.com/external/api/v1/file-cabinet/files/{id}/public-image \
--header 'Authorization: Bearer <token>'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/file-cabinet/files/{id}/public-image"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/file-cabinet/files/{id}/public-image', 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://{companyName}.api.joinluminous.com/external/api/v1/file-cabinet/files/{id}/public-image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://{companyName}.api.joinluminous.com/external/api/v1/file-cabinet/files/{id}/public-image"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{companyName}.api.joinluminous.com/external/api/v1/file-cabinet/files/{id}/public-image")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/file-cabinet/files/{id}/public-image")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 481,
"type": "file",
"name": "STYLE123_BLK_01.jpg",
"folder_id": 123,
"extension": "jpg",
"mime_type": "image/jpeg",
"size_bytes": 482113,
"is_restricted": true,
"is_image": true,
"current_version": {
"id": 33,
"version_number": 2,
"size_bytes": 482113,
"mime_type": "image/jpeg",
"original_name": "STYLE123_BLK_01.jpg",
"status": "ready",
"uploaded_by": 123,
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
},
"thumbnail_url": "<string>",
"public_image_url": "<string>",
"expires_at": "2023-12-25",
"expiry_notify_user_ids": [
123
],
"tags": [
{
"id": 12,
"name": "SS27",
"color": "green"
}
],
"created_by": 123,
"updated_by": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"can_edit": true,
"is_starred": true
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Files
Turn on the public image URL
Turn on the stable public URL for an image. The URL is returned as public_image_url
on the file and keeps working across new versions.
Requires the fileCabinet.write permission.
POST
/
file-cabinet
/
files
/
{id}
/
public-image
Turn on the public image URL
curl --request POST \
--url https://{companyName}.api.joinluminous.com/external/api/v1/file-cabinet/files/{id}/public-image \
--header 'Authorization: Bearer <token>'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/file-cabinet/files/{id}/public-image"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/file-cabinet/files/{id}/public-image', 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://{companyName}.api.joinluminous.com/external/api/v1/file-cabinet/files/{id}/public-image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://{companyName}.api.joinluminous.com/external/api/v1/file-cabinet/files/{id}/public-image"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{companyName}.api.joinluminous.com/external/api/v1/file-cabinet/files/{id}/public-image")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/file-cabinet/files/{id}/public-image")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 481,
"type": "file",
"name": "STYLE123_BLK_01.jpg",
"folder_id": 123,
"extension": "jpg",
"mime_type": "image/jpeg",
"size_bytes": 482113,
"is_restricted": true,
"is_image": true,
"current_version": {
"id": 33,
"version_number": 2,
"size_bytes": 482113,
"mime_type": "image/jpeg",
"original_name": "STYLE123_BLK_01.jpg",
"status": "ready",
"uploaded_by": 123,
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
},
"thumbnail_url": "<string>",
"public_image_url": "<string>",
"expires_at": "2023-12-25",
"expiry_notify_user_ids": [
123
],
"tags": [
{
"id": 12,
"name": "SS27",
"color": "green"
}
],
"created_by": 123,
"updated_by": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"can_edit": true,
"is_starred": true
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}