curl --request GET \
--url https://api.smokeball.com/matters/{matterId}/documents/files/{fileId} \
--header 'Authorization: <api-key>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}"
headers = {
"x-api-key": "<api-key>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>', Authorization: '<api-key>'}};
fetch('https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}', 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.smokeball.com/matters/{matterId}/documents/files/{fileId}",
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: <api-key>",
"x-api-key: <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.smokeball.com/matters/{matterId}/documents/files/{fileId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}")
.header("x-api-key", "<api-key>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"href": "<string>",
"relation": "<string>",
"method": "GET",
"self": {
"id": "<string>",
"href": "<string>",
"relation": "<string>",
"method": "GET"
},
"id": "b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2",
"versionId": "0f8fad5b-d9cb-469f-a165-70867728950e",
"folder": {
"href": "/matters/f1f9ab2c-3f2a-4a3c-9b6e-0e2d6f6a1b3c/documents/folders/2c1e8a0d-4b5f-4d2e-8a9b-7c6d5e4f3a2b"
},
"matter": {
"href": "/matters/f1f9ab2c-3f2a-4a3c-9b6e-0e2d6f6a1b3c"
},
"name": "court filing",
"fileExtension": ".pdf",
"ownerId": "750eb5c5-ac0b-7d11-4997-e0ce9d8896c8",
"to": "recipient@email.com",
"from": "sender@email.com",
"dateCreated": "2022-04-23T14:00:00Z",
"dateModified": "2022-04-25T17:00:00Z",
"sizeBytes": 19104768,
"downloadInfo": {
"href": "/matters/f1f9ab2c-3f2a-4a3c-9b6e-0e2d6f6a1b3c/documents/files/b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2/download"
},
"additionalData": {
"source": "Outlook",
"pageCount": 12,
"isSigned": true
},
"isFavorite": false,
"isUploaded": false,
"isCancelled": false,
"isDuplicate": false,
"isDeleted": false
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Get a file
Retrieves a specified file. The matterId in the route is used for authorisation only and is not cross-checked against the matter the file belongs to.
curl --request GET \
--url https://api.smokeball.com/matters/{matterId}/documents/files/{fileId} \
--header 'Authorization: <api-key>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}"
headers = {
"x-api-key": "<api-key>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>', Authorization: '<api-key>'}};
fetch('https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}', 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.smokeball.com/matters/{matterId}/documents/files/{fileId}",
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: <api-key>",
"x-api-key: <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.smokeball.com/matters/{matterId}/documents/files/{fileId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}")
.header("x-api-key", "<api-key>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"href": "<string>",
"relation": "<string>",
"method": "GET",
"self": {
"id": "<string>",
"href": "<string>",
"relation": "<string>",
"method": "GET"
},
"id": "b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2",
"versionId": "0f8fad5b-d9cb-469f-a165-70867728950e",
"folder": {
"href": "/matters/f1f9ab2c-3f2a-4a3c-9b6e-0e2d6f6a1b3c/documents/folders/2c1e8a0d-4b5f-4d2e-8a9b-7c6d5e4f3a2b"
},
"matter": {
"href": "/matters/f1f9ab2c-3f2a-4a3c-9b6e-0e2d6f6a1b3c"
},
"name": "court filing",
"fileExtension": ".pdf",
"ownerId": "750eb5c5-ac0b-7d11-4997-e0ce9d8896c8",
"to": "recipient@email.com",
"from": "sender@email.com",
"dateCreated": "2022-04-23T14:00:00Z",
"dateModified": "2022-04-25T17:00:00Z",
"sizeBytes": 19104768,
"downloadInfo": {
"href": "/matters/f1f9ab2c-3f2a-4a3c-9b6e-0e2d6f6a1b3c/documents/files/b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2/download"
},
"additionalData": {
"source": "Outlook",
"pageCount": 12,
"isSigned": true
},
"isFavorite": false,
"isUploaded": false,
"isCancelled": false,
"isDuplicate": false,
"isDeleted": false
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Path Parameters
Unique identifier (GUID) of the file.
Response
When request is successful. Returns a 'File' object.
Show child attributes
Show child attributes
Unique identifier of the file.
"b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2"
Unique identifier of the file's current version. Changes each time new content is uploaded for the file.
"0f8fad5b-d9cb-469f-a165-70867728950e"
Hypermedia link of the folder to which the file belongs. Null when the file is in the matter's root folder.
Show child attributes
Show child attributes
{
"href": "/matters/f1f9ab2c-3f2a-4a3c-9b6e-0e2d6f6a1b3c/documents/folders/2c1e8a0d-4b5f-4d2e-8a9b-7c6d5e4f3a2b"
}
Hypermedia link of the matter to which the file belongs.
Show child attributes
Show child attributes
{
"href": "/matters/f1f9ab2c-3f2a-4a3c-9b6e-0e2d6f6a1b3c"
}
Name of the file, excluding file extension.
"court filing"
Extension of the file.
".pdf"
Unique identifier of the user who created/uploaded this file.
"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8"
The 'To' or recipients' email address (only applicable for email files).
"recipient@email.com"
The 'From' or sender's email address (only applicable for email files).
"sender@email.com"
The original datetime that the file was created.
"2022-04-23T14:00:00Z"
The datetime that the file was last modified.
"2022-04-25T17:00:00Z"
Size of the file (in bytes).
19104768
Hypermedia link to the download details of the file (a presigned download URL and its expiry).
Show child attributes
Show child attributes
{
"href": "/matters/f1f9ab2c-3f2a-4a3c-9b6e-0e2d6f6a1b3c/documents/files/b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2/download"
}
Collection of file meta data as key/value pairs. Values may be strings, numbers, booleans or dates.
Show child attributes
Show child attributes
{
"source": "Outlook",
"pageCount": 12,
"isSigned": true
}
Flag indicating whether this file is a favorite
false
Flag indicating whether the file contents are uploaded to the server.
false
Flag indicating whether the file upload has been cancelled.
false
Flag indicating whether the file data is duplicated. Applies to emails only for now.
false
Flag indicating whether the file has been deleted.
false