-
Notifications
You must be signed in to change notification settings - Fork 0
Querying Data
Vedad Kirlić edited this page Dec 30, 2021
·
6 revisions
We can use this endpoint to list files in a user's digi.me library
GET /v1.6/permission-access/query/<sessionKey>
| Parameter | Required | Description | Type |
|---|---|---|---|
sessionKey |
Yes | A valid session key. | string |
| Parameter | Required | Description | Type |
|---|---|---|---|
Accept |
Yes | The content types, expressed as MIME types, the client is able to understand. Use application/json. |
string |
curl --location --request GET 'https://api.digi.me/v1.6/permission-access/query/wKEqOoh5kb3yZJtpgdKvmMaiZXrZ6eHx' \
--header 'Accept: application/json'
200 OK
{
"status": {
"details": {
"3_438743763": {
"state": "completed"
},
"4_43232363": {
"state": "partial",
"error": {
"status": <error status>,
"statusCode": <error status code>,
"message": <error message>,
}
}
},
"state": "completed"
},
"fileList": [{
"name": "18_1_3_1_2_D200805_1.1.0.0.json",
"objectVersion": "1.0.0",
"updatedDate": 1604415301230
},
{
"name": "18_1_3_1_2_D200710_1.1.0.0.json",
"objectVersion": "1.0.0",
"updatedDate": 1604415404214
}
]
}
| Response item | Description | Data type |
|---|---|---|
status |
The current sync status of the user library. | LibraryDetail |
fileList |
The current list of files in the user library. | FileDetail[] |
| Property | Description | Type |
|---|---|---|
state |
Current status of the library. | LibraryStatus |
details |
Details of each account in user library. | AccountDetails |
| Value | Description |
|---|---|
pending |
Request is pending user permission. |
running |
User permission granted. Sync is running in the library. Some files may be available and new files may be added to the library. |
completed |
Syncs have completed. No new files will be added to the list and all files (if any) are published in files list at this point. |
partial |
(Some of) Dependent sync(s) failed or timed out. Some files may be available. No new files will be added to the files list at this point. |
| Property | Description | Type |
|---|---|---|
state |
Current status of the library. | LibraryStatus |
error |
Optional. Details of any error with this account. | Error |
| Property | Description | Type |
|---|---|---|
status |
Error status. | string |
statusCode |
Error Status Code. | number |
message |
Error Message. | string |
| Property | Description | Type |
|---|---|---|
name |
File Name | string |
objectVersion |
The version of the service group object. | string |
updatedDate |
Updated timestamp in milliseconds. | number |
Subject to Application, Contract, General and OAuth related errors.
We can use this endpoint to retrieve a file from user library
GET /v1.6/permission-access/query/<sessionKey>/<fileName>
| Parameter | Required | Description | Type |
|---|---|---|---|
sessionKey |
Yes | A valid session key. | string |
fileName |
Yes | A valid file name in user library. | string |
| Parameter | Required | Description | Type |
|---|---|---|---|
Accept |
Yes | The content types, expressed as MIME types, the client is able to understand. Use application/octet-stream. |
string |
curl --location --request GET 'https://api.digi.me/v1.6/permission-access/query/wKEqOoh5kb3yZJtpgdKvmMaiZXrZ6eHx/18_1_3_1_2_D201908_1.1.0.0.json' \
--header 'Accept: application/octet-stream' \
--data-raw ''
200 OK
X-Metadata: eyJmaWxlTWV0YWRhdGEiOnsib2JqZWN0Q291bnQiOjIsIm9iamVjdFR5cGUiOiJwb3N0Iiwib2JqZWN0VmVyc2lvbiI6IjEuMC4wIiwic2VydmljZUdyb3VwIjoic29jaWFsIiwic2VydmljZU5hbWUiOiJ0d2l0dGVyIn0sInN0YXR1cyI6eyJkZXRhaWxzIjp7IjNfOTQ0NjQ0MiI6eyJzdGF0ZSI6ImNvbXBsZXRlZCJ9fSwic3RhdGUiOiJjb21wbGV0ZWQifX0
<octet stream>
| Parameter | Description | Type |
|---|---|---|
X-Metadata |
Base64 encoded JSON object describing the file contents in human readable format. | string |
See decryption to learn about user data decryption.
Subject to Application, Contract, General and OAuth related errors.