-
Notifications
You must be signed in to change notification settings - Fork 0
Object Model
verwebbt edited this page Nov 28, 2014
·
3 revisions
All API Endpoints return data in JSON format.
Every API response follows an unified structure and will return at least one Object, which is constructed using one of the following Object Models. Most responses will contain more than one Object, as the API is build with the intention to save requests. Because every request needs authorization through a third party and a request to the provider is made, a request always takes slightly longer (about 150ms). That's why we try to save requests.
If you care about data usage you can reduce the response Object in every API call to get just the amount of data you need. learn more...
Name | Type | Description |
---|---|---|
id |
String | The user ID for the user |
name |
String | The display name of the user |
email |
String | The email Address of the user |
image |
String | A link to the users profile image |
oauth |
Object | Informations about the OAuth2.0 login of the user |
oauth.provider |
String | The name of the OAuth2.0 provider the user used to login |
oauth.id |
String | The user ID in the OAuth2.0 providers system |
quota |
Object | Informations about the users quota |
quota.used |
Integer | The used storage of the user in bytes |
quota.total |
Integer | The total amount of storage the user has in bytes |
quota.count |
Integer | The amount of uploads from the user |
{
"id": "546ce2cadc7c0162336090e2",
"name": "John Doe",
"email": "[email protected]",
"image": "https://lh4.googleusercontent.com/-xUelHR_l_mk/AAAAAAAAAAI/AAAAAAAACS4/zvs8v_wLjyo/photo.jpg",
"oauth": {
"provider": "google",
"id": "123456789098765430000"
},
"quota": {
"used": 1990734,
"total": 10000000000,
"count": 2
}
}
Name | Type | Description |
---|---|---|
id |
String | The upload ID for the upload |
userid |
String | The user ID for the user who belongs to this upload |
title |
String | The filename of the upload |
shortlink |
String | A shorted link to view the upload |
views |
Integer | The number of views for this upload |
created |
Date | The date in ISO format when the upload was created |
publicUrl |
String | A short-timed (60 seconds) direct link to the file |
size |
Integer | The size of the uploaded file in bytes |
mimetype |
String | The mimetype of the uploaded file |
{
"id": "546ce32ad0358b7a33bb9b23",
"userid": "546ce2cadc7c0162336090e2",
"title": "Screen Shot 2014-11-19 at 14.55.53.png",
"shortlink": "https://localhost:3000/mPo2",
"views": 0,
"created": "2014-11-19T18:36:26.130Z",
"publicUrl": "https://localhost:3000/files/pub/NWY1Mzk5NzQ4NjllNGIzOWZiNzI2MzQ1OTMyM2EyNTFjYjM1NzgwNA==/1416501244960/546ce2cadc7c0162336090e2/7e2bc5903ca394f989aeb1c128bdd892.png",
"size": 85962,
"mimetype": "image/png"
}
Name | Type | Description |
---|---|---|
status |
Integer | HTTP status code for the error |
message |
String | A short description about the error |
info |
String | More informations about the error and how to fix it |
{
"status": 403,
"message": "Invalid access token",
"info": "The access token is invalid. Probably the access token is expired."
}