Evidence operations



Introduction

After having registered a "Case File" and an "Evidence Group", you can now create an "Evidence".


Operations

Create an "Evidence"

HTTP Request

POST /api/v1/private/case-files/{caseFileId}/evidence-groups/{evidenceGroupId}/evidences

In this request, there is one primary resource case-files and a secondary one evidence-groups. There are also 2 resource identifiers that you need to replace with real values of your Legal App platform account: caseFileId and evidenceGroupId.

With the following information provided as JSON:

{
        "evidenceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "hash": "string",
        "createdBy": "example owner",
        "title": "example title",
        "capturedAt": "2023-10-24T21:06:26.092Z",
        "custodyType": "INTERNAL",
        "fileName": "example.png",
        "testimony": {
          "additionalProp1": {
            "required": true,
            "providers": [
              "string"
            ]
          },
          "additionalProp2": {
            "required": true,
            "providers": [
              "string"
            ]
          },
          "additionalProp3": {
            "required": true,
            "providers": [
              "string"
            ]
          }
        },
        "metadata": {
          "additionalProp1": "string",
          "additionalProp2": "string",
          "additionalProp3": "string"
        }
      }

Request body parameters

Parameter Mandatory Datatype Description
evidenceId yes UUID An identification for the "Evidence". UUID V4
hash yes string The hash(sha256) of the file of the "Evidence" in Hexadecimal.
createdBy no string(50) The owner of the "Evidence".
title yes string The title of the "Evidence".
custodyType yes string(50) The type of custody. INTERNAL: The Legal Platform custodies the file. EXTERNAL: The Legal Platfomr DOES NOT custody the file.
filename no string The file name of the "Evidence"
testimony no object The testimony mode of the Evidence. It is optional because it is configured by tenant. Options:
{
          "testimony": {
            "TSP": {
                "required": true,
                "providers": [
                    "EADTrust"
                ]
            },
            "DLT": {
                "required": true,
                "providers": [
                   "LACNet"
                ]
            }
         }
       
metadata no object Metadata of the "Evidence"

As response, you will get the following JSON object:

{
        "url": "http://example.io",
        "expiration": 0
            }

Where:

HTTP Response parameters

Parameter Datatype Description
url string The URL to upload the file of the "Evidence"
expiration string Expiration of the url

Upload "Evidence" file

In case you have evidence with custodyTyoe "Internal" (We keep custody of the file), the URL that was returned to us in the previous endpoint must be used to upload the file.

As you can see in the following example, you have to enter the file hash in base64 and the file name: x-amz-checksum-sha256: here the file hash in base64 will go and then you have to enter the file name with extension.


  curl -v -H "x-amz-checksum-sha256: 3EMnNvppVhJqpPMcZPTtglG+3aNS4cWMrLzNEsToNUY=" -T "example.png" "https://garrigues-int-gocertius-v2-doc-manager.s3.eu-west-1.amazonaws.com/G-CERTIUS/evidences/29ef49f1-9259-41d8-b6d3-876f53e9f681/resource/example.png?X-Amz-Security-Token=IQoJb3JpZ2luX2VjEC4aCWV1LXd..."

Update an "Evidence"

HTTP Request

PATCH /api/v1/private/evidences

With the following information provided as JSON:

{
        "evidenceIds": "[\"7e81750d-7906-43c9-bf6b-a9f30847c2e9\", \"1f7193a6-2454-4c67-8a64-b73c1049e92c\"]",
        "createdBy": "example owner"
      }

You can only edit createdBy filed, and you can do it massively.

As response, you will get

204 Evidences updated correctly

Dicard an "Evidence"

HTTP Request

DELETE /api/v1/private/case-files/{caseFileId}/evidence-groups/{evidenceGroupId}/evidences/{evidenceId}

In this request, there is one primary resource case-files, a secondary one evidence-groups and a third one evidences. There are also 3 resource identifiers that you need to replace with real values of your Legal App platform account: caseFileId, evidenceGroupId and evidenceId.

As response, you will get

204 "Evidence" discarded correctly

Get "Evidence" info

HTTP Request

GET /api/v1/private/case-files/{caseFileId}/evidence-groups/{evidenceGroupId}/evidences/{evidenceId}

In this request, there is one primary resource case-files, a secondary one evidence-groups and a third one evidences. There are also 3 resource identifiers that you need to replace with real values of your Legal App platform account: caseFileId, evidenceGroupId and evidenceId.

And as response, we would get the following JSON object:

{
        "caseFileId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "groupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "evidenceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "title": "example title",
        "custodyType": "INTERNAL",
        "status": {
          "status": "COMPLETED",
          "tspTimestamp": {
            "additionalProp1": "string",
            "additionalProp2": "string",
            "additionalProp3": "string"
          },
          "dltTimestamp": {
            "additionalProp1": "string",
            "additionalProp2": "string",
            "additionalProp3": "string"
          },
          "file": "example.png"
        },
        "capturedAt": "2023-10-25T05:08:37.379Z",
        "fileName": "example.png",
        "fileSize": 1024,
        "hash": "string",
        "timestamps": {
          "tspTimestamps": {
            "additionalProp1": {
              "token": "string",
              "timestampedAt": "2023-10-25T05:08:37.379Z"
            },
            "additionalProp2": {
              "token": "string",
              "timestampedAt": "2023-10-25T05:08:37.379Z"
            },
            "additionalProp3": {
              "token": "string",
              "timestampedAt": "2023-10-25T05:08:37.379Z"
            }
          },
          "dltTimestamps": {
            "additionalProp1": {
              "blockHash": "string",
              "transactionHash": "string",
              "network": "string",
              "blockExplorerLink": "http://example.io",
              "timestampedAt": "2023-10-25T05:08:37.379Z"
            },
            "additionalProp2": {
              "blockHash": "string",
              "transactionHash": "string",
              "network": "string",
              "blockExplorerLink": "http://example.io",
              "timestampedAt": "2023-10-25T05:08:37.379Z"
            },
            "additionalProp3": {
              "blockHash": "string",
              "transactionHash": "string",
              "network": "string",
              "blockExplorerLink": "http://example.io",
              "timestampedAt": "2023-10-25T05:08:37.379Z"
            }
          }
        },
        "createdBy": "example owner",
        "metadata": {
          "additionalProp1": "string",
          "additionalProp2": "string",
          "additionalProp3": "string"
        }
      }

Where:

HTTP Response parameters

Parameter Datatype Description
casefileId UUID The identifier of the "Case file" to which the "Evidence Group" to which the "Evidence" belongs. UUID V4
groupId UUID The identifier of the "Evidence Group" to which the "Evidence" belongs. UUID V4
evidenceId UUID An identification for the "Evidence". UUID V4
title string User last name
custodyType string(50) The type of custody. INTERNAL: The "Legal App Factory" custodies the file. EXTERNAL: "The Legal App Factory" DOES NOT custody the file.
filename string The file name of the "Evidence"
testimony string The testimony mode of the "Evidence". It is optional because it is configured by tenant. Options:
{
                "testimony": {
                  "TSP": {
                      "required": true,
                      "providers": [
                          "EADTrust"
                      ]
                  },
                  "DLT": {
                      "required": true,
                      "providers": [
                         "LACNet"
                      ]
                  }
               }
              
createdBy string(50) The owner of the "Evidence".
metadata object Metadata of the "Evidence"

Get "Evidence" list

HTTP Request

GET /api/v1/private/evidences

These call can be paged. This is specially usefull when you have to retrieve a big amount of elements.

By default, the size of the page is 20 elements, and you can put a maximum size of 200 elements. The response shows a list of resources to make the paged calls, basically you can set the page, the size, and the field you want to sort the list by.

Example:

GET /api/v1/private/evidences?page=0&size=25

With the following information provided as JSON:

{
        "id": "[3fa85f64-5717-4562-b3fc-2c963f66afa6, c3a8eb1c-3f6d-4bad-9e6b-c7e29461d021]",
        "caseFileId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "groupId": "[3fa85f64-5717-4562-b3fc-2c963f66afa6, c3a8eb1c-3f6d-4bad-9e6b-c7e29461d021]",
        "groupType": "FILE",
        "title": "example title",
        "hash": "string",
        "custodyType": "INTERNAL",
        "testimonyMode": "DLT",
        "status": "COMPLETED",
        "fileName": "example.png",
        "fileSize": 1024,
        "metadata": {
          "additionalProp1": "string",
          "additionalProp2": "string",
          "additionalProp3": "string"
        },
        "capturedFrom": "2023-10-25T05:19:12.468Z",
        "capturedUntil": "2023-10-25T05:19:12.468Z",
        "collectionMetadata": true,
        "page": 0,
        "size": 0,
        "sort": "[\"groupName:ASC\", \"capturedAt:DESC\"]"
      }

As response, you will get the following JSON object:

{
        "_metadata": {
          "currentPage": 0,
          "totalPages": 0,
          "pageSize": 0,
          "totalRecords": 0
        },
        "records": [
          {
            "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "caseFileId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "group": {
              "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
              "name": "example name",
              "type": "FILE",
              "code": "example code"
            },
            "title": "example title",
            "hash": "string",
            "fileSize": 1024,
            "custodyType": "INTERNAL",
            "createdBy": "example owner",
            "capturedAt": "2023-10-25T05:20:17.926Z",
            "fileName": "example.png",
            "status": {
              "status": "COMPLETED",
              "tspTimestamp": {
                "additionalProp1": "string",
                "additionalProp2": "string",
                "additionalProp3": "string"
              },
              "dltTimestamp": {
                "additionalProp1": "string",
                "additionalProp2": "string",
                "additionalProp3": "string"
              },
              "file": "example.png"
            },
            "timestamps": {
              "tspTimestamps": {
                "additionalProp1": {
                  "token": "string",
                  "timestampedAt": "2023-10-25T05:20:17.926Z"
                },
                "additionalProp2": {
                  "token": "string",
                  "timestampedAt": "2023-10-25T05:20:17.926Z"
                },
                "additionalProp3": {
                  "token": "string",
                  "timestampedAt": "2023-10-25T05:20:17.926Z"
                }
              },
              "dltTimestamps": {
                "additionalProp1": {
                  "blockHash": "string",
                  "transactionHash": "string",
                  "network": "string",
                  "blockExplorerLink": "http://example.io",
                  "timestampedAt": "2023-10-25T05:20:17.926Z"
                },
                "additionalProp2": {
                  "blockHash": "string",
                  "transactionHash": "string",
                  "network": "string",
                  "blockExplorerLink": "http://example.io",
                  "timestampedAt": "2023-10-25T05:20:17.926Z"
                },
                "additionalProp3": {
                  "blockHash": "string",
                  "transactionHash": "string",
                  "network": "string",
                  "blockExplorerLink": "http://example.io",
                  "timestampedAt": "2023-10-25T05:20:17.926Z"
                }
              }
            },
            "metadata": {
              "additionalProp1": "string",
              "additionalProp2": "string",
              "additionalProp3": "string"
            }
          }
        ]
      }

Where:

HTTP Response parameters

Parameter Datatype Description
filesize int The size in bytes of the file of the "Evidence"
timestamps object The detail of the timestampings processes.

Create Download URL

HTTP Request

GET /api/v1/private/case-files/{caseFileId}/evidence-groups/{evidenceGroupId}/evidences/{evidenceId}/download-url

In this request, there is one primary resource case-files, a secondary one evidence-groups and a third one evidences. There are also 3 resource identifiers that you need to replace with real values of your Legal App platform account: caseFileId, evidenceGroupId and evidenceId.

As response, you will get the following JSON object:

{
"url": "http://example.io",
"expiration": 0
}

Where:

HTTP Response parameters

Parameter Datatype Description
url string The URL to download the file of the "Evidence"
expiration string Expiration of the url

Create Upload URL

HTTP Request

POST /api/v1/private/case-files/{caseFileId}/evidence-groups/{evidenceGroupId}/evidences/{evidenceId}/upload-url

In this request, there is one primary resource case-files, a secondary one evidence-groups and a third one evidences. There are also 3 resource identifiers that you need to replace with real values of your Legal App platform account: caseFileId, evidenceGroupId and evidenceId.

With the following information provided as JSON:

{
  "fileName": "example.pdf
}

Request body parameters

Parameter Mandatory Datatype Description
fileName yes string Filename of "Evidence". String

As response, you will get the following JSON object:

{
 "url": "http://example.io",
 "expiration": 0
}

Where:

HTTP Response parameters

Parameter Datatype Description
url string The URL to upload the file of the "Evidence"
expiration string Expiration of the url

If you want to try any of these functionalities yourself and learn more about them, please go to the API catalogue