List files
curl --request GET \
--url https://app.sajn.se/api/v1/files \
--header 'Authorization: Bearer <token>' \
--header 'authorization: <authorization>'import requests
url = "https://app.sajn.se/api/v1/files"
headers = {
"authorization": "<authorization>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {authorization: '<authorization>', Authorization: 'Bearer <token>'}
};
fetch('https://app.sajn.se/api/v1/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://app.sajn.se/api/v1/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"authorization: <authorization>"
],
]);
$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://app.sajn.se/api/v1/files"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
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.get("https://app.sajn.se/api/v1/files")
.header("authorization", "<authorization>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sajn.se/api/v1/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"files": [
{
"id": "<string>",
"filename": "<string>",
"mimeType": "<string>",
"size": 123,
"visibility": "PRIVATE",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"uploadedBy": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>"
}
}
],
"totalPages": 123
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>"
}Files
List files
Retrieve a paginated list of files in your organization.
Pagination: Use ‘page’ and ‘perPage’ query parameters.
Filtering: Optionally filter by visibility (PRIVATE or PUBLIC).
Response:
- Files are sorted by creation date (newest first)
- Use the ‘getFile’ endpoint to retrieve file access URLs
GET
/
api
/
v1
/
files
List files
curl --request GET \
--url https://app.sajn.se/api/v1/files \
--header 'Authorization: Bearer <token>' \
--header 'authorization: <authorization>'import requests
url = "https://app.sajn.se/api/v1/files"
headers = {
"authorization": "<authorization>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {authorization: '<authorization>', Authorization: 'Bearer <token>'}
};
fetch('https://app.sajn.se/api/v1/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://app.sajn.se/api/v1/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"authorization: <authorization>"
],
]);
$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://app.sajn.se/api/v1/files"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
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.get("https://app.sajn.se/api/v1/files")
.header("authorization", "<authorization>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sajn.se/api/v1/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"files": [
{
"id": "<string>",
"filename": "<string>",
"mimeType": "<string>",
"size": 123,
"visibility": "PRIVATE",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"uploadedBy": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>"
}
}
],
"totalPages": 123
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>"
}Authorizations
oauth2bearerAuth
OAuth 2.0 access token for a connected application. Limited to the scopes granted at consent.
Headers
Bearer token for API authentication
Query Parameters
Was this page helpful?

