Trusted timestamping service
It is the solution for the preservation of digitized files according to NOM-151-SCFI-2016.
Rest Web service description
TrustedTimeStamping by file
This service generate a time stamp constancy file from the content of the given file.
~/api/TrustedTimeStamping/nom151/file
Parameters
| Tag | Type | Required | Description |
|---|---|---|---|
| file | File | yes | File to be preserve. |
Headers
| Tag | Type | Required | Description |
|---|---|---|---|
| apikey | string | yes | Customer key. |
Request
FormData
{
"file": "file"
}
Response
Correct
| Name | Type | Description |
|---|---|---|
| constancy | string | Constancy in base64 format. |
| cid | string | Id of the operation. |
JSON response
{
"constancy": "string",
"cid": "string"
}
Error
| Name | Type | Description |
|---|---|---|
| code | string | Error code. |
| message | string | Error message. |
{
"code": "string",
"message": "string"
}
TrustedTimeStamping by hash
This service generate a time stamp constancy file from a given hash.
~/api/TrustedTimeStamping/nom151/hash
Parameters
| Tag | Type | Required | Description |
|---|---|---|---|
| hash | string | yes | String of the representation of a file to be preserved, encrypted by algorithm sha256 |
Headers
| Tag | Type | Required | Description |
|---|---|---|---|
| apikey | string | yes | Customer key. |
Request
FormData
{
"hash": "string"
}
Response
Correct
| Name | Type | Description |
|---|---|---|
| constancy | string | Constancy in base64 format. |
| cid | string | Id of the operation. |
JSON response
{
"constancy": "string",
"cid": "string"
}
Error
| Name | Type | Description |
|---|---|---|
| code | string | Error code. |
| message | string | Error message. |
{
"code": "string",
"message": "string"
}
TrustedTimeStamping verify
This service verify if a file corresponds to the constancy file and the file has not been altered.
~/api/TrustedTimeStamping/nom151/verify
Parameters
| Tag | Type | Required | Description |
|---|---|---|---|
| file | File | yes | File preserved. |
| constancy | File | yes | Time stamp constancy file. |
Headers
| Tag | Type | Required | Description |
|---|---|---|---|
| apikey | string | yes | Customer key. |
Request
FormData
{
"file": "file",
"constancy": "file"
}
Response
Correct
| Name | Type | Description |
|---|---|---|
| result | bool | Result of the constancy is valid or not. |
| dateStartValidity | string | Date of the constancy generation. "yyyy-MM-ddTHH:mm:ss" |
JSON response
{
"result": "bool",
"dateStartValidity": "string"
}
Error
| Name | Type | Description |
|---|---|---|
| code | string | Error code. |
| message | string | Error message. |
{
"code": "string",
"message": "string"
}
Service messages
| Code | Message | Description |
|---|---|---|
| TTS001 | Access Denied. ApiKey not present. | Message displayed when a request is received without an ApiKey. |
| TTS002 | Access Denied. Invalid ApiKey. | Message displayed when a request is received with an unauthorized ApiKey. |
| TTS003 | Incorrect information. Does not exist the file. | Message that is displayed when the file is not sent. |
| TTS004 | The file size is not within the approximate range of 50 MB allowed | Message displayed when the file is larger than the allowed. |
| TTS005 | Something was wrong, We are working on the failure. | Message displayed when there is an error on the server. |
| TTS006 | Service temporarily unavailable | Message displayed when the preservation record file cannot be generated. |
| TTS007 | Compressed file formats .rar, .zip or .tar are not allowed. | Message displayed when the file format is .rar, .zip or .tar. |
| TTS008 | The hash parameter is required. | Message that is displayed when the hash does not have a correct format. |
| TTS009 | The hash is incorrect. | Message that is displayed when the hash is not sent. |