Deprecated - API v1 will be switched off on 01.07.2022. Please upgrade to API v2
User documents
Document is a summary representation of single user document stored in Perfect Gym.
Document properties
Document is described by the following properties
Name | Type | Description |
---|---|---|
id |
long |
Unique identifier of document. |
timestamp |
long |
Timestamp. Indicates when resource was last modified. |
name |
string |
Document file name. |
extension |
string |
File extension. |
type |
string |
Document type. Possible values:
|
size |
long |
File size in bytes. |
url |
string |
Document url. |
isDeleted |
bool |
Indicates if resource is deleted. |
List user documents
GET Documents/Documents
Returns paginated list of user documents.
Parameters
Name | Type | Description |
---|---|---|
userId |
long |
Required. User identifier. Request returns documents assigned to user identified by userId . |
timestamp |
long |
Timestamp. Request returns user documents with timestamp grater then timestamp , defaults to 0. |
Example request
In this example we fetch list of documents assigned to user identified with id
= 236
curl -i -X GET -H "Authorization: Bearer $ACCESS_TOKEN" http://yoursubdomain.perfectgym.com/Api/Documents/Documents?userId=236
Example response
Status: 200 OK
{
"elements": [
{
"name": "git_pg.txt",
"extension": ".txt",
"type": "ContractAgreement",
"size": 225,
"url": "http://yoursubdomain.perfectgym.com/Api/Files/File?fileId=183",
"id": 183,
"timestamp": 692580,
"isDeleted": false
}
]
}