/contents

This is the endpoint to manage all the operations related with contents.

Download current version

Downloads the current version of the document.

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.

Table 1. HTTP Headers
Name Example Description

Document-Store

invoice_store

Document Store identifier

Authorization

Bearer ha9r6DG4e5AQ84gferAd8EQ…​

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

Access-User

john@company.com
or john
or 211555
or …​

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.

Path

Table 2. Path parameters
Name Value Detail

id

qga8r5hsy9rw5weggf93lopa58

Unique non-sequential auto-generated identifier of the document

Query parameters

Table 3. Query parameters
Name Value Detail

inline

true or false

Optional boolean query parameter. The response will include the content-disposition header. If true the header value will be inline. On the contrary, if it is 'false', the value will be 'attached'. Default value: `true`

Responses

Success

Successful responses can be easily identified being always 20x (e.g. 200, 201).

Table 4. Success
Field Example Description

Status code

200

OK

Body

HTTP Binary data

A stream data over http that contains the file

HTTP Headers

Table 5. HTTP parameters
Name Value Description

Content-Disposition

inline or attachment

If inline the content can be displayed inside the web page. If attachment the content should be downloaded

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 for Bad 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.
Example
{
  "span-id" : "7eb38962-2618-85f9-brte-4f15f6729590",
  "message" : "No match found for the Id"
}
Table 6. Error messages
Status code Message Description

401

The Token has expired on…​

Has passed more than an hour since the last create token or refresh token operation

401

Malformed token

The token sent is not valid

401

Problems parsing token

An empty token has been sent

401

The Document-Store header must be set

The header indicating the document store that you want to access, must be set

404

No match found for the Id

The document doesn’t exists in the specified Document Store

500

Internal server error

If it happens consistently, please report it on our forum

Code examples

  • cURL

  • Java

  • Node.js

curl "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58" \
-X GET \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store"
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/contents/qga8r5hsy9rw5weggf93lopa58";
String token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
String documentStore = "invoice_store";

HttpGet get = new HttpGet(url);
get.setHeader("Authorization", token);
get.setHeader("Document-Store", documentStore);

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');
var token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
var documentStore = "invoice_store";

request.get({
  headers: {
    "Authorization": token,
    "Document-Store": documentStore
  },
  url: "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58",
}, function(error, response, body){
});

Download by content ID

Downloads a specific content of the document selected by its content Id.

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.

Table 7. HTTP Headers
Name Example Description

Document-Store

invoice_store

Document Store identifier

Authorization

Bearer ha9r6DG4e5AQ84gferAd8EQ…​

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

Access-User

john@company.com
or john
or 211555
or …​

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.

Path

Table 8. Path parameters
Name Value Detail

id

qga8r5hsy9rw5weggf93lopa58

Unique non-sequential auto-generated identifier of the document

Content Id

g8q9ppihd58art2f9op1sq28gh

The content id identifies a particular content of the document.

Query parameters

Table 9. Query parameters
Name Value Detail

inline

true or false

Optional boolean query parameter. The response will include the content-disposition header. If true the header value will be inline. On the contrary, if it is 'false', the value will be 'attached'. Default value: `true`

Responses

Success

Successful responses can be easily identified being always 20x (e.g. 200, 201).

Table 10. Success
Field Example Description

Status code

200

OK

Body

HTTP Binary data

A stream data over http that contains the file

HTTP Headers

Table 11. HTTP parameters
Name Value Description

Content-Disposition

inline or attachment

If inline the content can be displayed inside the web page. If attachment the content should be downloaded

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 for Bad 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.
Example
{
  "span-id" : "7eb38962-2618-85f9-brte-4f15f6729590",
  "message" : "No match found for the Id"
}
Table 12. Error messages
Status code Message Description

401

The Token has expired on…​

Has passed more than an hour since the last create token or refresh token operation

401

Malformed token

The token sent is not valid

401

Problems parsing token

An empty token has been sent

401

The Document-Store header must be set

The header indicating the document store that you want to access, must be set

404

No match found for the Id

The document doesn’t exists in the specified Document Store

500

Internal server error

If it happens consistently, please report it on our forum

Code examples

  • cURL

  • Java

  • Node.js

curl "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/g8q9ppihd58art2f9op1sq28gh" \
-X GET \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store"
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/contents/qga8r5hsy9rw5weggf93lopa58/g8q9ppihd58art2f9op1sq28gh;
String token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
String documentStore = "invoice_store";

HttpGet get = new HttpGet(url);
get.setHeader("Authorization", token);
get.setHeader("Document-Store", documentStore);

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');
var token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
var documentStore = "invoice_store";

request.get({
  headers: {
    "Authorization": token,
    "Document-Store": documentStore
  },
  url: "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/g8q9ppihd58art2f9op1sq28gh",
}, function(error, response, body){
});

Download by version

Downloads a specific version of the document.

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.

Table 13. HTTP Headers
Name Example Description

Document-Store

invoice_store

Document Store identifier

Authorization

Bearer ha9r6DG4e5AQ84gferAd8EQ…​

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

Access-User

john@company.com
or john
or 211555
or …​

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.

Path

Table 14. Path parameters
Name Value Detail

id

qga8r5hsy9rw5weggf93lopa58

Unique non-sequential auto-generated identifier of the document

Major version

1

A hierarchically major number that defines a version of a content

Minor version

0

A hierarchically minor number along with mayor define a specific version of the content

Query parameters

Table 15. Query parameters
Name Value Detail

inline

true or false

Optional boolean query parameter. The response will include the content-disposition header. If true the header value will be inline. On the contrary, if it is 'false', the value will be 'attached'. Default value: `true`

Responses

Success

Successful responses can be easily identified being always 20x (e.g. 200, 201).

Table 16. Success
Field Example Description

Status code

200

OK

Body

HTTP Binary data

A stream data over http that contains the file

HTTP Headers

Table 17. HTTP parameters
Name Value Description

Content-Disposition

inline or attachment

If inline the content can be displayed inside the web page. If attachment the content should be downloaded

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 for Bad 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.
Example
{
  "span-id" : "7eb38962-2618-85f9-brte-4f15f6729590",
  "message" : "No match found for the Id"
}
Table 18. Error messages
Status code Message Description

401

The Token has expired on…​

Has passed more than an hour since the last create token or refresh token operation

401

Malformed token

The token sent is not valid

401

Problems parsing token

An empty token has been sent

401

The Document-Store header must be set

The header indicating the document store that you want to access, must be set

404

No match found for the Id

The document doesn’t exists in the specified Document Store

500

Internal server error

If it happens consistently, please report it on our forum

404

No match found for the major and minor version

Message that shows when the requested version it is not found on the Document Store

Code examples

  • cURL

  • Java

  • Node.js

curl "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/1/0" \
-X GET \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store"
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/contents/qga8r5hsy9rw5weggf93lopa58/1/0;
String token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
String = "invoice_store";

HttpGet get = new HttpGet(url);
get.setHeader("Authorization", token);
get.setHeader("Document-Store", documentStore);

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');
var token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
var documentStore = "invoice_store";

