Digital Evidence Management API (1.0.0-SNAPSHOT)
Download OpenAPI specification:Download
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.
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 listAudit 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/jsonrequired
type required | string |
required | object |
required | object |
ttl required | integer <int32> >= 2 |
relations | Array of strings |
auditLevel | string |
Responses
Request samples
- Payload
{- "type": "string",
- "metadata": {
- "property1": { },
- "property2": { }
}, - "coreData": {
- "property1": { },
- "property2": { }
}, - "ttl": 2,
- "relations": [
- "string"
], - "auditLevel": "string"
}
Response samples
- 201
- 400
- 401
- 403
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "metadata": {
- "property1": { },
- "property2": { }
}, - "systemMetadata": {
- "type": "GDPR",
- "expiryDate": "2019-08-24T14:15:22Z",
- "createdDate": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "auditLevel": "QUALIFIED"
}, - "coreData": {
- "property1": { },
- "property2": { }
}, - "timestampData": {
- "property1": { },
- "property2": { }
}, - "relations": [
- {
- "relationID": "string",
- "type": "GDPR",
- "_links": {
- "property1": {
- "href": "string",
- "hreflang": "string",
- "title": "string",
- "type": "string",
- "deprecation": "string",
- "profile": "string",
- "name": "string",
- "templated": true
}, - "property2": {
- "href": "string",
- "hreflang": "string",
- "title": "string",
- "type": "string",
- "deprecation": "string",
- "profile": "string",
- "name": "string",
- "templated": true
}
}
}
], - "_links": {
- "property1": {
- "href": "string",
- "hreflang": "string",
- "title": "string",
- "type": "string",
- "deprecation": "string",
- "profile": "string",
- "name": "string",
- "templated": true
}, - "property2": {
- "href": "string",
- "hreflang": "string",
- "title": "string",
- "type": "string",
- "deprecation": "string",
- "profile": "string",
- "name": "string",
- "templated": true
}
}
}
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/jsonrequired
required | object (QueryRequestBody) An object containing up to three lists of |
ttl required | integer <int32> >= 2 |
Responses
Request samples
- Payload
- Java
- curl
{- "query": {
- "and": [
- {
- "field": "string",
- "operator": "string",
- "value": { }
}
], - "or": [
- {
- "field": "string",
- "operator": "string",
- "value": { }
}
], - "not": [
- {
- "field": "string",
- "operator": "string",
- "value": { }
}
]
}, - "ttl": 2
}
Response samples
- 200
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
- Payload
{- "and": [
- {
- "field": "string",
- "operator": "string",
- "value": { }
}
], - "or": [
- {
- "field": "string",
- "operator": "string",
- "value": { }
}
], - "not": [
- {
- "field": "string",
- "operator": "string",
- "value": { }
}
]
}
Response samples
- 200
- 400
- 401
- 403
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": {
- "records": [
- {
- "id": "a1f786ad-a6ba-41b6-8902-e3baee511077",
- "metadata": {
- "system": {
- "expiryDate": "2021-08-13T00:00:00.000+00:00",
- "createdDate": "2021-08-12T00:00:00.000+00:00",
- "createdBy": "dev-convincing-seed-432",
- "createdDateTime": "2021-08-12T09:55:48.000+00:00",
- "type": "SIGNATURE",
- "timestamp": "MoI..."
}, - "custom": {
- "customField1": "abc",
- "customField2": "abc",
- "customField3": "abc"
}
}, - "relations": [ ],
- "_links": {
}
}, - {
- "id": "faf43e96-b4ac-4a52-be5b-8bfd8fb7cbd3",
- "metadata": {
- "system": {
- "expiryDate": "2021-08-13T00:00:00.000+00:00",
- "createdDate": "2021-08-12T00:00:00.000+00:00",
- "createdBy": "dev-convincing-seed-432",
- "createdDateTime": "2021-08-12T09:55:50.000+00:00",
- "type": "SIGNATURE",
- "timestamp": "MoI..."
}, - "custom": {
- "customField1": "abc",
- "customField2": "abc",
- "customField3": "abc"
}
}, - "relations": [ ],
- "_links": {
}
}, - {
- "id": "82400e44-6db1-479d-8a9c-f62b97917f59",
- "metadata": {
- "system": {
- "expiryDate": "2021-08-13T00:00:00.000+00:00",
- "createdDate": "2021-08-12T00:00:00.000+00:00",
- "createdBy": "dev-convincing-seed-432",
- "createdDateTime": "2021-08-12T09:55:51.000+00:00",
- "type": "SIGNATURE",
- "timestamp": "MoI..."
}, - "custom": {
- "customField1": "abc",
- "customField2": "abc",
- "customField3": "abc"
}
}, - "relations": [ ],
- "_links": {
}
}
]
}, - "_links": {
}, - "page": {
- "size": 10,
- "totalElements": 3,
- "totalPages": 1,
- "number": 0
}
}
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
- Java
- curl
// ... // 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
- 200
- 400
- 401
- 403
- 404
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "metadata": {
- "property1": { },
- "property2": { }
}, - "systemMetadata": {
- "type": "GDPR",
- "expiryDate": "2019-08-24T14:15:22Z",
- "createdDate": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "auditLevel": "QUALIFIED"
}, - "coreData": {
- "property1": { },
- "property2": { }
}, - "timestampData": {
- "property1": { },
- "property2": { }
}, - "relations": [
- {
- "relationID": "string",
- "type": "GDPR",
- "_links": {
- "property1": {
- "href": "string",
- "hreflang": "string",
- "title": "string",
- "type": "string",
- "deprecation": "string",
- "profile": "string",
- "name": "string",
- "templated": true
}, - "property2": {
- "href": "string",
- "hreflang": "string",
- "title": "string",
- "type": "string",
- "deprecation": "string",
- "profile": "string",
- "name": "string",
- "templated": true
}
}
}
], - "_links": {
- "property1": {
- "href": "string",
- "hreflang": "string",
- "title": "string",
- "type": "string",
- "deprecation": "string",
- "profile": "string",
- "name": "string",
- "templated": true
}, - "property2": {
- "href": "string",
- "hreflang": "string",
- "title": "string",
- "type": "string",
- "deprecation": "string",
- "profile": "string",
- "name": "string",
- "templated": true
}
}
}
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/jsonrequired
ttl required | integer <int32> |
Responses
Request samples
- Payload
{- "ttl": 0
}
Response samples
- 204
- 400
- 401
- 403
- 404
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "metadata": {
- "property1": { },
- "property2": { }
}, - "systemMetadata": {
- "type": "GDPR",
- "expiryDate": "2019-08-24T14:15:22Z",
- "createdDate": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "auditLevel": "QUALIFIED"
}, - "relations": [
- {
- "relationID": "string",
- "type": "GDPR",
- "_links": {
- "property1": {
- "href": "string",
- "hreflang": "string",
- "title": "string",
- "type": "string",
- "deprecation": "string",
- "profile": "string",
- "name": "string",
- "templated": true
}, - "property2": {
- "href": "string",
- "hreflang": "string",
- "title": "string",
- "type": "string",
- "deprecation": "string",
- "profile": "string",
- "name": "string",
- "templated": true
}
}
}
], - "_links": {
- "property1": {
- "href": "string",
- "hreflang": "string",
- "title": "string",
- "type": "string",
- "deprecation": "string",
- "profile": "string",
- "name": "string",
- "templated": true
}, - "property2": {
- "href": "string",
- "hreflang": "string",
- "title": "string",
- "type": "string",
- "deprecation": "string",
- "profile": "string",
- "name": "string",
- "templated": true
}
}
}
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
- 200
Example output of report endpoint. Long string of text representing the base64 encoded pdf document.
JVBERi0xLjMKJ...