Skip to main content

Digital Evidence Management API (1.0.0-SNAPSHOT)

Download OpenAPI specification:Download

Introduction

Signicat's Digital Evidence Management API offers a simple way to capture audit trail data. This can include information on authentications, payment transactions or acceptance of GDPR consent messages.

The Digital Evidence Management API is a RESTful API that uses the OAuth 2.0 protocol for authorisation. All request and response bodies are formatted in JSON.

records

Create a new record

Creates a new record. There are four required fields: "type", "metadata", "coreData", "TTL" and two optional fields: "relations" and "auditLevel".

Record Type

You are required to supply a record type in the 'type' parameter when posting a new record.These are the available types:
Type name Description (suggested use)
GDPR Can be used for documentation of GDPR compliance.
TRANSACTION Can be used for documenting financial transactions.
LOG_IN Can be used for documenting users logging in to a system.
SIGNATURE Can be used for documenting digital signatures.
OTHER Can be used for everything else.

Metadata

Can contain any amount of data which will then be searchable in future queries.

Core Data

Can contain any amount of data which will then be timestamped.

TTL

Time to Live as denoted in amount of days (Int).

Relations

Optional field. List of the IDs (String) of the related records. Default: Empty list

Audit Level

Optional field. Decides which level of timestamping and verification will be applied to the record.
SIMPLE Uses hashing to verify data.
ADVANCED Uses TSA to timestamp and verify.
QUALIFIED USES QTSA to timestamp and verify. Default if value is not set explicitly

header Parameters
Signicat-Usage-Context
string
Request Body schema: application/json
required
type
required
string
required
object
required
object
ttl
required
integer <int32> >= 2
relations
Array of strings
auditLevel
string

Responses

Request samples

Content type
application/json
{
  • "type": "string",
  • "metadata": {
    },
  • "coreData": {
    },
  • "ttl": 2,
  • "relations": [
    ],
  • "auditLevel": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "metadata": {
    },
  • "systemMetadata": {
    },
  • "coreData": {
    },
  • "timestampData": {
    },
  • "relations": [
    ],
  • "_links": {
    }
}

Update multiple selected records

Updates the Time to Live (TTL) of selected records by a defined query.
The query is built on the MongoDB Query Language (MQL), but it is database-agnostic.

Request Body schema: application/json
required
required
object (QueryRequestBody)

An object containing up to three lists of QueryCondition objects. Each list represents a logic operator used to bind the QueryCondition objects into a statement.
The 'and' list executes the QueryCondition objects with a logical AND operator, all conditions must be met.
The 'or' list executes the QueryCondition objects with a logical OR operator, at least one of the conditions must be met.
The 'not' list is currently not in use, but it will in the future execute the QueryCondition objects with a logical NOR operator.

ttl
required
integer <int32> >= 2

Responses

Request samples

Content type
application/json
{
  • "query": {
    },
  • "ttl": 2
}

Response samples

Content type
application/json
5

Query a collection for records matching specified parameters

Queries the database to return a pageable list of records without coreData.
If no body is included, the endpoint will return pages of all records.
The size and page number as well as sorting and ordering of the returned page is decided by the parameters page, size and sort.

Request Body


The query is built from the request body. The request body is an object containing up to two lists of QueryCondition objects.
If no lists are provided, the query will return every record in the collection.

List name Description
and Combines the QueryConditions with the logical AND operator. All of the QueryConditions need to return true.
or Combines the QueryConditions with the logical OR operator. Only one of the QueryConditions needs to return true.

Query Condition


A query condition consists of three parts: field, operator and value.

Field


The field parameter denotes which field in the database to apply the query condition to.
Replace '*' with the sub-field you wish to query. For example "metadata.firstName" or "systemMetadata.createdDateTime"
These are the allowed fields:
Field Description
metadata Metadata added by the user.
systemMetadata Metadata added by DEM.
relations Any other record relations added by the user.

Operator


The operator specifies how the condition uses the value to search for records.
These are the available query operators:

