preview v0.5.1
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Preview service. 🚀
You can preview the following type of files:
- images(png/jpeg/gif/svg)
- documents (xls, xlsx, ods, ppt, pptx, odp, doc, docx, odt)
You will be able to:
- Preview images.
- Generate smart thumbnails.
The main difference between thumbnail and preview functionality is that preview tends to be more faithful while thumbnail tends to elaborate on it, cropping it by default and rounding the image if asked. Preview should always output the file in its original format, while thumbnail will convert it to an image. There is no difference in quality between png and jpeg, the difference in quality can be achieved only by asking for a jpeg format and changing the quality parameter. Asking for a GIF output can only be done when the input file is a GIF, otherwise it will raise and error.
image
get_thumbnail_preview_image__id___version___area__thumbnail__get
Code samples
# You can also use wget
curl -X GET /preview/image/{id}/{version}/{area}/thumbnail/?service_type=files \
-H 'Accept: application/json'
GET /preview/image/{id}/{version}/{area}/thumbnail/?service_type=files HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/preview/image/{id}/{version}/{area}/thumbnail/?service_type=files',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('/preview/image/{id}/{version}/{area}/thumbnail/?service_type=files',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get '/preview/image/{id}/{version}/{area}/thumbnail/',
params: {
'service_type' => '[ServiceTypeEnum](#schemaservicetypeenum)'
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/preview/image/{id}/{version}/{area}/thumbnail/', params={
'service_type': 'files'
}, headers = headers)
print(r.json())
URL obj = new URL("/preview/image/{id}/{version}/{area}/thumbnail/?service_type=files");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/preview/image/{id}/{version}/{area}/thumbnail/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/preview/image/{id}/{version}/{area}/thumbnail/', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /preview/image/{id}/{version}/{area}/thumbnail/
Get Thumbnail
Creates and returns a thumbnail of the image fetched by id and version with the given size, quality, format and shape. It will automatically crop the picture.
- id: UUID of the image
- version: version of the image
- quality: quality of the output image (the higher you go the slower the process)
- output_format: format of the output image
- area: width of the output image (>=0) x height of the output image (>=0), width x height => 100x200. The first is width, the latter height, the order is important!
- shape: Rounded and Rectangular are currently supported.
- service_type: Service that owns the resource (service that first uploaded the data to storage)
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
version | path | integer | true | none |
area | path | string | true | none |
service_type | query | ServiceTypeEnum | true | none |
shape | query | any | false | none |
quality | query | any | false | none |
output_format | query | any | false | none |
Enumerated Values
Parameter | Value |
---|---|
service_type | files |
service_type | chats |
Example responses
200 Response
null
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | Inline |
400 | Bad Request | Some values in the query were not correct. | None |
404 | Not Found | Requested item was not found in the storage. | None |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
502 | Bad Gateway | Storage is currently unavailable. | None |
Response Schema
post_thumbnail_preview_image__area__thumbnail__post
Code samples
# You can also use wget
curl -X POST /preview/image/{area}/thumbnail/ \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json'
POST /preview/image/{area}/thumbnail/ HTTP/1.1
Content-Type: multipart/form-data
Accept: application/json
const inputBody = '{
"file": "string"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('/preview/image/{area}/thumbnail/',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = {
"file": "string"
};
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('/preview/image/{area}/thumbnail/',
{
method: 'POST',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json'
}
result = RestClient.post '/preview/image/{area}/thumbnail/',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
r = requests.post('/preview/image/{area}/thumbnail/', headers = headers)
print(r.json())
URL obj = new URL("/preview/image/{area}/thumbnail/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"multipart/form-data"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/preview/image/{area}/thumbnail/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'multipart/form-data',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/preview/image/{area}/thumbnail/', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
POST /preview/image/{area}/thumbnail/
Post Thumbnail
Creates and returns a thumbnail of the given image with the given size, quality, format and shape.
- quality: quality of the output image (the higher you go the slower the process)
- output_format: format of the output image
- area: width of the output image (>=0) x height of the output image (>=0), width x height => 100x200. The first is width, the latter height, the order is important!
- shape: Rounded and Rectangular are currently supported. This option will lose information, leaving it False will scale and have borders to fill the requested size.
- file: file uploaded with FormData.
Body parameter
file: string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
area | path | string | true | none |
shape | query | any | false | none |
quality | query | any | false | none |
output_format | query | any | false | none |
body | body | Body_post_thumbnail_preview_image__area__thumbnail__post | true | none |
Example responses
200 Response
null
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | Inline |
400 | Bad Request | Some values in the query were not correct. | None |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
Response Schema
post_preview_preview_image__area___post
Code samples
# You can also use wget
curl -X POST /preview/image/{area}/ \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json'
POST /preview/image/{area}/ HTTP/1.1
Content-Type: multipart/form-data
Accept: application/json
const inputBody = '{
"file": "string"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('/preview/image/{area}/',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = {
"file": "string"
};
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('/preview/image/{area}/',
{
method: 'POST',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json'
}
result = RestClient.post '/preview/image/{area}/',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
r = requests.post('/preview/image/{area}/', headers = headers)
print(r.json())
URL obj = new URL("/preview/image/{area}/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"multipart/form-data"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/preview/image/{area}/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'multipart/form-data',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/preview/image/{area}/', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
POST /preview/image/{area}/
Post Preview
Creates and returns a preview of the given image with the given size, quality and format
- quality: quality of the output image (the higher you go the slower the process)
- output_format: format of the output image
- area: width of the output image (>=0) x height of the output image (>=0), width x height => 100x200. The first is width, the latter height, the order is important!
- crop: True will crop the picture starting from the borders. This option will lose information, leaving it False will scale and have borders to fill the requested size.
- file: file uploaded with FormData.
Body parameter
file: string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
area | path | string | true | none |
crop | query | boolean | false | none |
quality | query | any | false | none |
output_format | query | any | false | none |
body | body | Body_post_preview_preview_image__area___post | true | none |
Example responses
200 Response
null
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | Inline |
400 | Bad Request | Some values in the query were not correct. | None |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
Response Schema
get_preview_preview_image__id___version___area___get
Code samples
# You can also use wget
curl -X GET /preview/image/{id}/{version}/{area}/?service_type=files \
-H 'Accept: application/json'
GET /preview/image/{id}/{version}/{area}/?service_type=files HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/preview/image/{id}/{version}/{area}/?service_type=files',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('/preview/image/{id}/{version}/{area}/?service_type=files',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get '/preview/image/{id}/{version}/{area}/',
params: {
'service_type' => '[ServiceTypeEnum](#schemaservicetypeenum)'
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/preview/image/{id}/{version}/{area}/', params={
'service_type': 'files'
}, headers = headers)
print(r.json())
URL obj = new URL("/preview/image/{id}/{version}/{area}/?service_type=files");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/preview/image/{id}/{version}/{area}/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/preview/image/{id}/{version}/{area}/', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /preview/image/{id}/{version}/{area}/
Get Preview
Creates and returns a preview of the image fetched by id and version with the given size, quality and format
- id: UUID of the image
- version: version of the image
- quality: quality of the output image (the higher you go the slower the process)
- output_format: format of the output image
- area: width of the output image (>=0) x height of the output image (>=0), width x height => 100x200. The first is width, the latter height, the order is important!
- crop: True will crop the picture starting from the borders. This option will lose information, leaving it False will scale and have borders to fill the requested size.
- service_type: Service that owns the resource (service that first uploaded the data to storage)
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
version | path | integer | true | none |
area | path | string | true | none |
service_type | query | ServiceTypeEnum | true | none |
crop | query | boolean | false | none |
quality | query | any | false | none |
output_format | query | any | false | none |
Enumerated Values
Parameter | Value |
---|---|
service_type | files |
service_type | chats |
Example responses
200 Response
null
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | Inline |
400 | Bad Request | Some values in the query were not correct. | None |
404 | Not Found | Requested item was not found in the storage. | None |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
502 | Bad Gateway | Storage is currently unavailable. | None |
Response Schema
get_preview_preview_pdf__id___version___get
Code samples
# You can also use wget
curl -X GET /preview/pdf/{id}/{version}/?service_type=files \
-H 'Accept: application/json'
GET /preview/pdf/{id}/{version}/?service_type=files HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/preview/pdf/{id}/{version}/?service_type=files',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('/preview/pdf/{id}/{version}/?service_type=files',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get '/preview/pdf/{id}/{version}/',
params: {
'service_type' => '[ServiceTypeEnum](#schemaservicetypeenum)'
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/preview/pdf/{id}/{version}/', params={
'service_type': 'files'
}, headers = headers)
print(r.json())
URL obj = new URL("/preview/pdf/{id}/{version}/?service_type=files");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/preview/pdf/{id}/{version}/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/preview/pdf/{id}/{version}/', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /preview/pdf/{id}/{version}/
Get Preview
Create and returns a preview of the given file, the pdf file will contain the first and last page given. With default values will return all the pages.
- id: UUID of the pdf.
- version: version of the pdf.
- first_page: integer value of first page to preview (n>=1)
- last_page: integer value of last page to preview (0 = last of the pdf)
- service_type: Service that owns the resource (service that first uploaded the data to storage)
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
version | path | integer | true | none |
service_type | query | ServiceTypeEnum | true | none |
first_page | query | integer | false | none |
last_page | query | integer | false | none |
Enumerated Values
Parameter | Value |
---|---|
service_type | files |
service_type | chats |
Example responses
200 Response
null
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | Inline |
404 | Not Found | Requested item was not found in the storage. | None |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
502 | Bad Gateway | Storage is currently unavailable. | None |
Response Schema
post_preview_preview_pdf__post
Code samples
# You can also use wget
curl -X POST /preview/pdf/ \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json'
POST /preview/pdf/ HTTP/1.1
Content-Type: multipart/form-data
Accept: application/json
const inputBody = '{
"file": "string"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('/preview/pdf/',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = {
"file": "string"
};
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('/preview/pdf/',
{
method: 'POST',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json'
}
result = RestClient.post '/preview/pdf/',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
r = requests.post('/preview/pdf/', headers = headers)
print(r.json())
URL obj = new URL("/preview/pdf/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"multipart/form-data"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/preview/pdf/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'multipart/form-data',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/preview/pdf/', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
POST /preview/pdf/
Post Preview
Create and returns a preview of the given file, the pdf file will contain the first and last page given. With default values will return all the pages.
- file: file uploaded with FormData.
- first_page: integer value of first page to preview (n>=1)
- last_page: integer value of last page to preview (0 = last of the pdf)
Body parameter
file: string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
first_page | query | integer | false | none |
last_page | query | integer | false | none |
body | body | Body_post_preview_preview_pdf__post | true | none |
Example responses
200 Response
null
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | Inline |
404 | Not Found | Requested item was not found in the storage. | None |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
Response Schema
post_thumbnail_preview_pdf__area__thumbnail__post
Code samples
# You can also use wget
curl -X POST /preview/pdf/{area}/thumbnail/ \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json'
POST /preview/pdf/{area}/thumbnail/ HTTP/1.1
Content-Type: multipart/form-data
Accept: application/json
const inputBody = '{
"file": "string"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('/preview/pdf/{area}/thumbnail/',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = {
"file": "string"
};
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('/preview/pdf/{area}/thumbnail/',
{
method: 'POST',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json'
}
result = RestClient.post '/preview/pdf/{area}/thumbnail/',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
r = requests.post('/preview/pdf/{area}/thumbnail/', headers = headers)
print(r.json())
URL obj = new URL("/preview/pdf/{area}/thumbnail/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"multipart/form-data"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/preview/pdf/{area}/thumbnail/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'multipart/form-data',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/preview/pdf/{area}/thumbnail/', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
POST /preview/pdf/{area}/thumbnail/
Post Thumbnail
Create and returns the thumbnail of the given file, the image rendered will be the first page.
- quality: quality of the output image (the higher you go the slower the process)
- output_format: format of the output image
- area: width of the output image (>=0) x height of the output image (>=0), width x height => 100x200. The first is width, the latter height, the order is important!
- shape: Rounded and Rectangular are currently supported.
- file: file uploaded with FormData.
Body parameter
file: string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
area | path | string | true | none |
shape | query | any | false | none |
quality | query | any | false | none |
output_format | query | any | false | none |
body | body | Body_post_thumbnail_preview_pdf__area__thumbnail__post | true | none |
Example responses
200 Response
null
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | Inline |
400 | Bad Request | Some values in the query were not correct. | None |
404 | Not Found | Requested item was not found in the storage. | None |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
Response Schema
get_thumbnail_preview_pdf__id___version___area__thumbnail__get
Code samples
# You can also use wget
curl -X GET /preview/pdf/{id}/{version}/{area}/thumbnail/?service_type=files \
-H 'Accept: application/json'
GET /preview/pdf/{id}/{version}/{area}/thumbnail/?service_type=files HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/preview/pdf/{id}/{version}/{area}/thumbnail/?service_type=files',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('/preview/pdf/{id}/{version}/{area}/thumbnail/?service_type=files',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get '/preview/pdf/{id}/{version}/{area}/thumbnail/',
params: {
'service_type' => '[ServiceTypeEnum](#schemaservicetypeenum)'
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/preview/pdf/{id}/{version}/{area}/thumbnail/', params={
'service_type': 'files'
}, headers = headers)
print(r.json())
URL obj = new URL("/preview/pdf/{id}/{version}/{area}/thumbnail/?service_type=files");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/preview/pdf/{id}/{version}/{area}/thumbnail/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/preview/pdf/{id}/{version}/{area}/thumbnail/', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /preview/pdf/{id}/{version}/{area}/thumbnail/
Get Thumbnail
Create and returns a thumbnail of the file fetched by id and version the image will be rendered from the first page.
- id: UUID of the pdf.
- version: version of the file.
- quality: quality of the output image (the higher you go the slower the process)
- output_format: format of the output image
- area: width of the output image (>=0) x height of the output image (>=0), width x height => 100x200. The first is width, the latter height, the order is important!
- shape: Rounded and Rectangular are currently supported.
- service_type: Service that owns the resource (service that first uploaded the data to storage)
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
version | path | integer | true | none |
area | path | string | true | none |
service_type | query | ServiceTypeEnum | true | none |
shape | query | any | false | none |
quality | query | any | false | none |
output_format | query | any | false | none |
Enumerated Values
Parameter | Value |
---|---|
service_type | files |
service_type | chats |
Example responses
200 Response
null
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | Inline |
404 | Not Found | Requested item was not found in the storage. | None |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
502 | Bad Gateway | Storage is currently unavailable. | None |
Response Schema
document
get_preview_preview_document__id___version___get
Code samples
# You can also use wget
curl -X GET /preview/document/{id}/{version}/?service_type=files \
-H 'Accept: application/json'
GET /preview/document/{id}/{version}/?service_type=files HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/preview/document/{id}/{version}/?service_type=files',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('/preview/document/{id}/{version}/?service_type=files',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get '/preview/document/{id}/{version}/',
params: {
'service_type' => '[ServiceTypeEnum](#schemaservicetypeenum)'
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/preview/document/{id}/{version}/', params={
'service_type': 'files'
}, headers = headers)
print(r.json())
URL obj = new URL("/preview/document/{id}/{version}/?service_type=files");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/preview/document/{id}/{version}/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/preview/document/{id}/{version}/', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /preview/document/{id}/{version}/
Get Preview
Create and returns a pdf preview of the given file, the pdf file will contain the first and last page given. With default values will return all the pages.
- id: UUID of the file.
- version: version of the file.
- first_page: integer value of first page to preview (n>=1)
- last_page: integer value of last page to preview (0 = last of the file)
- service_type: Service that owns the resource (service that first uploaded the data to storage)
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
version | path | integer | true | none |
service_type | query | ServiceTypeEnum | true | none |
first_page | query | integer | false | none |
last_page | query | integer | false | none |
Enumerated Values
Parameter | Value |
---|---|
service_type | files |
service_type | chats |
Example responses
200 Response
null
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | Inline |
404 | Not Found | Requested item was not found in the storage. | None |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
502 | Bad Gateway | Storage is currently unavailable. | None |
Response Schema
post_preview_preview_document__post
Code samples
# You can also use wget
curl -X POST /preview/document/ \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json'
POST /preview/document/ HTTP/1.1
Content-Type: multipart/form-data
Accept: application/json
const inputBody = '{
"file": "string"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('/preview/document/',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = {
"file": "string"
};
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('/preview/document/',
{
method: 'POST',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json'
}
result = RestClient.post '/preview/document/',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
r = requests.post('/preview/document/', headers = headers)
print(r.json())
URL obj = new URL("/preview/document/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"multipart/form-data"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/preview/document/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'multipart/form-data',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/preview/document/', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
POST /preview/document/
Post Preview
Create and returns a pdf preview of the given file, the pdf file will contain the first and last page given. With default values will return all the pages.
- file: file uploaded with FormData.
- first_page: integer value of first page to preview (n>=1)
- last_page: integer value of last page to preview (0 = last of the pdf)
Body parameter
file: string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
first_page | query | integer | false | none |
last_page | query | integer | false | none |
body | body | Body_post_preview_preview_document__post | true | none |
Example responses
200 Response
null
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | Inline |
404 | Not Found | Requested item was not found in the storage. | None |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
Response Schema
post_thumbnail_preview_document__area__thumbnail__post
Code samples
# You can also use wget
curl -X POST /preview/document/{area}/thumbnail/ \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json'
POST /preview/document/{area}/thumbnail/ HTTP/1.1
Content-Type: multipart/form-data
Accept: application/json
const inputBody = '{
"file": "string"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('/preview/document/{area}/thumbnail/',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = {
"file": "string"
};
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('/preview/document/{area}/thumbnail/',
{
method: 'POST',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json'
}
result = RestClient.post '/preview/document/{area}/thumbnail/',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
r = requests.post('/preview/document/{area}/thumbnail/', headers = headers)
print(r.json())
URL obj = new URL("/preview/document/{area}/thumbnail/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"multipart/form-data"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/preview/document/{area}/thumbnail/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'multipart/form-data',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/preview/document/{area}/thumbnail/', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
POST /preview/document/{area}/thumbnail/
Post Thumbnail
Create and returns the thumbnail of the given file, the image rendered will be the first page.
- quality: quality of the output image (the higher you go the slower the process)
- output_format: format of the output image
- area: width of the output image (>=0) x height of the output image (>=0), width x height => 100x200. The first is width, the latter height, the order is important!
- shape: Rounded and Rectangular are currently supported.
- file: file uploaded with FormData.
Body parameter
file: string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
area | path | string | true | none |
shape | query | any | false | none |
quality | query | any | false | none |
output_format | query | any | false | none |
body | body | Body_post_thumbnail_preview_document__area__thumbnail__post | true | none |
Example responses
200 Response
null
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | Inline |
400 | Bad Request | Some values in the query were not correct. | None |
404 | Not Found | Requested item was not found in the storage. | None |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
Response Schema
get_thumbnail_preview_document__id___version___area__thumbnail__get
Code samples
# You can also use wget
curl -X GET /preview/document/{id}/{version}/{area}/thumbnail/?service_type=files \
-H 'Accept: application/json'
GET /preview/document/{id}/{version}/{area}/thumbnail/?service_type=files HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/preview/document/{id}/{version}/{area}/thumbnail/?service_type=files',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('/preview/document/{id}/{version}/{area}/thumbnail/?service_type=files',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get '/preview/document/{id}/{version}/{area}/thumbnail/',
params: {
'service_type' => '[ServiceTypeEnum](#schemaservicetypeenum)'
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/preview/document/{id}/{version}/{area}/thumbnail/', params={
'service_type': 'files'
}, headers = headers)
print(r.json())
URL obj = new URL("/preview/document/{id}/{version}/{area}/thumbnail/?service_type=files");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/preview/document/{id}/{version}/{area}/thumbnail/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/preview/document/{id}/{version}/{area}/thumbnail/', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /preview/document/{id}/{version}/{area}/thumbnail/
Get Thumbnail
Create and returns a thumbnail of the file fetched by id and version the image will be rendered from the first page.
- id: UUID of the file.
- version: version of the file.
- quality: quality of the output image (the higher you go the slower the process)
- output_format: format of the output image
- area: width of the output image (>=0) x height of the output image (>=0), width x height => 100x200. The first is width, the latter height, the order is important!
- shape: Rounded and Rectangular are currently supported.
- service_type: Service that owns the resource (service that first uploaded the data to storage)
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
version | path | integer | true | none |
area | path | string | true | none |
service_type | query | ServiceTypeEnum | true | none |
shape | query | any | false | none |
quality | query | any | false | none |
output_format | query | any | false | none |
Enumerated Values
Parameter | Value |
---|---|
service_type | files |
service_type | chats |
Example responses
200 Response
null
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | Inline |
404 | Not Found | Requested item was not found in the storage. | None |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
502 | Bad Gateway | Storage is currently unavailable. | None |
Response Schema
health
health_health__get
Code samples
# You can also use wget
curl -X GET /health/ \
-H 'Accept: application/json'
GET /health/ HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/health/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('/health/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get '/health/',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/health/', headers = headers)
print(r.json())
URL obj = new URL("/health/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/health/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/health/', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /health/
Health
Checks if the service and all of its dependencies are working and returns a descriptive json
Example responses
200 Response
null
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | Inline |
429 | Too Many Requests | Carbonio-docs-editor is currently unavailable, document preview service is currently offline. | None |
502 | Bad Gateway | Storage is currently unavailable. | None |
Response Schema
health_ready_health_ready__get
Code samples
# You can also use wget
curl -X GET /health/ready/ \
-H 'Accept: application/json'
GET /health/ready/ HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/health/ready/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('/health/ready/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get '/health/ready/',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/health/ready/', headers = headers)
print(r.json())
URL obj = new URL("/health/ready/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/health/ready/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/health/ready/', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /health/ready/
Health Ready
Checks if the service is up and essential dependencies are running correctly
Example responses
200 Response
null
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | Inline |
429 | Too Many Requests | Carbonio-docs-editor is currently unavailable, document preview service is currently offline. | None |
502 | Bad Gateway | Storage is currently unavailable. | None |
Response Schema
health_live_health_live__get
Code samples
# You can also use wget
curl -X GET /health/live/ \
-H 'Accept: application/json'
GET /health/live/ HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/health/live/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('/health/live/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get '/health/live/',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/health/live/', headers = headers)
print(r.json())
URL obj = new URL("/health/live/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/health/live/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/health/live/', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /health/live/
Health Live
Checks if the service is up
Example responses
200 Response
null
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Response | Inline |
429 | Too Many Requests | Carbonio-docs-editor is currently unavailable, document preview service is currently offline. | None |
502 | Bad Gateway | Storage is currently unavailable. | None |
Response Schema
Schemas
Body_post_preview_preview_document__post
{
"file": "string"
}
Body_post_preview_preview_document__post
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
file | string(binary) | true | none | none |
Body_post_preview_preview_image__area___post
{
"file": "string"
}
Body_post_preview_preview_image__area___post
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
file | string(binary) | true | none | none |
Body_post_preview_preview_pdf__post
{
"file": "string"
}
Body_post_preview_preview_pdf__post
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
file | string(binary) | true | none | none |
Body_post_thumbnail_preview_document__area__thumbnail__post
{
"file": "string"
}
Body_post_thumbnail_preview_document__area__thumbnail__post
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
file | string(binary) | true | none | none |
Body_post_thumbnail_preview_image__area__thumbnail__post
{
"file": "string"
}
Body_post_thumbnail_preview_image__area__thumbnail__post
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
file | string(binary) | true | none | none |
Body_post_thumbnail_preview_pdf__area__thumbnail__post
{
"file": "string"
}
Body_post_thumbnail_preview_pdf__area__thumbnail__post
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
file | string(binary) | true | none | none |
HTTPValidationError
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}
HTTPValidationError
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
detail | [ValidationError] | false | none | none |
ImageBorderShapeEnum
"rounded"
ImageBorderShapeEnum
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ImageBorderShapeEnum | string | false | none | Class representing all the image type accepted values |
Enumerated Values
Property | Value |
---|---|
ImageBorderShapeEnum | rounded |
ImageBorderShapeEnum | rectangular |
ImageQualityEnum
"lowest"
ImageQualityEnum
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ImageQualityEnum | string | false | none | Class representing all the image quality accepted values |
Enumerated Values
Property | Value |
---|---|
ImageQualityEnum | lowest |
ImageQualityEnum | low |
ImageQualityEnum | medium |
ImageQualityEnum | high |
ImageQualityEnum | highest |
ImageTypeEnum
"jpeg"
ImageTypeEnum
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ImageTypeEnum | string | false | none | Class representing all the image type accepted values |
Enumerated Values
Property | Value |
---|---|
ImageTypeEnum | jpeg |
ImageTypeEnum | png |
ImageTypeEnum | gif |
ServiceTypeEnum
"files"
ServiceTypeEnum
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ServiceTypeEnum | string | false | none | Class representing all the service type accepted values |
Enumerated Values
Property | Value |
---|---|
ServiceTypeEnum | files |
ServiceTypeEnum | chats |
ValidationError
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
ValidationError
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
loc | [anyOf] | true | none | none |
anyOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | string | false | none | none |
or
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | integer | false | none | none |
continued
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
msg | string | true | none | none |
type | string | true | none | none |