Metadata
Get Metadata
Retrieves the whole metadata of the specified 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.
Name | Example | Description |
---|---|---|
|
|
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. |
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 |
A JSON containing the metadata of the document |
- JSON object
{
"id" : "qga8r5hsy9rw5weggf93lopa58",
"description" : "Invoice template",
"_hidden" : false,
"author" : "john@company.com",
"dateCreated" : "2018-10-24T07:10:51.709Z",
"lastModifier" : "john@company.com",
"dateModified" : "2018-10-24T07:10:51.709Z",
"currentVersion" : "1.0",
"content" : [
{
"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-26T09:15:55.980Z"
}
],
"categories" : [
{
"_name": "template",
"Type": "invoice",
"date": "2018-10-24T07:10:51.709Z",
"boolean": true
}
],
"documentStore" : "invoice_store"
}
Name |
Value |
Detail |
id |
|
A unique ID auto generated that identifies the document |
description |
|
A description provided by the author of the document at the creation of it |
_hidden |
|
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 |
|
The user that created the document to BigContent |
dateCreated |
|
Date on which the document 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 |
|
The user that made the last modification to the document metadata |
dateModified |
|
Date on which the document 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 |
currentVersion |
|
Indicates which one of the versions should be downloaded when downloading current version |
content |
|
Array with metadata of the associated files |
categories |
|
List with all the categories assigned to this document To edit them, use add, or remove categories |
documentStore |
|
The document store in which the document is stored |
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" : "7eb38962-2618-85f9-brte-4f15f6729590",
"message" : "No match found for the Id"
}
Status code |
Message |
Description include::partial$tables/error-codes.adoc[ tags= 401-token-expired; 401-token-invalid; 401-token-empty; 401-document-store; 403-document-store; 404-document-id-not-found; 500 ] |
Code examples
curl "https://api.everisbigcontent.com/edms/rest/v1/metadata/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/metadata/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();
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/metadata/qga8r5hsy9rw5weggf93lopa58",
}, function(error, response, body){
console.log(body);
});
Update Metadata
Updates the metadata of the specified document.
This operation is designed to modify current values (like description
), or add or modify categories
, but never delete them.
We ignore null values, as a safety measure, so nothing can be deleted by omission.
That makes integration easier, as it only needs to be sent the value we want to modify.
For example, if we send the JSON without categories, it will not delete them. If it has a new category, it will add it. And if it contains an already present category, it will update its values.
When setting a date property, keep in mind that we accept both timestamps and date formatted strings. The timestamp follows Unix time conventions, representing the time in milliseconds since January 1st, 1970 UTC.
In case of using a string, it must adhere to the following format Make sure you set the correct timezone during creation or update, that is the one where the documents are created or consulted. Otherwise users may experience troubles locating documents. |
For deleting a category
, we have to explicitly do it using delete categories.
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 |
|
|
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. |
|
|
The Content-Type entity header is used to indicate the media type of the resource.
In this case, it must be |
Path
Name | Value | Detail |
---|---|---|
id |
|
Unique non-sequential auto-generated identifier of the document |
Body
As indicated by headers, the body of the http request must be a JSON.
- Metadata Example
{
"description" : "Calendar of february",
"categories" : [
{
"_name": "calendar",
"Month": "february",
"Year": "1998"
}
]
}
Responses
Success
Successful responses can be easily identified being always 20x (e.g. 200, 201).
Field | Example | Description |
---|---|---|
Status code |
|
|
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" : "7eb38962-2618-85f9-brte-4f15f6729590",
"message" : "No match found for the Id"
}
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 |
|
The encoding used to send the object was not |
400 |
|
The category name is null, have blank value or was not sent |
400 |
|
The category definition with the specified name, does not have that property |
400 |
|
The category property type does not match the one we are sending.
For example, it expects a |
400 |
|
We are not sending the value for a mandatory property |
400 |
|
No category has been found to match the |
400 |
|
The category you are trying to assign is already assigned If you want to modify it, you must delete and reassign it, or use update metadata |
400 |
|
The category property has a valid set of values, and the one we are sending is not valid |
400 |
|
The category property has a valid set of values, and the one we are sending is not valid |
401 |
|
Has passed more than an hour since the last create token or refresh token operation |
401 |
|
The token sent is not valid |
401 |
|
An empty token has been sent |
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 |
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/metadata/qga8r5hsy9rw5weggf93lopa58" \
-X PUT \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store" \
-H 'Content-Type: application/json' \
-d '{"description" : "Calendar of february"}'
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/metadata/qga8r5hsy9rw5weggf93lopa58";
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("{\"description\":\"Calendar of february\"}");
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/metadata/qga8r5hsy9rw5weggf93lopa58",
json : {"description" : "Calendar of february"}
}, function(error, response, body){
console.log(body);
});
Get Categories
Retrieves the categories of the specified 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.
Name | Example | Description |
---|---|---|
|
|
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. |
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 |
List of JSONs |
A list of JSONs containing the categories of the document |
- JSON response
{
"_name": "template",
"Type": "invoice",
"date": "2018-10-24T07:10:51.709Z",
"boolean": true
}
Name | Value | Detail |
---|---|---|
_name |
|
The name of the category. It is used as the ID of the category definition |
Other fields |
|
The name of the fields are defined in the category definition. The values of the fields are the ones defined when the category was assigned to this document |
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" : "7eb38962-2618-85f9-brte-4f15f6729590",
"message" : "No match found for the Id"
}
Status code | Message | Description |
---|---|---|
401 |
|
Has passed more than an hour since the last create token or refresh token operation |
401 |
|
The token sent is not valid |
401 |
|
An empty token has been sent |
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 |
500 |
|
If it happens consistently, please report it on our forum |
Code examples
curl "https://api.everisbigcontent.com/edms/rest/v1/metadata/qga8r5hsy9rw5weggf93lopa58/categories" \
-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/metadata/qga8r5hsy9rw5weggf93lopa58/categories";
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);
System.out.println(jsonResponse);
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/metadata/qga8r5hsy9rw5weggf93lopa58/categories",
}, function(error, response, body){
console.log(body);
});
Add Category
Adds a category to the specified document.
The category being added must match with one of the existing category definitions for that document store. That means that a category definition must exist with the same name. It also must comply with the category definition restrictions if there are any.
When setting a date property, keep in mind that we accept both timestamps and date formatted strings. The timestamp follows Unix time conventions, representing the time in milliseconds since January 1st, 1970 UTC.
In case of using a string, it must adhere to the following format Make sure you set the correct timezone during creation or update, that is the one where the documents are created or consulted. Otherwise users may experience troubles locating documents. |
It does not update the values of the category, if adding an already present category, an error is throw. To modify a category already assigned you must delete and add it, or use Update Metadata. |
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 |
|
|
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. |
|
|
The Content-Type entity header is used to indicate the media type of the resource.
In this case, it must be |
Path
Name | Value | Detail |
---|---|---|
id |
|
Unique non-sequential auto-generated identifier of the document |
Body
As indicated by headers, the body of the http request must be a JSON.
- Category Example
{
"_name": "template",
"Type": "invoice",
"date": "2018-10-24T07:10:51.709Z",
"boolean": true
}
Responses
Success
Successful responses can be easily identified being always 20x (e.g. 200, 201).
Field | Example | Description |
---|---|---|
Status code |
|
|
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" : "7eb38962-2618-85f9-brte-4f15f6729590",
"message" : "No match found for the Id"
}
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 |
|
The encoding used to send the object was not |
400 |
|
The category name is null, have blank value or was not sent |
400 |
|
The category definition with the specified name, does not have that property |
400 |
|
The category property type does not match the one we are sending.
For example, it expects a |
400 |
|
We are not sending the value for a mandatory property |
400 |
|
No category has been found to match the |
400 |
|
The category you are trying to assign is already assigned If you want to modify it, you must delete and reassign it, or use update metadata |
400 |
|
The category property has a valid set of values, and the one we are sending is not valid |
400 |
|
The category property has a valid set of values, and the one we are sending is not valid |
401 |
|
Has passed more than an hour since the last create token or refresh token operation |
401 |
|
The token sent is not valid |
401 |
|
An empty token has been sent |
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 |
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/metadata/qga8r5hsy9rw5weggf93lopa58/categories" \
-X POST \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store" \
-H 'Content-Type:application/json' \
-d '{"_name" : "calendar", "Month": "february", "Year": "1998"}'
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 category = "{\"_name\" : \"calendar\", \"Month\": \"february\", \"Year\": \"1998\"}";
String url = "https://api.everisbigcontent.com/edms/rest/v1/metadata/qga8r5hsy9rw5weggf93lopa58/categories";
String token = ha9r6DG4e5AQ84gferAd8EQ...;
String documentStore = "invoice_store";
HttpPost post = new HttpPost(url);
post.setHeader("Authorization", "Bearer " + token);
post.setHeader("Document-Store", documentStore);
StringEntity json = new StringEntity(category);
json.setContentType(ContentType.APPLICATION_JSON.toString());
post.setEntity(json);
CloseableHttpClient client = HttpClients.createDefault();
CloseableHttpResponse execute = client.execute(post);
var request = require('request');
var token = "ha9r6DG4e5AQ84gferAd8EQ...";
var documentStore = "invoice_store";
request.post({
headers: {
"Authorization": "Bearer " + token,
"Document-Store": documentStore,
'Content-Type': 'application/json',
},
url: "https://api.everisbigcontent.com/edms/rest/v1/metadata/qga8r5hsy9rw5weggf93lopa58/categories",
json: {
"_name" : "calendar",
"Month": "february",
"Year": "1998"
}
}, function (error, response, body) {
});
Delete Categories
Deletes a category from the specified 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.
Name | Example | Description |
---|---|---|
|
|
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. |
Responses
Success
Successful responses can be easily identified being always 20x (e.g. 200, 201).
Field | Example | Description |
---|---|---|
Status code |
|
|
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" : "7eb38962-2618-85f9-brte-4f15f6729590",
"message" : "No match found for the Id"
}
Status code | Message | Description |
---|---|---|
401 |
|
Has passed more than an hour since the last create token or refresh token operation |
401 |
|
The token sent is not valid |
401 |
|
An empty token has been sent |
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 |
500 |
|
If it happens consistently, please report it on our forum |
Code examples
curl "https://api.everisbigcontent.com/edms/rest/v1/metadata/qga8r5hsy9rw5weggf93lopa58/categories/calendar" \
-X DELETE \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store"
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpDelete;
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/metadata/qga8r5hsy9rw5weggf93lopa58/categories/calendar;
String token = "ha9r6DG4e5AQ84gferAd8EQ...";
String documentStore = "invoice_store";
HttpDelete delete = new HttpDelete(url);
delete.setHeader("Authorization", "Bearer " + token);
delete.setHeader("Document-Store", documentStore);
CloseableHttpClient client = HttpClients.createDefault();
CloseableHttpResponse execute = client.execute(delete);
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/metadata/qga8r5hsy9rw5weggf93lopa58/categories/calendar"
}, function (error, response, body) {
});