request.get({
  headers: {
    "Authorization": token,
    "Document-Store": documentStore
  },
  url: "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/1/0",
}, function(error, response, body){
});

Create Version

Creates a new version of a Document.

Uploads the new file, adds its metadata to the document metadata, and sets it as the current version.

The version number will be equal to the actual higher +1 in the major. For example, if the higher version is "5.4", the new version will be "6.4".

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.

Table 19. HTTP Headers
Name Example Description

Document-Store

invoice_store

Document Store identifier

Authorization

Bearer ha9r6DG4e5AQ84gferAd8EQ…​

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

Access-User

john@company.com
or john
or 211555
or …​

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.

Transfer-Encoding

chunked

Establishes if the content is sent in chunks according to rfc7230 (https://tools.ietf.org/html/rfc7230#section-4.1). Required to send files of 2048MB or larger.

Path

Table 20. Path parameters
Name Value Detail

id

qga8r5hsy9rw5weggf93lopa58

Unique non-sequential auto-generated identifier of the document

Multipart body

The body of this post request consist in a multipart/form-data that the new version of the file.

Table 21. Body parts
Name Example Description

file

-

The file we want to store in the system.
Current size limit 1GB.

Responses

Success

Successful responses can be easily identified being always 20x (e.g. 200, 201).

Table 22. Success
Field Example Description

Status code

201

CREATED

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 for Bad 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.
Example
{
  "span-id" : "7eb38962-2618-85f9-brte-4f15f6729590",
  "message" : "No match found for the Id"
}
Table 23. Error messages
Status code Message Description

401

The Token has expired on…​

Has passed more than an hour since the last create token or refresh token operation

401

Malformed token

The token sent is not valid

401

Problems parsing token

An empty token has been sent

401

The Document-Store header must be set

The header indicating the document store that you want to access, must be set

404

No match found for the Id

The document doesn’t exists in the specified Document Store

500

Internal server error

If it happens consistently, please report it on our forum

404

No match found for the major and minor version

Message that shows when the requested version it is not found on the Document Store

Code examples

  • cURL

  • Java

  • Node.js

curl "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58" \
-X POST \
-H 'Content-Type: multipart/form-data' \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store" \
-F file=@file_path
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
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/contents/qga8r5hsy9rw5weggf93lopa58";
String token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
String documentStore = "invoice_store";
File file = new File("src/main/resources/invoice.pdf");
String metadata = "{"description" : "Invoice template"}";

HttpPost post = new HttpPost(url);
post.setHeader("Authorization", token);
post.setHeader("Document-Store", documentStore);

byte[] bytes = Files.readAllBytes(file.toPath());
HttpEntity multipart = MultipartEntityBuilder.create()
       .addBinaryBody("file", file, ContentType.DEFAULT_BINARY, "text.txt")
        .build();

post.setEntity(multipart);

CloseableHttpClient client = HttpClients.createDefault();
CloseableHttpResponse execute = client.execute(post);
HttpEntity entity = execute.getEntity();

String jsonResponse = EntityUtils.toString(entity, StandardCharsets.UTF_8);
var request = require('request');
var fs = require('fs');
var token = "ha9r6DG4e5AQ84gferAd8EQ...";
var documentStore = "invoice_store";

var formData = {
  file: {
    value:  fs.createReadStream("./resources/invoice.pdf"),
    options: {
      contentType: 'application/pdf'
    }
  }
}

request.post({
  headers: {
    "Authorization": "Bearer " + token,
    "Content-Type": "multipart/form-data",
    "Document-Store": documentStore
  },
  url: 'https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58',
  formData : formData

}, function(error, response, body){
  console.log(body);
});

Delete Current Version

Deletes the current version of the Document. That means deleting only one of its the contents and selecting the next version in number as current. Optionally, users with administrative rights can override the document store’s default deletion policy adding the type parameter. In other words, if no type is set, the document store default value is applied.

There are 3 supported different types of deletion: metadata_flagging, metadata_deletion and physical_deletion.

Any of them can be set as the default one in the document store. Being metadata_flagging set automatically as the default value.

  • metadata_flagging: doesn’t actually delete any information about the document. Instead, it sets the deleted document or content as hidden, so only users with administration privileges are able to manipulate them.
    Hidden documents are flagged with the _hidden property, which is only visible by administrators. Once hidden, a document or content can be easily restored by admins using the appropriate operations (restore document, restore content).

  • metadata_deletion: deletes only the metadata, without deleting the binary contents. The binary files will be unreachable, even for admins, but won’t be lost. If a restore is needed, make a request to the BigContent support team.

  • physical_deletion: deletes the whole document permanently, including both metadata and content files. Restoration WILL NOT be possible under ANY circumstances.

We don’t allow documents without contents, so it is not possible to delete the last active version. To completely delete a document, use delete document.

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.

Table 24. HTTP Headers
Name Example Description

Document-Store

invoice_store

Document Store identifier

Authorization

Bearer ha9r6DG4e5AQ84gferAd8EQ…​

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

Access-User

john@company.com
or john
or 211555
or …​

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.

Path

Table 25. Path
Name Value Detail

id

qga8r5hsy9rw5weggf93lopa58

Unique non-sequential auto-generated identifier of the document

Query Parameters

Table 26. Query Parameters
Name Value Detail

type

metadata_flagging, metadata_deletion, physical_deletion

Type of deletion to be applied. Overrides the type defined in the document store configuration

Table 27. Deletion type
Type Detail

metadata_flagging

The content _hidden field is set to true. After that, only users with administrative rights will be able to access the document.

metadata_deletion

All the metadata of the content is permanently deleted. The binary files will be unreachable, even for admins. (If a restore is needed, make a request to the BigContent support team)

physical_deletion

The whole content is permanently deleted, including both metadata and binary files. Restoration will not be possible under ANY circumstances.

Responses

Success

Successful responses can be easily identified being always 20x (e.g. 200, 201).

Table 28. Success
Field Example Description

Status code

204

NO CONTENT

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 for Bad 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.
Example
{
  "span-id" : "7eb38962-2618-85f9-brte-4f15f6729590",
  "message" : "No match found for the Id"
}
Table 29. Error messages
Status code Message Description

400

Cannot delete last content element

There must be at least one active content for each document

401

The Token has expired on…​

Has passed more than an hour since the last create token or refresh token operation

401

Malformed token

The token sent is not valid

401

Problems parsing token

An empty token has been sent

401

The Document-Store header must be set

The header indicating the document store that you want to access, must be set

404

No match found for the Id

The document doesn’t exists in the specified Document Store

500

Internal server error

If it happens consistently, please report it on our forum

Code examples

  • cURL

  • Java

  • Node.js

$ curl "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58?type=metadata_flagging" \
-X DELETE \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store"
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.*;
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/contents/qga8r5hsy9rw5weggf93lopa58?type=metadata_flagging";
String token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
String documentStore = "invoice_store";

HttpDelete delete = new HttpDelete(url);
delete.setHeader("Authorization", token);
delete.setHeader("Document-Store", documentStore);

CloseableHttpClient client = HttpClients.createDefault();
CloseableHttpResponse execute = client.execute(delete);
HttpEntity entity = execute.getEntity();
var request = require('request');
var token = "ha9r6DG4e5AQ84gferAd8EQ...";
var documentStore = "invoice_store";

request.delete({
  headers: {
    'Authorization': 'Bearer ' + documentStore,
    'Document-Store': documentStore
  },
  url: 'https://int-api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58?type=metadata_flagging'
}, function (error, response, body) {
});

Delete Version

Deletes a specific version of the content. That means deleting only one of its the contents and, if the version is the current one, selecting the next version in number as current. Optionally, users with administrative rights can override the document store’s default deletion policy adding the type parameter. In other words, if no type is set, the document store default value is applied.

There are 3 supported different types of deletion: metadata_flagging, metadata_deletion and physical_deletion.

Any of them can be set as the default one in the document store. Being metadata_flagging set automatically as the default value.

  • metadata_flagging: doesn’t actually delete any information about the document. Instead, it sets the deleted document or content as hidden, so only users with administration privileges are able to manipulate them.
    Hidden documents are flagged with the _hidden property, which is only visible by administrators. Once hidden, a document or content can be easily restored by admins using the appropriate operations (restore document, restore content).

  • metadata_deletion: deletes only the metadata, without deleting the binary contents. The binary files will be unreachable, even for admins, but won’t be lost. If a restore is needed, make a request to the BigContent support team.

  • physical_deletion: deletes the whole document permanently, including both metadata and content files. Restoration WILL NOT be possible under ANY circumstances.

We don’t allow documents without contents, so it is not possible to delete the last active version. To completely delete a document, use delete document.

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.

Table 30. HTTP Headers
Name Example Description

Document-Store

invoice_store

Document Store identifier

Authorization

Bearer ha9r6DG4e5AQ84gferAd8EQ…​

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

Access-User

john@company.com
or john
or 211555
or …​

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.

Path

Table 31. Path
Name Value Detail

id

qga8r5hsy9rw5weggf93lopa58

Unique non-sequential auto-generated identifier of the document

Major version

1

A hierarchically major number that defines a version of a content

Minor version

0

A hierarchically minor number along with mayor define a specific version of the content

Query Parameters

Table 32. Query Parameters
Name Value Detail

type

metadata_flagging, metadata_deletion, physical_deletion

Type of deletion to be applied. Overrides the type defined in the document store configuration

Table 33. Deletion type
Type Detail

metadata_flagging

The content _hidden field is set to true. After that, only users with administrative rights will be able to access the document.

metadata_deletion

All the metadata of the content is permanently deleted. The binary files will be unreachable, even for admins. (If a restore is needed, make a request to the BigContent support team)

physical_deletion

The whole content is permanently deleted, including both metadata and binary files. Restoration will not be possible under ANY circumstances.

Responses

Success

Successful responses can be easily identified being always 20x (e.g. 200, 201).

Table 34. Success
Field Example Description

Status code

204

NO CONTENT

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 for Bad 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.
Example
{
  "span-id" : "7eb38962-2618-85f9-brte-4f15f6729590",
  "message" : "No match found for the Id"
}
Table 35. Error messages
Status code Message Description

400

Cannot delete last content element

There must be at least one active content for each document

401

The Token has expired on…​

Has passed more than an hour since the last create token or refresh token operation

401

Malformed token

The token sent is not valid

401

Problems parsing token

An empty token has been sent

401

The Document-Store header must be set

The header indicating the document store that you want to access, must be set

404

No match found for the Id

The document doesn’t exists in the specified Document Store

500

Internal server error

If it happens consistently, please report it on our forum

404

No match found for the major and minor version

Message that shows when the requested version it is not found on the Document Store

Code examples

  • cURL

  • Java

  • Node.js

$ curl "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58?type=metadata_flagging/2/0" \
-X DELETE \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store"
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.*;
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/contents/qga8r5hsy9rw5weggf93lopa58/2/0?type=metadata_flagging";
String token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
String documentStore = "invoice_store";

HttpDelete delete = new HttpDelete(url);
delete.setHeader("Authorization", token);
delete.setHeader("Document-Store", documentStore);

CloseableHttpClient client = HttpClients.createDefault();
CloseableHttpResponse execute = client.execute(delete);
HttpEntity entity = execute.getEntity();
var request = require('request');
var token = "ha9r6DG4e5AQ84gferAd8EQ...";
var documentStore = 'invoice_store';

request.delete({
  headers: {
    'Authorization': 'Bearer ' + token,
    'Document-Store': documentStore
  },
  url: 'https://int-api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/2/0?type=metadata_flagging'
}, function (error, response, body) {
});

Delete content by id

Deletes a specific content of the document. That means deleting only one of the contents indicated by id. If the selected version is the current one, the next version following numbering order will me marked as current.

If no type is set, the document store default value is applied. Optionally, users with administrative rights can override the document store’s default deletion policy adding the type parameter.

There are 3 supported different types of deletion: metadata_flagging, metadata_deletion and physical_deletion.

Any of them can be set as the default one in the document store. Being metadata_flagging set automatically as the default value.

  • metadata_flagging: doesn’t actually delete any information about the document. Instead, it sets the deleted document or content as hidden, so only users with administration privileges are able to manipulate them.
    Hidden documents are flagged with the _hidden property, which is only visible by administrators. Once hidden, a document or content can be easily restored by admins using the appropriate operations (restore document, restore content).

  • metadata_deletion: deletes only the metadata, without deleting the binary contents. The binary files will be unreachable, even for admins, but won’t be lost. If a restore is needed, make a request to the BigContent support team.

  • physical_deletion: deletes the whole document permanently, including both metadata and content files. Restoration WILL NOT be possible under ANY circumstances.

We don’t allow documents without contents, so it is not possible to delete the last active version. To completely delete a document (including metadata), use delete document.

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.

Table 36. HTTP Headers
Name Example Description

Document-Store

invoice_store

Document Store identifier

Authorization

Bearer ha9r6DG4e5AQ84gferAd8EQ…​

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

Access-User

john@company.com
or john
or 211555
or …​

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.

Path

Table 37. Path
Name Value Detail

documentId

qga8r5hsy9rw5weggf93lopa58

Unique non-sequential auto-generated identifier of the document

contentId

g8q9ppihd58art2f9op1sq28gh

Unique non-sequential auto-generated of a content belonging to a document

Query Parameters

Table 38. Query Parameters
Name Value Detail

type

metadata_flagging, metadata_deletion, physical_deletion

Type of deletion to be applied. Overrides the type defined in the document store configuration

Table 39. Deletion type
Type Detail

metadata_flagging

The content _hidden field is set to true. After that, only users with administrative rights will be able to access the document.

metadata_deletion

All the metadata of the content is permanently deleted. The binary files will be unreachable, even for admins. (If a restore is needed, make a request to the BigContent support team)

physical_deletion

The whole content is permanently deleted, including both metadata and binary files. Restoration will not be possible under ANY circumstances.

Responses

Success

Successful responses can be easily identified being always 20x (e.g. 200, 201).

Table 40. Success
Field Example Description

Status code

204

NO CONTENT

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 for Bad 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.
Example
{
  "span-id" : "7eb38962-2618-85f9-brte-4f15f6729590",
  "message" : "No match found for the Id"
}
Table 41. Error messages
Status code Message Description

400

Cannot delete last content element

There must be at least one active content for each document

401

The Token has expired on…​

Has passed more than an hour since the last create token or refresh token operation

401

Malformed token

The token sent is not valid

401

Problems parsing token

An empty token has been sent

401

The Document-Store header must be set

The header indicating the document store that you want to access, must be set

404

No match found for the Id

The document doesn’t exists in the specified Document Store

404

No match found for the Id

The content doesn’t exists in the specified document

500

Internal server error

If it happens consistently, please report it on our forum

Code examples

  • cURL

  • Java

  • Node.js

$ curl "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/g8q9ppihd58art2f9op1sq28gh?type=metadata_flagging/" \
-X DELETE \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store"
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.*;
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/contents/qga8r5hsy9rw5weggf93lopa58/g8q9ppihd58art2f9op1sq28gh?type=metadata_flagging";
String token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
String documentStore = "invoice_store";

HttpDelete delete = new HttpDelete(url);
delete.setHeader("Authorization", token);
delete.setHeader("Document-Store", documentStore);

CloseableHttpClient client = HttpClients.createDefault();
CloseableHttpResponse execute = client.execute(delete);
HttpEntity entity = execute.getEntity();
var request = require('request');
var token = "ha9r6DG4e5AQ84gferAd8EQ...";
var documentStore = 'invoice_store';

request.delete({
  headers: {
    'Authorization': 'Bearer ' + token,
    'Document-Store': documentStore
  },
  url: 'https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/g8q9ppihd58art2f9op1sq28gh?type=metadata_flagging'
}, function (error, response, body) {
});

Update Current Version

Updates the current content version of a Document. This operation replace the content metadata and the binary file.

What happens to the old version will depend on the Document Store default deletion policy.
If it is metadata_flagging the old file will be kept and the old metadata content will be marked as hidden. If it is metadata_deletion the old file will be kept but the the old metadata will be deleted.

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.

Table 42. HTTP Headers
Name Example Description

Document-Store

invoice_store

Document Store identifier

Authorization

Bearer ha9r6DG4e5AQ84gferAd8EQ…​

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

Access-User

john@company.com
or john
or 211555
or …​

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.

Transfer-Encoding

chunked

Establishes if the content is sent in chunks according to rfc7230 (https://tools.ietf.org/html/rfc7230#section-4.1). Required to send files of 2048MB or larger.

Path

Table 43. Path parameters
Name Value Detail

id

qga8r5hsy9rw5weggf93lopa58

Unique non-sequential auto-generated identifier of the document

Multipart body

The body of this post request consist in a multipart/form-data that the new version of the file.

Table 44. Body parts

Name

Example

Description

file

-

The file we want to store in the system.
Current size limit 1GB.

Responses

Success

Successful responses can be easily identified being always 20x (e.g. 200, 201).

Table 45. Success
Field Example Description

Status code

204

NO CONTENT

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 for Bad 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.
Example
{
  "span-id" : "7eb38962-2618-85f9-brte-4f15f6729590",
  "message" : "No match found for the Id"
}
Table 46. Error messages
Status code Message Description

401

The Token has expired on…​

Has passed more than an hour since the last create token or refresh token operation

401

Malformed token

The token sent is not valid

401

Problems parsing token

An empty token has been sent

401

The Document-Store header must be set

The header indicating the document store that you want to access, must be set

404

No match found for the Id

The document doesn’t exists in the specified Document Store

500

Internal server error

If it happens consistently, please report it on our forum

404

No match found for the major and minor version

Message that shows when the requested version it is not found on the Document Store

Code examples

  • cURL

  • Java

  • Node.js

curl "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58" \
-X PUT \
-H 'Content-Type: multipart/form-data' \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store" \
-F file=@file_path
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPut;
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/contents/qga8r5hsy9rw5weggf93lopa58";
String token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
String documentStore = "invoice_store";
File file = new File("src/main/resources/invoice.pdf");
String metadata = "{"description" : "Invoice template"}";

HttpPutt put = new HttpPutt(url);
put.setHeader("Authorization", token);
put.setHeader("Document-Store", documentStore);

byte[] bytes = Files.readAllBytes(file.toPath());
HttpEntity multipart = MultipartEntityBuilder.create()
       .addBinaryBody("file", file, ContentType.DEFAULT_BINARY, "text.txt")
        .build();

put.setEntity(multipart);

CloseableHttpClient client = HttpClients.createDefault();
CloseableHttpResponse execute = client.execute(put);
HttpEntity entity = execute.getEntity();

String jsonResponse = EntityUtils.toString(entity, StandardCharsets.UTF_8);
var request = require('request');
var fs = require('fs');
var token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
var documentStore = "invoice_store";

var formData = {
  file: {
    value:  fs.createReadStream("./resources/invoice.pdf"),
    options: {
      contentType: 'application/pdf'
    }
  }
}

request.put({
  headers: {
    "Authorization": token,
    "Content-Type": "multipart/form-data",
    "Document-Store": documentStore
  },
  url: 'https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58',
  formData : formData

}, function(error, response, body){
  console.log(body);
});

Update metadata content by id

This operation updates the metadata of a specific content.

Parameters

HTTP headers allow pass additional information with the request or the response. BigContent headers are used for recurrent details like authentication or document store.

Table 47. HTTP Headers
Name Example Description

Document-Store

invoice_store

Document Store identifier

Authorization

Bearer ha9r6DG4e5AQ84gferAd8EQ…​

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

Access-User

john@company.com
or john
or 211555
or …​

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.

Path

Table 48. Path parameters
Name Value Detail

id

qga8r5hsy9rw5weggf93lopa58

Unique non-sequential auto-generated identifier of the document

id

g8q9ppihd58art2f9op1sq28gh

Unique non-sequential auto-generated of a content belonging to a document

Multipart body

The body of this post request consist in a multipart/form-data that the new version of the file.

Table 49. Body parts

Name

Example

Description

Content

-

The content including the name which we want to update.

Responses

Success

Successful responses can be easily identified being always 20x (e.g. 200, 201).

Table 50. Success
Field Example Description

Status code

204

NO CONTENT

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 for Bad 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.
Example
{
  "span-id" : "7eb38962-2618-85f9-brte-4f15f6729590",
  "message" : "No match found for the Id"
}
Table 51. Error messages
Status code Message Description

401

The Token has expired on…​

Has passed more than an hour since the last create token or refresh token operation

401

Malformed token

The token sent is not valid

401

Problems parsing token

An empty token has been sent

401

The Document-Store header must be set

The header indicating the document store that you want to access, must be set

404

No match found for the Id

The document doesn’t exists in the specified Document Store

500

Internal server error

If it happens consistently, please report it on our forum

404

No match found for the major and minor version

Message that shows when the requested version it is not found on the Document Store

Code examples

  • cURL

  • Java

  • Node.js

curl "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/version/g8q9ppihd58art2f9op1sq28gh" \
-X PUT \
-H 'Content-Type: multipart/form-data' \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store" \
-d '{"name" : "invoice.pdf"}'
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPut;
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/contents/qga8r5hsy9rw5weggf93lopa58/version/g8q9ppihd58art2f9op1sq28gh";
String token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
String documentStore = "invoice_store";
File file = new File("src/main/resources/invoice.pdf");
String content = "{"name" : "invoice.pdf"}";

HttpPutt put = new HttpPutt(url);
put.setHeader("Authorization", token);
put.setHeader("Document-Store", documentStore);
StringEntity json = new StringEntity(content);
json.setContentType(ContentType.APPLICATION_JSON.toString());
put.setEntity(json);


CloseableHttpClient client = HttpClients.createDefault();
CloseableHttpResponse execute = client.execute(put);
HttpEntity entity = execute.getEntity();

String jsonResponse = EntityUtils.toString(entity, StandardCharsets.UTF_8);
var request = require('request');
var fs = require('fs');
var token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
var documentStore = "invoice_store";
var formData="{"name" : "invoice.pdf"}";

request.put({
  headers: {
    "Authorization": token,
    "Content-Type": "multipart/form-data",
    "Document-Store": documentStore
  },
  url: 'https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/version/g8q9ppihd58art2f9op1sq28gh',
  formData : formData

}, function(error, response, body){
  console.log(body);
});

Update metadata content by version

This operation updates the metadata of a specific content.

Parameters

HTTP headers allow pass additional information with the request or the response. BigContent headers are used for recurrent details like authentication or document store.

Table 52. HTTP Headers
Name Example Description

Document-Store

invoice_store

Document Store identifier

Authorization

Bearer ha9r6DG4e5AQ84gferAd8EQ…​

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

Access-User

john@company.com
or john
or 211555
or …​

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.

Path

Table 53. Path parameters
Name Value Detail

id

qga8r5hsy9rw5weggf93lopa58

Unique non-sequential auto-generated identifier of the document

Major version

1

A hierarchically major number that defines a version of a content

Minor version

0

A hierarchically minor number along with mayor define a specific version of the content

Multipart body

The body of this post request consist in a multipart/form-data that the new version of the file.

Table 54. Body parts

Name

Example

Description

Content

-

The content including the name which we want to update.

Responses

Success

Successful responses can be easily identified being always 20x (e.g. 200, 201).

Table 55. Success
Field Example Description

Status code

204

NO CONTENT

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 for Bad 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.
Example
{
  "span-id" : "7eb38962-2618-85f9-brte-4f15f6729590",
  "message" : "No match found for the Id"
}
Table 56. Error messages
Status code Message Description

401

The Token has expired on…​

Has passed more than an hour since the last create token or refresh token operation

401

Malformed token

The token sent is not valid

401

Problems parsing token

An empty token has been sent

401

The Document-Store header must be set

The header indicating the document store that you want to access, must be set

404

No match found for the Id

The document doesn’t exists in the specified Document Store

500

Internal server error

If it happens consistently, please report it on our forum

404

No match found for the major and minor version

Message that shows when the requested version it is not found on the Document Store

Code examples

  • cURL

  • Java

  • Node.js

curl "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/version/2/0" \
-X PUT \
-H 'Content-Type: multipart/form-data' \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store" \
-d '{"name" : "invoice.pdf"}'
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPut;
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/contents/qga8r5hsy9rw5weggf93lopa58/version/2/0";
String token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
String documentStore = "invoice_store";
File file = new File("src/main/resources/invoice.pdf");
String content = "{"name" : "invoice.pdf"}";

HttpPutt put = new HttpPutt(url);
put.setHeader("Authorization", token);
put.setHeader("Document-Store", documentStore);
StringEntity json = new StringEntity(content);
json.setContentType(ContentType.APPLICATION_JSON.toString());
put.setEntity(json);


CloseableHttpClient client = HttpClients.createDefault();
CloseableHttpResponse execute = client.execute(put);
HttpEntity entity = execute.getEntity();

String jsonResponse = EntityUtils.toString(entity, StandardCharsets.UTF_8);
var request = require('request');
var fs = require('fs');
var token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
var documentStore = "invoice_store";

var formData="{"name" : "invoice.pdf"}";

request.put({
  headers: {
    "Authorization": token,
    "Content-Type": "multipart/form-data",
    "Document-Store": documentStore
  },
  url: 'https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/version/2/0',
  formData : formData

}, function(error, response, body){
  console.log(body);
});

Get Current Content Metadata

Retrieves the metadata of the current version of the Document.

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.

Table 57. HTTP Headers
Name Example Description

Document-Store

invoice_store

Document Store identifier

Authorization

Bearer ha9r6DG4e5AQ84gferAd8EQ…​

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

Access-User

john@company.com
or john
or 211555
or …​

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.

Path

Table 58. Path parameters
Name Value Detail

id

qga8r5hsy9rw5weggf93lopa58

Unique non-sequential auto-generated identifier of the document

Responses

Success

Successful responses can be easily identified being always 20x (e.g. 200, 201).

Table 59. Success
Field Example Description

Status code

200

OK

Content-Type

application/json

The Content-Type entity header is used to indicate the media type of the resource. In this case, it must be application/json

Body

JSON response

A JSON containing the metadata of the content

JSON response
{
  "id" : "g8q9ppihd58art2f9op1sq28gh",
  "name" : "invoice.pdf",
  "type" : "application/pdf",
  "size" : 58943,
  "majorVersion" : 1,
  "minorVersion" : 0,
  "_hidden" : false,
  "author" : "john@company.com",
  "dateCreated" : "2018-10-24T07:10:51.709Z",
  "lastModifier" : "john@company.com",
  "dateModified" : "2018-10-24T07:10:51.709Z"
}
Table 60. Content
Name Value Detail

id

g8q9ppihd58art2f9op1sq28gh

Unique non-sequential auto-generated identifier of the content

name

invoice11.pdf

Filename provided at the creation of the document

type

application/pdf

Content type of the associated file

majorVersion

2

A hierarchically major number that defines the creation order of the version

minorVersion

0

A hierarchically minor number that defines the creation order of the version

size

58943

The size of the file uploaded in bytes

_hidden

false

Flag that indicates whether the document has been logically deleted or not. Only Admins can see it, and only if it is set to false, non admin users can see the document

author

john@company.com

User account that uploaded the content to BigContent

dateCreated

2018-10-24T07:10:51.709Z

Date on which the version was uploaded. The format we follow is yyyy-MM-ddTHH:mm:ss.SSSZ. The "T" is used to separate date and time, and the Z is the zone designator for the zero UTC offset

lastModifier

john@company.com

The user that made the last modification to the version metadata

dateModified

2018-10-24T07:10:51.709Z

Date on which the version metadata was modified. The format we follow is yyyy-MM-ddTHH:mm:ss.SSSZ. The "T" is used to separate date and time, and the Z is the zone designator for the zero UTC offset

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 for Bad 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.
Example
{
  "span-id" : "7eb38962-2618-85f9-brte-4f15f6729590",
  "message" : "No match found for the Id"
}
Table 61. Error messages
Status code Message Description

401

The Token has expired on…​

Has passed more than an hour since the last create token or refresh token operation

401

Malformed token

The token sent is not valid

401

Problems parsing token

An empty token has been sent

401

The Document-Store header must be set

The header indicating the document store that you want to access, must be set

403

User _ has no rights to access to the DocumentStore _

We dont have access to that document store, or it is misspelled

404

No match found for the Id

The document doesn’t exists in the specified Document Store

500

Internal server error

If it happens consistently, please report it on our forum

Code examples

  • cURL

  • Java

  • Node.js

curl "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/version" \
-X GET \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store"
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/contents/qga8r5hsy9rw5weggf93lopa58/version";
String token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
String documentStore = "invoice_store";

HttpGet get = new HttpGet(url);
get.setHeader("Authorization", token);
get.setHeader("Document-Store", documentStore);

CloseableHttpClient client = HttpClients.createDefault();
CloseableHttpResponse execute = client.execute(get);
HttpEntity entity = execute.getEntity();

String jsonResponse = EntityUtils.toString(entity, StandardCharsets.UTF_8);
var request = require('request');
var token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
var documentStore = "invoice_store";

request.get({
  headers: {
    "Authorization": token,
    "Document-Store": documentStore
  },
  url: "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/version",

}, function(error, response, body){
  console.log(body);
});

Get Content Metadata List

Retrieves the metadata of all the versions of the Document.

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.

Table 62. HTTP Headers
Name Example Description

Document-Store

invoice_store

Document Store identifier

Authorization

Bearer ha9r6DG4e5AQ84gferAd8EQ…​

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

Access-User

john@company.com
or john
or 211555
or …​

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.

Path

Table 63. Path parameters
Name Value Detail

id

qga8r5hsy9rw5weggf93lopa58

Unique non-sequential auto-generated identifier of the document

Responses

Success

Successful responses can be easily identified being always 20x (e.g. 200, 201).

Table 64. Success
Field Example Description

Status code

200

OK

Content-Type

application/json

The Content-Type entity header is used to indicate the media type of the resource. In this case, it must be application/json

Body

JSON response

A JSON containing the metadata of the content

JSON response
[
  {
    "id" : "g8q9ppihd58art2f9op1sq28gh",
    "name" : "invoice.pdf",
    "type" : "application/pdf",
    "size" : 58943,
    "majorVersion" : 1,
    "minorVersion" : 0,
    "_hidden" : false,
    "author" : "john@company.com",
    "dateCreated" : "2018-10-24T07:10:51.709Z",
    "lastModifier" : "john@company.com",
    "dateModified" : "2018-10-24T07:10:51.709Z"
  },
  {
    "id" : "g8q9ppihd58art2f9op1sq28gh",
    "name" : "invoice.pdf",
    "type" : "application/pdf",
    "size" : 59658,
    "majorVersion" : 2,
    "minorVersion" : 0,
    "_hidden" : false,
    "author" : "john@company.com",
    "dateCreated" : "2018-10-24T07:10:51.709Z",
    "lastModifier" : "john@company.com",
    "dateModified" : "2018-10-24T07:10:51.709Z"
  },
  {
    "id" : "g8q9ppihd58art2f9op1sq28gh",
    "name" : "invoice.pdf",
    "type" : "application/pdf",
    "size" : 63487,
    "majorVersion" : 3,
    "minorVersion" : 0,
    "_hidden" : false,
    "author" : "john@company.com",
    "dateCreated" : "2018-10-24T07:10:51.709Z",
    "lastModifier" : "john@company.com",
    "dateModified" : "2018-10-24T07:10:51.709Z"
  }
]
Table 65. Content
Name Value Detail

id

g8q9ppihd58art2f9op1sq28gh

Unique non-sequential auto-generated identifier of the content

name

invoice11.pdf

Filename provided at the creation of the document

type

application/pdf

Content type of the associated file

majorVersion

2

A hierarchically major number that defines the creation order of the version

minorVersion

0

A hierarchically minor number that defines the creation order of the version

size

58943

The size of the file uploaded in bytes

_hidden

false

Flag that indicates whether the document has been logically deleted or not. Only Admins can see it, and only if it is set to false, non admin users can see the document

author

john@company.com

User account that uploaded the content to BigContent

dateCreated

2018-10-24T07:10:51.709Z

Date on which the version was uploaded. The format we follow is yyyy-MM-ddTHH:mm:ss.SSSZ. The "T" is used to separate date and time, and the Z is the zone designator for the zero UTC offset

lastModifier

john@company.com

The user that made the last modification to the version metadata

dateModified

2018-10-24T07:10:51.709Z

Date on which the version metadata was modified. The format we follow is yyyy-MM-ddTHH:mm:ss.SSSZ. The "T" is used to separate date and time, and the Z is the zone designator for the zero UTC offset

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 for Bad 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.
Example
{
  "span-id" : "7eb38962-2618-85f9-brte-4f15f6729590",
  "message" : "No match found for the Id"
}
Table 66. Error messages
Status code Message Description

401

The Token has expired on…​

Has passed more than an hour since the last create token or refresh token operation

401

Malformed token

The token sent is not valid

401

Problems parsing token

An empty token has been sent

401

The Document-Store header must be set

The header indicating the document store that you want to access, must be set

403

User _ has no rights to access to the DocumentStore _

We dont have access to that document store, or it is misspelled

404

No match found for the Id

The document doesn’t exists in the specified Document Store

500

Internal server error

If it happens consistently, please report it on our forum

Code examples

  • cURL

  • Java

  • Node.js

curl "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/versions" \
-X GET \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store"
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/contents/qga8r5hsy9rw5weggf93lopa58/versions";
String token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
Strong documentStore = "invoice_store";

HttpGet get = new HttpGet(url);
get.setHeader("Authorization", token);
get.setHeader("Document-Store", documentStore);

CloseableHttpClient client = HttpClients.createDefault();
CloseableHttpResponse execute = client.execute(get);
HttpEntity entity = execute.getEntity();

String jsonResponse = EntityUtils.toString(entity, StandardCharsets.UTF_8);
var request = require('request');
var token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
var documentStore = "invoice_store";

request.get({
  headers: {
    "Authorization": token,
    "Document-Store": documentStore
  },
  url: "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/versions",

}, function(error, response, body){
  console.log(body);
});

Get Content Metadata by Version

Retrieves the metadata of a specific version of the Document.

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.

Table 67. HTTP Headers
Name Example Description

Document-Store

invoice_store

Document Store identifier

Authorization

Bearer ha9r6DG4e5AQ84gferAd8EQ…​

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

Access-User

john@company.com
or john
or 211555
or …​

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.

Path

Table 68. Path parameters
Name Value Detail

id

qga8r5hsy9rw5weggf93lopa58

Unique non-sequential auto-generated identifier of the document

Major version

1

A hierarchically major number that defines a version of a content

Minor version

0

A hierarchically minor number along with mayor define a specific version of the content

Responses

Success

Successful responses can be easily identified being always 20x (e.g. 200, 201).

Table 69. Success
Field Example Description

Status code

200

OK

Content-Type

application/json

The Content-Type entity header is used to indicate the media type of the resource. In this case, it must be application/json

Body

JSON response

A JSON containing the metadata of the content

JSON response
{
  "id" : "g8q9ppihd58art2f9op1sq28gh",
  "name" : "invoice.pdf",
  "type" : "application/pdf",
  "size" : 58943,
  "majorVersion" : 1,
  "minorVersion" : 0,
  "_hidden" : false,
  "author" : "john@company.com",
  "dateCreated" : "2018-10-24T07:10:51.709Z",
  "lastModifier" : "john@company.com",
  "dateModified" : "2018-10-24T07:10:51.709Z"
}
Table 70. Content
Name Value Detail

id

g8q9ppihd58art2f9op1sq28gh

Unique non-sequential auto-generated identifier of the content

name

invoice11.pdf

Filename provided at the creation of the document

type

application/pdf

Content type of the associated file

majorVersion

2

A hierarchically major number that defines the creation order of the version

minorVersion

0

A hierarchically minor number that defines the creation order of the version

size

58943

The size of the file uploaded in bytes

_hidden

false

Flag that indicates whether the document has been logically deleted or not. Only Admins can see it, and only if it is set to false, non admin users can see the document

author

john@company.com

User account that uploaded the content to BigContent

dateCreated

2018-10-24T07:10:51.709Z

Date on which the version was uploaded. The format we follow is yyyy-MM-ddTHH:mm:ss.SSSZ. The "T" is used to separate date and time, and the Z is the zone designator for the zero UTC offset

lastModifier

john@company.com

The user that made the last modification to the version metadata

dateModified

2018-10-24T07:10:51.709Z

Date on which the version metadata was modified. The format we follow is yyyy-MM-ddTHH:mm:ss.SSSZ. The "T" is used to separate date and time, and the Z is the zone designator for the zero UTC offset

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 for Bad 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.
Example
{
  "span-id" : "7eb38962-2618-85f9-brte-4f15f6729590",
  "message" : "No match found for the Id"
}
Table 71. Error messages
Status code Message Description

401

The Token has expired on…​

Has passed more than an hour since the last create token or refresh token operation

401

Malformed token

The token sent is not valid

401

Problems parsing token

An empty token has been sent

401

The Document-Store header must be set

The header indicating the document store that you want to access, must be set

403

User _ has no rights to access to the DocumentStore _

We dont have access to that document store, or it is misspelled

404

No match found for the Id

The document doesn’t exists in the specified Document Store

500

Internal server error

If it happens consistently, please report it on our forum

Code examples

  • cURL

  • Java

  • Node.js

curl "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/version/2/0" \
-X GET \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store"
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/contents/qga8r5hsy9rw5weggf93lopa58/version/2/0";
String token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
String documentStore = "invoice_store";

HttpGet get = new HttpGet(url);
get.setHeader("Authorization", token);
get.setHeader("Document-Store", documentStore);

CloseableHttpClient client = HttpClients.createDefault();
CloseableHttpResponse execute = client.execute(get);
HttpEntity entity = execute.getEntity();

String jsonResponse = EntityUtils.toString(entity, StandardCharsets.UTF_8);
var request = require('request');
var token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
var documentStore = "invoice_store";

request.get({
  headers: {
    "Authorization": token,
    "Document-Store": documentStore
  },
  url: "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/version/2/0",

}, function(error, response, body){
  console.log(body);
});

Get Content Metadata by Content Id

Retrieves the metadata of a specific content of the Document.

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.

Table 72. HTTP Headers
Name Example Description

Document-Store

invoice_store

Document Store identifier

Authorization

Bearer ha9r6DG4e5AQ84gferAd8EQ…​

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

Access-User

john@company.com
or john
or 211555
or …​

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.

Path

Table 73. Path parameters
Name Value Detail

id

qga8r5hsy9rw5weggf93lopa58

Unique non-sequential auto-generated identifier of the document

Content Id

g8q9ppihd58art2f9op1sq28gh

The content id identifies a particular version content of the document.

Responses

Success

Successful responses can be easily identified being always 20x (e.g. 200, 201).

Table 74. Success
Field Example Description

Status code

200

OK

Content-Type

application/json

The Content-Type entity header is used to indicate the media type of the resource. In this case, it must be application/json

Body

JSON response

A JSON containing the metadata of the content

JSON response
{
  "id" : "g8q9ppihd58art2f9op1sq28gh",
  "name" : "invoice.pdf",
  "type" : "application/pdf",
  "size" : 58943,
  "majorVersion" : 1,
  "minorVersion" : 0,
  "_hidden" : false,
  "author" : "john@company.com",
  "dateCreated" : "2018-10-24T07:10:51.709Z",
  "lastModifier" : "john@company.com",
  "dateModified" : "2018-10-24T07:10:51.709Z"
}
Table 75. Content
Name Value Detail

id

g8q9ppihd58art2f9op1sq28gh

Unique non-sequential auto-generated identifier of the content

name

invoice11.pdf

Filename provided at the creation of the document

type

application/pdf

Content type of the associated file

majorVersion

2

A hierarchically major number that defines the creation order of the version

minorVersion

0

A hierarchically minor number that defines the creation order of the version

size

58943

The size of the file uploaded in bytes

_hidden

false

Flag that indicates whether the document has been logically deleted or not. Only Admins can see it, and only if it is set to false, non admin users can see the document

author

john@company.com

User account that uploaded the content to BigContent

dateCreated

2018-10-24T07:10:51.709Z

Date on which the version was uploaded. The format we follow is yyyy-MM-ddTHH:mm:ss.SSSZ. The "T" is used to separate date and time, and the Z is the zone designator for the zero UTC offset

lastModifier

john@company.com

The user that made the last modification to the version metadata

dateModified

2018-10-24T07:10:51.709Z

Date on which the version metadata was modified. The format we follow is yyyy-MM-ddTHH:mm:ss.SSSZ. The "T" is used to separate date and time, and the Z is the zone designator for the zero UTC offset

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 for Bad 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.
Example
{
  "span-id" : "7eb38962-2618-85f9-brte-4f15f6729590",
  "message" : "No match found for the Id"
}
Table 76. Error messages
Status code Message Description

401

The Token has expired on…​

Has passed more than an hour since the last create token or refresh token operation

401

Malformed token

The token sent is not valid

401

Problems parsing token

An empty token has been sent

401

The Document-Store header must be set

The header indicating the document store that you want to access, must be set

403

User _ has no rights to access to the DocumentStore _

We dont have access to that document store, or it is misspelled

404

No match found for the Id

The document doesn’t exists in the specified Document Store

500

Internal server error

If it happens consistently, please report it on our forum

Code examples

  • cURL

  • Java

  • Node.js

curl "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/version/g8q9ppihd58art2f9op1sq28gh" \
-X GET \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store"
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/contents/qga8r5hsy9rw5weggf93lopa58/version/g8q9ppihd58art2f9op1sq28gh";
String token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
String documentStore = "invoice_store";

HttpGet get = new HttpGet(url);
get.setHeader("Authorization", token);
get.setHeader("Document-Store", documentStore);

CloseableHttpClient client = HttpClients.createDefault();
CloseableHttpResponse execute = client.execute(get);
HttpEntity entity = execute.getEntity();

String jsonResponse = EntityUtils.toString(entity, StandardCharsets.UTF_8);
var request = require('request');
var token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
var documentStore = "invoice_store";

request.get({
  headers: {
    "Authorization": token,
    "Document-Store": documentStore
  },
  url: "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/version/g8q9ppihd58art2f9op1sq28gh",

}, function(error, response, body){
  console.log(body);
});

Set as Current Version

Sets the the specified version as the current version of the document. The specified version must already exist.

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.

Table 77. HTTP Headers
Name Example Description

Document-Store

invoice_store

Document Store identifier

Authorization

Bearer ha9r6DG4e5AQ84gferAd8EQ…​

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

Access-User

john@company.com
or john
or 211555
or …​

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.

Path

Table 78. Path
Name Value Detail

id

qga8r5hsy9rw5weggf93lopa58

Unique non-sequential auto-generated identifier of the document

Major version

1

A hierarchically major number that defines a version of a content

Minor version

0

A hierarchically minor number along with mayor define a specific version of the content

Responses

Success

Successful responses can be easily identified being always 20x (e.g. 200, 201).

Table 79. Success
Field Example Description

Status code

204

NO CONTENT

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 for Bad 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.
Example
{
  "span-id" : "7eb38962-2618-85f9-brte-4f15f6729590",
  "message" : "No match found for the Id"
}
Table 80. Error messages
Status code Message Description

401

The Token has expired on…​

Has passed more than an hour since the last create token or refresh token operation

401

Malformed token

The token sent is not valid

401

Problems parsing token

An empty token has been sent

401

The Document-Store header must be set

The header indicating the document store that you want to access, must be set

404

No match found for the Id

The document doesn’t exists in the specified Document Store

500

Internal server error

If it happens consistently, please report it on our forum

404

No match found for the major and minor version

Message that shows when the requested version it is not found on the Document Store

Code examples

  • cURL

  • Java

  • Node.js

$ curl "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/current/2/0" \
-X PUT \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store" \
-H "Content-Length: 0"
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.*;
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/contents/qga8r5hsy9rw5weggf93lopa58/current/2/0";
String token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
String documentStore = "invoice_store";

HttpPut put = new HttpPut(url);
put.setHeader("Authorization", token);
put.setHeader("Document-Store", documentStore);

CloseableHttpClient client = HttpClients.createDefault();
CloseableHttpResponse execute = client.execute(put);
HttpEntity entity = execute.getEntity();
var request = require('request');
var token = 'Bearer ha9r6DG4e5AQ84gferAd8EQ...';
var documentStore = 'invoice_store';

request.put({
  headers: {
    'Authorization': token,
    'Document-Store': documentStore
  },
  url: 'https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/current/2/0"
}, function (error, response, body) {
  if (response.statusCode == 204) console.log("OK");
});

Restore version

Restores a hidden content of the Document.

The version of the restored content will be the one it had before its deletion, or a new one specified in the body.

  • Each version can only have one active (not hidden) content. If we try to restore the content with a version that already has an active content, the operation will fail.

  • Only user with admin privileges can perform this operation

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.

Table 81. HTTP Headers
Name Example Description

Document-Store

invoice_store

Document Store identifier

Authorization

Bearer ha9r6DG4e5AQ84gferAd8EQ…​

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

Access-User

john@company.com
or john
or 211555
or …​

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.

Content-Type

application/json

The Content-Type entity header is used to indicate the media type of the resource. In this case, it must be application/json

Path

Table 82. Path
Name Value Detail

id

qga8r5hsy9rw5weggf93lopa58

Unique non-sequential auto-generated identifier of the document

id

g8q9ppihd58art2f9op1sq28gh

Unique non-sequential auto-generated of a content belonging to a document

Body

If we want to keep the version number that it had when it was deleted, we must send a empty json in the body.

{}

If we want to restore it with another number version, we need to send a JSON object with major and minor version fields.

{
  "majorVersion" : 3,
  "minorVersion" : 2
}
Table 83. Body json fields
Field Example Description

Major version

1

A hierarchically major number that defines a version of a content

Minor version

0

A hierarchically minor number along with mayor define a specific version of the content

Responses

Success

Successful responses can be easily identified being always 20x (e.g. 200, 201).

Table 84. Success
Field Example Description

Status code

204

NO CONTENT

Error

Status code Message Description

400

Selected version already has a not hidden content

Each version can only have one active content

401

The Token has expired on…​

Has passed more than an hour since the last create token or refresh token operation

401

Malformed token

The token sent is not valid

401

Problems parsing token

An empty token has been sent

401

The Document-Store header must be set

The header indicating the document store that you want to access, must be set

411

Length Required

We need to send a JSON to select the version. If we want to keep the original, we need to send an empty JSON.

500

Internal server error

If it happens consistently, please report it on our forum

Code examples

  • cURL

  • Java

  • Node.js

curl "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/g8q9ppihd58art2f9op1sq28gh" \
-X PUT \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store" \
-d '{"majorVersion": 2, "minorVersion": 0}'
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.*;
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/contents/qga8r5hsy9rw5weggf93lopa58/g8q9ppihd58art2f9op1sq28gh";
String token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
String documentStore = "invoice_store";

HttpPut put = new HttpPut(url);
put.setHeader("Authorization", token);
put.setHeader("Document-Store", documentStore);

StringEntity json = new StringEntity("{\"majorVersion\": 2, \"minorVersion\": 0}");
json.setContentType(ContentType.APPLICATION_JSON.toString());

put.setEntity(json);

CloseableHttpClient client = HttpClients.createDefault();
CloseableHttpResponse execute = client.execute(put);
HttpEntity entity = execute.getEntity();
var request = require('request');
var token = 'Bearer ha9r6DG4e5AQ84gferAd8EQ...';
var documentStore = 'invoice_store';

request.put({
  headers: {
    'Authorization': token,
    'Document-Store': documentStore
  },
  url: "https://api.everisbigcontent.com/edms/rest/v1/contents/qga8r5hsy9rw5weggf93lopa58/g8q9ppihd58art2f9op1sq28gh"
  json: {"majorVersion": 2, "minorVersion": 0}
}, function (error, response, body) {
  if (response.statusCode == 204) console.log("OK");
});