Category Definitions
Get Category Definition
Retrieves a category definition by its name.
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 object containing the category definition |
- JSON object
{
"id": "fdhf6tr15yt61gfdh61t86jtea",
"author" : "john@company.com",
"dateCreated" : "2018-10-24T07:10:51.709Z",
"lastModifier" : "john@company.com",
"dateModified" : "2018-10-24T07:10:51.709Z",
"name": "policyDefinition",
"metadata": [
{
"name": "policyNumber",
"type": "string",
"restrictions": {
"mandatory": true
}
},
{
"name": "date",
"type": "date",
"restrictions": {
"mandatory": false
}
},
{
"name": "boolean",
"type": "bool",
"restrictions": {
"mandatory": false
}
},
{
"name": "Type",
"type": "string",
"restrictions": {
"mandatory": true,
"values": [
"alpha",
"beta",
"omega"
]
}
}
],
"documentStore": "invoice_store"
}
Name | Value | Detail |
---|---|---|
id |
|
A unique ID auto generated that identifies the category definition |
author |
|
User account that created de definition |
dateCreated |
|
Date on which the definition was created. 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 definition |
dateModified |
|
Date on which the definition 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 |
name |
|
The name of the category definition, used as a parameter when searching for a specific category definition |
metadata |
The different fields (or properties) and value types that a category with this definition can have. It also specifies some restrictions, such as if it is mandatory, or the set of possible values |
|
documentStore |
|
The documentStore in which the document is stored |
The name of the category definition must contain only alphanumeric characters, using underscores to separate the words. |
Name | Value | Detail |
---|---|---|
name |
|
The name of the metadata definition |
type |
|
It specifies the type of data of this metadata. In the case of the date, 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 |
restrictions |
Different rules that this metadata in particular must follow |
The name of the metadata definition must contain only alphanumeric characters, using underscores to separate the words. |
Name | Value | Detail |
---|---|---|
mandatory |
|
If |
values |
Any |
Those are the only values that this metadata can take when assigned to a document. They must comply with the type set in the definition |
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 |
404 |
|
It doesn’t exist a Category Definition with the specified name that applies for the specified Document Store. |
500 |
|
If it happens consistently, please report it on our forum |
Code examples
curl "https://api.everisbigcontent.com/edms/metadata/v1/categoryDefinitions/policyDefinition" \
-X GET \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store"
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
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/metadata/v1/categoryDefinitions/policyDefinition";
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/metadata/v1/categoryDefinitions/policyDefinition'
}, function (error, response, body) {
console.log(body);
});
Get All Category Definitions
Retrieves all category definitions for the specified document store.
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 |
The list contains all the category definitions that are applicable to the specified document store |
- JSON object
{
"id": "fdhf6tr15yt61gfdh61t86jtea",
"author" : "john@company.com",
"dateCreated" : "2018-10-24T07:10:51.709Z",
"lastModifier" : "john@company.com",
"dateModified" : "2018-10-24T07:10:51.709Z",
"name": "policyDefinition",
"metadata": [
{
"name": "policyNumber",
"type": "string",
"restrictions": {
"mandatory": true
}
},
{
"name": "date",
"type": "date",
"restrictions": {
"mandatory": false
}
},
{
"name": "boolean",
"type": "bool",
"restrictions": {
"mandatory": false
}
},
{
"name": "Type",
"type": "string",
"restrictions": {
"mandatory": true,
"values": [
"alpha",
"beta",
"omega"
]
}
}
],
"documentStore": "invoice_store"
}
Name | Value | Detail |
---|---|---|
id |
|
A unique ID auto generated that identifies the category definition |
author |
|
User account that created de definition |
dateCreated |
|
Date on which the definition was created. 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 definition |
dateModified |
|
Date on which the definition 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 |
name |
|
The name of the category definition, used as a parameter when searching for a specific category definition |
metadata |
The different fields (or properties) and value types that a category with this definition can have. It also specifies some restrictions, such as if it is mandatory, or the set of possible values |
|
documentStore |
|
The documentStore in which the document is stored |
The name of the category definition must contain only alphanumeric characters, using underscores to separate the words. |
Name | Value | Detail |
---|---|---|
name |
|
The name of the metadata definition |
type |
|
It specifies the type of data of this metadata. In the case of the date, 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 |
restrictions |
Different rules that this metadata in particular must follow |
The name of the metadata definition must contain only alphanumeric characters, using underscores to separate the words. |
Name | Value | Detail |
---|---|---|
mandatory |
|
If |
values |
Any |
Those are the only values that this metadata can take when assigned to a document. They must comply with the type set in the definition |
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 |
500 |
|
If it happens consistently, please report it on our forum |
Code examples
curl "https://api.everisbigcontent.com/edms/metadata/v1/categoryDefinitions" \
-X GET \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store"
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
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/metadata/v1/categoryDefinitions/";
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/metadata/v1/categoryDefinitions/'
}, function (error, response, body) {
console.log(body);
});
Create category definition
Creates a new category definition.
Category definitions are the templates for the categories assigned to the documents.
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. |
Body
As indicated by headers, the body of the http request must be a JSON.
- Category Definition Example
{
"id": "fdhf6tr15yt61gfdh61t86jtea",
"author" : "john@company.com",
"dateCreated" : "2018-10-24T07:10:51.709Z",
"lastModifier" : "john@company.com",
"dateModified" : "2018-10-24T07:10:51.709Z",
"name": "policyDefinition",
"metadata": [
{
"name": "policyNumber",
"type": "string",
"restrictions": {
"mandatory": true
}
},
{
"name": "date",
"type": "date",
"restrictions": {
"mandatory": false
}
},
{
"name": "boolean",
"type": "bool",
"restrictions": {
"mandatory": false
}
},
{
"name": "Type",
"type": "string",
"restrictions": {
"mandatory": true,
"values": [
"alpha",
"beta",
"omega"
]
}
}
],
"documentStore": "invoice_store"
}
The name of the category and metadata definition must contain only alphanumeric characters, using underscores to separate the words. |
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 encoding used to send the object was not |
400 |
|
Only alphanumeric characters and underscore are allowed |
400 |
|
The name is a mandatory field |
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 |
500 |
|
If it happens consistently, please report it on our forum |
Code examples
curl -i -X POST "https://api.everisbigcontent.com/edms/metadata/v1/categoryDefinitions" \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store" \
-H 'Content-Type: application/json' \
-d '{ "name": "policyDefinition", "metadata": [{ "name": "policyNumber", "type": "string", "restrictions": { "mandatory": true } }] }'
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/metadata/v1/categoryDefinitions/";
String token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
String documentStore = "invoice_store";
String categoryDef = "{ "name": "policyDefinition", "metadata": [{ "name": "policyNumber", "type": "string", "restrictions": { "mandatory": true } }] }";
HttpPost post = new HttpPost(url);
post.setHeader("Authorization", "Bearer " + accessToken);
post.setHeader("Document-Store", documentStore);
StringEntity json = new StringEntity(categoryDef);
json.setContentType(ContentType.APPLICATION_JSON.toString());
post.setEntity(json);
CloseableHttpResponse execute = HttpClients.createDefault().execute(post);
HttpEntity entity = execute.getEntity();
String jsonResponse = EntityUtils.toString(entity, StandardCharsets.UTF_8);
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/metadata/v1/categoryDefinitions/",
json: { "name": "policyDefinition", "metadata": [{ "name": "policyNumber", "type": "string", "restrictions": { "mandatory": true } }] }
}, function (error, response, body) {
});
Update category definition
Updates an existing category definition.
It is possible to add or modify current metadata definitions, but not to remove them. For doing so, use Delete metadata definition. |
Once a category definition is used, we must take care not to leave documents in an inconsistent state. Safe changes: Add a not mandatory metadata. Modify the description. |
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. |
Path
Name | Value | Detail |
---|---|---|
category_name |
|
The name of the category definition, which is used as a unique identifier |
Body
As indicated by headers, the body of the http request must be a JSON.
- Category Definition Example
{
"id": "fdhf6tr15yt61gfdh61t86jtea",
"author" : "john@company.com",
"dateCreated" : "2018-10-24T07:10:51.709Z",
"lastModifier" : "john@company.com",
"dateModified" : "2018-10-24T07:10:51.709Z",
"name": "policyDefinition",
"metadata": [
{
"name": "policyNumber",
"type": "string",
"restrictions": {
"mandatory": true
}
},
{
"name": "date",
"type": "date",
"restrictions": {
"mandatory": false
}
},
{
"name": "boolean",
"type": "bool",
"restrictions": {
"mandatory": false
}
},
{
"name": "Type",
"type": "string",
"restrictions": {
"mandatory": true,
"values": [
"alpha",
"beta",
"omega"
]
}
}
],
"documentStore": "invoice_store"
}
The name of the category and metadata definition must contain only alphanumeric characters, using underscores to separate the words. |
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 encoding used to send the object was not |
400 |
|
Only alphanumeric characters and underscore are allowed |
400 |
|
The name is a mandatory field |
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 |
404 |
|
It doesn’t exist a Category Definition with the specified name that applies for the specified Document Store. |
500 |
|
If it happens consistently, please report it on our forum |
Code examples
curl -i -X PUT "https://api.everisbigcontent.com/edms/metadata/v1/categoryDefinitions/policyDefinition" \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store" \
-H 'Content-Type: application/json' \
-d '{ "name": "policyDefinition", "metadata": [{ "name": "policyNumber", "type": "string", "restrictions": { "mandatory": true } }] }'
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/metadata/v1/categoryDefinitions/policyDefinition";
String token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
String documentStore = "invoice_store";
String categoryDef = "{ "name": "policyDefinition", "metadata": [{ "name": "policyNumber", "type": "string", "restrictions": { "mandatory": true } }] }";
HttpPut put = new HttpPut(url);
put.setHeader("Authorization", "Bearer " + accessToken);
put.setHeader("Document-Store", documentStore);
StringEntity json = new StringEntity(categoryDef);
json.setContentType(ContentType.APPLICATION_JSON.toString());
put.setEntity(json);
CloseableHttpResponse execute = HttpClients.createDefault().execute(post);
HttpEntity entity = execute.getEntity();
String jsonResponse = EntityUtils.toString(entity, StandardCharsets.UTF_8);
var request = require('request');
var token = "ha9r6DG4e5AQ84gferAd8EQ...";
var documentStore = "invoice_store";
request.put({
headers: {
"Authorization": "Bearer " + token,
"Document-Store": documentStore,
'Content-Type': 'application/json',
},
url: "https://api.everisbigcontent.com/edms/metadata/v1/categoryDefinitions/policyDefinition",
json: { "name": "policyDefinition", "metadata": [{ "name": "policyNumber", "type": "string", "restrictions": { "mandatory": true } }] }
}, function (error, response, body) {
});
Delete metadata definition
Deletes a metadata definition from a category definition.
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 |
404 |
|
It doesn’t exist a Category Definition with the specified name that applies for the specified Document Store. |
500 |
|
If it happens consistently, please report it on our forum |
Code examples
curl -i -X DELETE "https://api.everisbigcontent.com/edms/metadata/v1/categoryDefinitions/policyDefinition/policyNumber" \
-H "Authorization: Bearer ha9r6DG4e5AQ84gferAd8EQ..." \
-H "Document-Store: invoice_store"
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/metadata/v1/categoryDefinitions/policyDefinition/policyNumber";
String token = "Bearer ha9r6DG4e5AQ84gferAd8EQ...";
String documentStore = "invoice_store";
HttpDelete delete = new HttpDelete(url);
delete.setHeader("Authorization", "Bearer " + accessToken);
delete.setHeader("Document-Store", documentStore);
CloseableHttpResponse execute = HttpClients.createDefault().execute(post);
HttpEntity entity = execute.getEntity();
String jsonResponse = EntityUtils.toString(entity, StandardCharsets.UTF_8);
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/metadata/v1/categoryDefinitions/policyDefinition/policyNumber"
}, function (error, response, body) {
});