Evidence group operations
Contents
Introduction
Once you have created a "Case File", you can start creating "Evidence Groups".
Operations
Create an "Evidence Group"
The second thing you should do before creating evidence is to create a group of evidence associated with a "Case File":
HTTP Request
POST /api/v1/private/case-files/{caseFileId}/evidence-groups
In this request, there is one primary resource case-files. There are also 1 resource
identifier that you need to replace with real values of your Legal App platform account:
caseFileId.
With the following information provided as JSON:
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"code": "example code",
"type": "FILE",
"name": "example description",
"description": "example description",
"createdBy": "example description",
"metadata": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}
Request body parameters
| Parameter | Mandatory | Datatype | Description |
|---|---|---|---|
| id | yes | UUID | An identification for the "Evidence Group". UUID V4 |
| code | no | string(50) | The code of the "Evidence Group". It must be unique |
| type | no | string(50) | The type of the "Evidence Group". Possible values: "FILE, PHOTO, VIDEO, WEB_PLUGIN". |
| name | no | string(255) | The name of the "Evidence Group". |
| description | no | string(255) | The description of the "Evidence Group" |
| createdBy | no | string(55) | The creator of the "Evidence Group". |
| metadata | no | object | Metadata of the "Evidence Group" |
As response, you will get
201 Evidence Group created
Update an "Evidence Group"
To be able to update the information of "Evidence Groups"
HTTP Request
PATCH /api/v1/private/case-files/{caseFileId}/evidence-groups/{evidenceGroupId}
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:
{
"updateEvidenceGroupRequest": {
"name": "example name",
"description": "example description",
"code": "example code",
"createdBy": "example owner",
"metadata": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}
}
If you only want to update one of the fields you only have to send this one in the request.
As response, you will get
200 Evidence Group updated correctly
Discard an Evidence Group
To discard a "Evidence Group" you can make the following requests using the id of the "Evidence Group".
HTTP Request
DELETE /api/v1/private/case-files/{caseFileId}/evidence-groups/{evidenceGroupId}
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.
As response, you will get
204 Evidence Group discarded successfully
Close an "Evidence Group"
To close an "Evidence Group" you can make the following requests using the id of the "Evidence Group".
HTTP Request
POST /api/v1/private/case-files/{caseFileId}/evidence-groups/{evidenceGroupId}/close
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:
{
"evidencesCount": 3,
"collectMetadata": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}
*EvidencesCout: it is the value of the "Evidences" in the "Evidence Group"
*This operation starts a process and will return a notification when the groups is closed.
As response, you will get
202 Evidence Group close request accepted
Get "Evidence Group" info
To get the information of "Evidence Group" you can make the following requests using the id of the "Evidence Group".
HTTP Request
GET /api/v1/private/case-files/{caseFileId}/evidence-groups/{evidenceGroupId}
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.
And as response, we would get the following JSON object:
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"caseFileId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"collectionMetadataId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"code": "example code",
"name": "example name",
"type": "FILE",
"status": "OPEN",
"description": "example description",
"createdAt": "2023-10-24T20:44:31.972Z",
"createdBy": "example owner",
"evidences": {
"inProcess": 0,
"failed": 0,
"completed": 0,
"total": 0
},
"discarded": false,
"metadata": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
} Where:
HTTP Response parameters
| Parameter | Datatype | Description |
|---|---|---|
| id | UUID | An identification for the "Evidence Group". UUID V4 |
| caseFileId | UUID | An identification for the "Case File". UUID V4 |
| collectionMetadataId | UUID | An identification for the "Collection Metadata". UUID V4 |
| code | string(50) | "Evidence group's" code |
| name | string(50) | "Evidence group's" name |
| type | string(50) | The type of the "Evidence Group". Possible values: "FILE, PHOTO, VIDEO, WEB_PLUGIN". |
| status | string(50) | "Evidence group's" statusPossible values: "OPEN,CLOSING,CLOSED". |
| description | string(255) | "Evidence group's" description |
| evidences | object | "Evidence group's" evidences and their quantity grouped by evidence status |
| discarded | bool | If the "Evidence Group is discarded" |
| metadata | object | Metadata of the "Evidence Group" |
Get "Evidence Group" list
If you want to get the list of all the "Evidence Gropus" in your system, you can make the following requests:
HTTP Request
GET /api/v1/private/evidence-groups
And as response, we would get the following JSON object:
{
"caseFileId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"id": "[3fa85f64-5717-4562-b3fc-2c963f66afa6, c3a8eb1c-3f6d-4bad-9e6b-c7e29461d021]",
"code": "example code",
"name": "example name",
"status": "OPEN",
"type": "FILE",
"createdBy": "example owner",
"metadata": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"createdFrom": "2023-10-24T20:53:29.593Z",
"createdUntil": "2023-10-24T20:53:29.593Z",
"page": 0,
"size": 0,
"sort": "[\"name:ASC\", \"createdAt:DESC\"]"
}
These calls 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/evidence-groups?page=0&size=25
If you want to try any of these functionalities yourself and learn more about them, please go to the API catalogue