Link Resource
Allows users to share a document content through a public link(s).
Users do not need to authenticate to access a document using a link.
However, links availability can be limited to a certain time if necessary.
Create Link
Allows users to generate one or many links from a set of document versions. One link will be returned for each document version provided.
Parameters
HTTP Headers
HTTP headers allow pass additional information with the request or the response. BigContent headers are used for recurrent details like authentication or document store.
Name | Example | Description |
---|---|---|
|
The Content-Type entity header is used to indicate the media type of the resource.
In this case, it must be |
|
|
|
Document Store identifier |
|
|
Mandatory header of String type that authorizes you as the user with the right to execute this operation. The string is a Bearer Token returned from the operation create token |
|
john@company.com |
Optional header that allows to send an additional user identifier associated with the operation. May be required depending on specific document store configuration. The value is a free style string to identify the individual user who has sent the request. |
Query parameters
Name | Value | Detail |
---|---|---|
inline |
|
Optional boolean query parameter.
The response will include the |
Body
As indicated by headers, the body of the http request must be a JSON.
There is a limit of 20 links for each call. |
{
"documents": [
{
"id": "bhbnbzkolnbcrlla7gf4zt4ubi",
"version": 1.0
},
{
"id": "bksgdpkolnbcrlla7gf4zjhgvp",
"version": 3.0
}
],
"ttl": "10d"
}
Name | Value | Detail |
---|---|---|
id |
|
Document id from the document we want to create the link |
version |
|
Optional: Indicates which one of the versions will be downloaded. Default: current one. |
ttl |
|
Optional: TTL (Time To Live) is the time for a link is valid. Permit values: 15s, 10d, 20d, 30d, no-limit. Default: 10 days. |
Responses
Success
Successful responses can be easily identified being always 20x (e.g. 200, 201).
Field | Example | Description |
---|---|---|
Status code |
|
|
|
|
The Content-Type entity header is used to indicate the media type of the resource.
In this case, it must be include::partial$tables/headers.adoc[tag=body-json-response-link](s) |
HTTP Headers
Name | Example | Description |
---|---|---|
|
|
If |
- JSON response
[{
"id": "bhbnbzkolnbcrlla7jct",
"version": "1.0",
"location": "https://api.everisbigcontent.com/edms/rest/v1/links/D2cDdblmft"
},
{
"id": "ehbnbzkolnjgdnckrled",
"version": "3.0",
"location": "https://api.everisbigcontent.com/edms/rest/v1/links/R2cDodtyd"
}
]
Name | Value | Detail |
---|---|---|
id |
|
Id from the document we want to create the link |
location |
|
The link to download a document |
Query parameters
Name | Value | Detail |
---|---|---|
inline |
|
Optional boolean query parameter.
The response will include the |
Error
In case of error, the response body contains a JSON object with additional information:
-
id
: Document id -
version
: Version number of the content -
code
: HTTP error code of the equivalent request -
msg
: Descriptive message of the errorError messages should not be used to validate errors since they may be subject to change.
[{
"id":"qga8r5hsy9rw5weggf93lopa58",
"version":"1.0",
"error":{
"code":"400",
"msg":"document not found"
}
}]
Status code | Message | Description |
---|---|---|
400 |
|
The JSON body has a bad structure. Message points where is the problem with line and column numbers as well as what is the problem (e.g. double "{", or a missing ",", …) |
400 |
|
There are a limit of 20 links, that you can create for a one call. |
400 |
|
Field id was sent as null/empty value |
400 |
|
Field ttl was sent as null/invalid value |
400 |
|
Field version was sent as null/invalid value |
401 |
|
The token sent is not valid |
401 |
|
The header indicating the document store that you want to access, must be set |
403 |
|
We dont have access to that document store, or it is misspelled |
404 |
|
The document doesn’t exists in the specified Document Store |
404 |
|
The version of the document was not found |
415 |
|
The Content-Type header is not correctly set |
500 |
|
If it happens consistently, please report it on our forum |
Code examples
curl "https://api.everisbigcontent.com/edms/rest/v1/links"\
-X POST \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ" \
-H "Document-Store: invoice_store" \
-H "Content-Type: application/json" \
-d "{ \"documents\": [ { \"id\": \"kcwylhbjwzgjrey7oij3\" }], \"ttl\": \"10d\" }"
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
String url = "https://dev-api.everisbigcontent.com:9090/edms/rest/v1/links";
String JSON = "{ \"documents\": [ { \"id\": \"kcwylhbjwzgjrey7oij3jokuyh\" }], \"ttl\": \"10d\" }";
HttpPost httpPost = new HttpPost(url);
httpPost.setHeader("Authorization","Bearer " + "ha9r6DG4e5AQ84gferAd8EQ...");
httpPost.setHeader("Content-Type", "application/json");
httpPost.setHeader("Document-Store", invoice_store);
httpPost.setEntity(new StringEntity(JSON));
CloseableHttpClient client = HttpClients.createDefault();
CloseableHttpResponse execute = client.execute(httpPost);
HttpEntity entity = execute.getEntity();
String jsonResponse = EntityUtils.toString(entity, StandardCharsets.UTF_8);
var request = require('request');
var token = 'ha9r6DG4e5AQ84gferAd8EQ...'
request.post({
headers: {
'Content-Type': 'application/json',
'Document-Store': 'big_content_dev',
'Authorization': 'Bearer ' + token,
url: 'https://api.everisbigcontent.com/edms/rest/v1/links',
json: {
"documents": [ { "id": "kcwylhbjwzgjrey7oij3jhfdes" }], "ttl": "10d"
}
}, function (error, response, body) {
console.log(body)
});
Create Embeddable Link
Creates a single link for a document, only will be valid for 15 seconds.
Parameters
HTTP Headers
HTTP headers allow pass additional information with the request or the response. BigContent headers are used for recurrent details like authentication or document store.
Name | Example | Description |
---|---|---|
|
|
Document Store identifier |
|
|
The Content-Type entity header is used to indicate the media type of the resource.
In this case, it must be |
Query parameters
Name | Value | Detail |
---|---|---|
inline |
|
Optional boolean query parameter.
The response will include the |
Body
As indicated by headers, the body of the http request must be a JSON.
The link created only will be valid for 15 seconds. |
{
"id": "bhbnbzkolnbcrlla7gf4zt4ubi",
"version": 1.0
}
Name | Value | Detail |
---|---|---|
id |
|
Document id from the document we want to create the link |
version |
|
Optional: Indicates which one of the versions will be downloaded. Default: current one. |
Responses
Success
Successful responses can be easily identified being always 20x (e.g. 200, 201).
Field | Example | Description |
---|---|---|
Status code |
|
|
|
|
The Content-Type entity header is used to indicate the media type of the resource.
In this case, it must be |
Body |
JSON object containing the link |
HTTP Headers
Name | Example | Description |
---|---|---|
|
|
If |
- JSON response
[
{
"id": "bhbnbzkolnbcrlla7jct",
"location": "https://api.everisbigcontent.com/edms/rest/v1/links/embeddable/D2cDdblmft"
}
]
Name | Value | Detail |
---|---|---|
id |
|
Id from the document we want to create the link |
location |
|
The link to download a document |
Error
In case of error, the response body contains a JSON object with additional information:
-
id
: Document id -
version
: Version number of the content -
code
: HTTP error code of the equivalent request -
msg
: Descriptive message of the errorError messages should not be used to validate errors since they may be subject to change.
[{
"id":"qga8r5hsy9rw5weggf93lopa58",
"version":"1.0",
"error":{
"code":"400",
"msg":"document not found"
}
}]
Status code | Message | Description |
---|---|---|
400 |
|
The JSON body has a bad structure. Message points where is the problem with line and column numbers as well as what is the problem (e.g. double "{", or a missing ",", …) |
400 |
|
Field id was sent as null/empty value |
400 |
|
Field version was sent as null/invalid value |
401 |
|
The token sent is not valid |
401 |
|
The header indicating the document store that you want to access, must be set |
403 |
|
We dont have access to that document store, or it is misspelled |
404 |
|
The document doesn’t exists in the specified Document Store |
404 |
|
The version of the document was not found |
415 |
|
The Content-Type header is not correctly set |
500 |
|
If it happens consistently, please report it on our forum |
Code examples
curl "https://api.everisbigcontent.com/edms/rest/v1/links/embedabble"\
-X POST \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ" \
-H "Document-Store: invoice_store" \
-H "Content-Type: application/json" \
-d "{ \"id\": \"kcwylhbjwzgjrey7oij3\"}"
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
String url = "https://dev-api.everisbigcontent.com:9090/edms/rest/v1/links/embedabble";
String JSON = "{\"id\": \"kcwylhbjwzgjrey7oij3jokuyh\"}";
HttpPost httpPost = new HttpPost(url);
httpPost.setHeader("Authorization","Bearer " + "ha9r6DG4e5AQ84gferAd8EQ...");
httpPost.setHeader("Content-Type", "application/json");
httpPost.setHeader("Document-Store", invoice_store);
httpPost.setEntity(new StringEntity(JSON));
CloseableHttpClient client = HttpClients.createDefault();
CloseableHttpResponse execute = client.execute(httpPost);
HttpEntity entity = execute.getEntity();
String jsonResponse = EntityUtils.toString(entity, StandardCharsets.UTF_8);
var request = require('request');
var token = 'ha9r6DG4e5AQ84gferAd8EQ...'
request.post({
headers: {
'Content-Type': 'application/json',
'Document-Store': 'big_content_dev',
'Authorization': 'Bearer ' + token},
url: 'https://api.everisbigcontent.com/edms/rest/v1/links/embedabble',
json: {
"id": "kcwylhbjwzgjrey7oij3jhfdes"
}
}, function (error, response, body) {
console.log(body)
});
Get Content via Link
The operation downloads a document, deciphering a hash passed via a link, the link and hash is generated in the Create Link operation.
The way to call this operation is with the response of the Create link operation mentioned above. |
Parameters
Path
Name | Value | Detail |
---|---|---|
Hash |
|
Unique non-sequential auto-generated hash of the document |
Query parameters
Name | Value | Detail |
---|---|---|
inline |
|
Optional boolean query parameter.
The response will include the |
Responses
Success
Successful responses can be easily identified being always 20x (e.g. 200, 201).
Field | Example | Description |
---|---|---|
Status code |
|
|
Content-Type |
|
The Content-Type entity header is used to indicate the media type of the resource.
For example, it could be |
Content-Disposition |
[ |
If |
Body |
HTTP Binary data |
A stream data over http that contains the file |
Error
In case of error, the response body contains a JSON object with additional information:
-
span-id
: auto-generated identifier of the request. Please provide this when asking for support in our forum. -
message
: descriptive message of the error. This is aimed for developers and is specially important forBad Request
errors., where contains hints on how to fix the request.Error messages should not be used to validate errors since they may be subject to change.
{
"span-id" : "b1652500-5b7d-4f7c-8cf0-b21f12ac76e5",
"message" : "Malformed hash exception"
}
Status code | Message | Description |
---|---|---|
400 |
|
The hash sent is not valid |
500 |
|
If it happens consistently, please report it on our forum |
Nothing |
Unsecured Conection |
When access at the link, you see browser that isn’t supported. Please see System Requirements |
Code examples
curl -o filename.txt "https://api.everisbigcontent.com/edms/rest/v1/links/hgFxTdnIh1xTd171qZx1iQYce4_BrrzGpDhOknJGjMU-JUhigR1R_EbID4TdClrhwJDBGCz26x9Wt1aN6uN6Ftd4U3zA-Vy4P7rMO-fGUvkbNCAPLBZilUFXbenzUx-vcO90EUBZqlgaAjv-eHoEY=?inline=true"
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
String url = "https://api.everisbigcontent.com/edms/rest/v1/links/hgFxTdnIh1xTd171qZx1iQYce4_BrrzGpDhOknJGjMU-JUhigR1R_EbID4TdClrhwJDBGCz26x9Wt1aN6uN6Ftd4U3zA-Vy4P7rMO-fGUvkbNCAPLBZilUFXbenzUx-vcO90EUBZqlgaAjv-eHoEY=?inline=true";
HttpGet get = new HttpGet(url);
CloseableHttpClient client = HttpClients.createDefault();
CloseableHttpResponse execute = client.execute(get);
HttpEntity entity = execute.getEntity();
byte[] bytes = EntityUtils.toByteArray(entity);
File f = new File("filename.txt");
FileOutputStream os = new FileOutputStream(f);
os.write(bytes);
os.flush();
var request = require('request');
request.get({
headers: {},
url: "https://api.everisbigcontent.com/edms/rest/v1/links/hgFxTdnIh1xTd171qZx1iQYce4_BrrzGpDhOknJGjMU-JUhigR1R_EbID4TdClrhwJDBGCz26x9Wt1aN6uN6Ftd4U3zA-Vy4P7rMO-fGUvkbNCAPLBZilUFXbenzUx-vcO90EUBZqlgaAjv-eHoEY=?inline=true",
}, function(error, response, body){
});