Query Operation Description
eq Checks if the field's value matches the input value exactly.
ne Checks if the field's value does not match the input value.
gt Checks if the field's value is greater than the input value. Works best with numeric values.
gte Checks if the field's value is greater than or equal to the input value. Works best with numeric values.
lt Checks if the field's value is less than the input value. Works best with numeric values.
lte Checks if the field's value is less than or equal to the input value. Works best with numeric values.
regex Checks if the field's value contains the input value using regex. Works best with String values.
in Checks if the field's value matches any of the values in the inputted array.
nin Checks if the field's value does not match any of the values in the inputted array.

Value


The value parameter denotes what value the query condition should use. For example: with the EQUAL operator, the value is what the field should be equal to.

query Parameters
page
integer >= 0
Default: 0

Zero-based page index (0..N)

size
integer >= 1
Default: 10

The size of the page to be returned

sort
Array of strings
Default: "systemMetadata.createdDateTime,DESC"

Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

Request Body schema: application/json
Array of objects (QueryCondition)
Array of objects (QueryCondition)
Array of objects (QueryCondition)

Responses

Request samples

Content type
application/json
{
  • "and": [
    ],
  • "or": [
    ],
  • "not": [
    ]
}

Response samples

Content type
application/json

The response will contain a list of matching records under the "_embedded" field, with page information under the "page" field and page links under the "_links" field.

{
  • "_embedded": {
    },
  • "page": {
    }
}

Get record by ID

Retrieves a specific record by its ID. The given ID must conform to the UUID/GUID standard.
For example: 123e4567-e89b-12d3-a456-556642440000
Returns everything included in the record entity.

path Parameters
id
required
string
Example: 123e4567-e89b-12d3-a456-556642440000

Unique identifier for a record.

Responses

Request samples

// ...
// Variables, acquired beforehand
String id = "<your-recordId>";
String bearerToken = "Bearer <your-bearer-token>";

// Set-up connection
URL url = new URL("https://api.signicat.com/dem/records/" + id);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", bearerToken);

BufferedReader responseBufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream()));

// Iterate through and print out response (not required)
String line = responseBufferedReader.readLine();
while (line != null) {
   System.out.println(line);
   line = responseBufferedReader.readLine();
}
// ...

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "metadata": {
    },
  • "systemMetadata": {
    },
  • "coreData": {
    },
  • "timestampData": {
    },
  • "relations": [
    ],
  • "_links": {
    }
}

Update the expiry of a given record

Specifies when the record will automatically be deleted from the database. Takes an amount of days as a positive integer of 2 or higher and updates the expiry date with the new value.

path Parameters
id
required
string
Example: 123e4567-e89b-12d3-a456-556642440000

Unique identifier for a record.

Request Body schema: application/json
required
ttl
required
integer <int32>

Responses

Request samples

Content type
application/json
{
  • "ttl": 0
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "metadata": {
    },
  • "systemMetadata": {
    },
  • "relations": [
    ],
  • "_links": {
    }
}

reports

Retrieves a generated PDF report for a record

Takes a Record ID as a parameter. It retrieves the record and generates a PDF report for the record.

path Parameters
id
required
string
Example: 123e4567-e89b-12d3-a456-556642440000

Unique identifier for a record.

Responses

Response samples

Content type
application/pdf

Example output of report endpoint. Long string of text representing the base64 encoded pdf document.

JVBERi0xLjMKJ...

info

Get statistics for records

Retrieves statistics on records stored in DEM.

Responses

Response samples

Content type
application/json
{
  • "collectionSize": "string",
  • "avgRecordSize": "string",
  • "totalRecords": 0,
  • "totalRecordsByType": {
    }
}

Get all fields from customerMeta from all records

Aggregates all of the customer's records to return a list of all unique keys from the customerMeta field.

path Parameters
type
required
string

Optional parameter that narrows the result down based on the type of record.

Responses

Get all fields from customerMeta from all records

Aggregates all of the customer's records to return a list of all unique keys from the customerMeta field.

Responses

ping-controller

signicat

Responses

Response samples

Content type
application/json
"string"