Live markdown example: https://gist.github.com/4399630
#BundleBackend REST API v1.0
GET danezo.com/apps
Description:
Retrieve the available apps in the store. Return 20 results if no input parameters are given
Optional parameters:
results=[integer]
, default: 20, number of results to returnstart_index=[integer]
, default: 0, the index of the first app to returnsort_by=["price", "rating", "name"]
, default: "name"min_os_version=[alphanumeric]
, default: "all versions”
Success Response:
- Code :
200
- Content:
[
{
"app_id": 231,
"bundle_id": "com.dev.appName",
"title": "App name",
"developer_name": "developer",
"description": "Tasks is an app that...",
"icon_url": "http://www.danezo/....gif",
"rating": 4,
"token_value":3,
"os_version":"4.1"
“downloads”: 420
“reviews”:20
“category”: “games”
“created_at:” “2009/12/31 13:00 UTC”
“content_rating”: “mature”
},
{
"app_id": 232,
"bundle_id": "com.dev2.appName2",
"title": "App name2",
"developer_name": "developer2",
"description": "AppName 2 is an app that...",
"icon_url": "http://www.danezo/....gif",
"rating": 3,
"token_value":2,
"os_version":"4.1"
“downloads”: 420
“reviews”:20
“category”: “games”
“created_at:” “2009/12/31 13:00 UTC”
“content_rating”: “mature”
},
]
Error Response:
- Code :
- Content:
GET danezo.com/apps/category/:category_url_safe_name
Description:
Retrieve all available apps by category name. The optional parameters and the response are the same as for call "1.Get apps".
Optional parameters:
results=[integer]
, default: 20, number of results to returnstart_index=[integer]
, default: 0, the index of the first app to returnsort_by=["price", "rating", "name"]
, default: "name"min_os_version=[alphanumeric]
, default: "all versions”
Success Response:
- Code :
200
- Content:
[
{
"app_id": 231,
"bundle_id": "com.dev.appName",
"title": "App name",
"developer_name": "developer",
"description": "Tasks is an app that...",
"icon_url": "http://www.danezo/....gif",
"rating": 4,
"token_value":3,
"os_version":"4.1"
“downloads”: 420
“reviews”:20
“category”: “games”
“created_at:” “2009/12/31 13:00 UTC”
“content_rating”: “mature”
},
{
"app_id": 232,
"bundle_id": "com.dev2.appName2",
"title": "App name2",
"developer_name": "developer2",
"description": "AppName 2 is an app that...",
"icon_url": "http://www.danezo/....gif",
"rating": 3,
"token_value":2,
"os_version":"4.1"
“downloads”: 420
“reviews”:20
“category”: “games”
“created_at:” “2009/12/31 13:00 UTC”
“content_rating”: “mature”
},
]
Error Response:
- Code :
404
- Content:
{
"success": False,
"message": "Category not found."
}
Sample Call:
GET danezo.com/apps/category/productivity GET danezo.com/apps/category/games
GET danezo.com/apps/featured
Description:
Retrieve featured apps in the store, from all categories. Optional parameters and response same as for calls 1 and 2
Required parameters:
Optional parameters:
results=[integer]
, default: 20, number of results to returnstart_index=[integer]
, default: 0, the index of the first app to returnsort_by=["price", "rating", "name"]
, default: "name"min_os_version=[alphanumeric]
, default: "all versions”
Success Response:
- Code :
200
- Content:
[
{
"app_id": 231,
"bundle_id": "com.dev.appName",
"title": "App name",
"developer_name": "developer",
"description": "Tasks is an app that...",
"icon_url": "http://www.danezo/....gif",
"rating": 4,
"token_value":3,
"os_version":"4.1"
“downloads”: 420
“reviews”:20
“category”: “games”
“created_at:” “2009/12/31 13:00 UTC”
“content_rating”: “mature”
},
{
"app_id": 232,
"bundle_id": "com.dev2.appName2",
"title": "App name2",
"developer_name": "developer2",
"description": "AppName 2 is an app that...",
"icon_url": "http://www.danezo/....gif",
"rating": 3,
"token_value":2,
"os_version":"4.1"
“downloads”: 420
“reviews”:20
“category”: “games”
“created_at:” “2009/12/31 13:00 UTC”
“content_rating”: “mature”
},
]
GET danezo.com/apps/category/:category_url_safe_name/featured
Description:
Retrieve featured apps from a specific category. Optional parameters and response same as for previous calls.
Required parameters:
category_name=[alphanumeric]
Optional parameters:
results=[integer]
, default: 20, number of results to returnstart_index=[integer]
, default: 0, the index of the first app to returnsort_by=["price", "rating", "name"]
, default: "name"min_os_version=[alphanumeric]
, default: "all versions”
Success Response:
- Code :
200
- Content:
[
{
"app_id": 231,
"bundle_id": "com.dev.appName",
"title": "App name",
"developer_name": "developer",
"description": "Tasks is an app that...",
"icon_url": "http://www.danezo/....gif",
"rating": 4,
"token_value":3,
"os_version":"4.1"
“downloads”: 420
“reviews”:20
“category”: “games”
“created_at:” “2009/12/31 13:00 UTC”
“content_rating”: “mature”
},
{
"app_id": 232,
"bundle_id": "com.dev2.appName2",
"title": "App name2",
"developer_name": "developer2",
"description": "AppName 2 is an app that...",
"icon_url": "http://www.danezo/....gif",
"rating": 3,
"token_value":2,
“downloads”: 420
“reviews”:20
“category”: “games”
“created_at:” “2009/12/31 13:00 UTC”
“content_rating”: “mature”
},
]
Error Response:
- Code :
404
- Content:
{
"success": False,
"message": "Category not found."
}
Sample Call:
GET danezo.com/apps/category/finance/featured
GET danezo.com/apps/developer/:developer_name
Description:
Retrieve apps developed by a specific developer.
Required parameters:
developer_name=[alphanumeric]
Optional parameters:
results=[integer]
, default: 20, number of results to returnstart_index=[integer]
, default: 0, the index of the first app to returnsort_by=["price", "rating", "name"]
, default: "name"min_os_version=[alphanumeric]
, default: "all versions”
Success Response:
- Code :
200
- Content:
[
{
"app_id": 231,
"bundle_id": "com.dev.appName",
"title": "App name",
"developer_name": "developer",
"description": "Tasks is an app that...",
"icon_url": "http://www.danezo/....gif",
"rating": 4,
"token_value":3,
“downloads”: 420
“reviews”:20
“category”: “games”
“created_at:” “2009/12/31 13:00 UTC”
“content_rating”: “mature”
},
{
"app_id": 232,
"bundle_id": "com.dev2.appName2",
"title": "App name2",
"developer_name": "developer2",
"description": "AppName 2 is an app that...",
"icon_url": "http://www.danezo/....gif",
"rating": 3,
"token_value":2,
“downloads”: 420
“reviews”:20
“category”: “games”
“created_at:” “2009/12/31 13:00 UTC”
“content_rating”: “mature”
},
]
Error Response:
- Code :
404
- Content:
{
"success": False,
"message": "Category not found."
}
Sample Call:
GET danezo.com/apps/developer/wajee
GET danezo.com/apps/:bundle_id
Description: Retrieve the details/description for a specific APPROVED app.
Required parameters:
bundle_id=[alphanumeric]
Success Response:
- Code :
200
- Content:
[
{
"app_id": 231,
"bundle_id": "com.dev.appName",
"title": "App name",
"developer_name": "developer",
"description": "Tasks is an app that...",
"icon_url": "http://www.danezo/....gif",
"rating": 4,
"token_value":3,
"os_version":"4.1",
"version_number":"1.3",
“updated_at:” “2009/12/31 13:00 UTC”
“downloads”: 420
“reviews”:20
“category”: “games”
“created_at:” “2009/12/31 13:00 UTC”
“apk_size” : “2.3MB”
“developer_website_url”:"http://www.example.com"
“developer_support_email”:"support@developer.com"
“privacy_policy”:”block of text”
“content_rating”: “mature”
“exists_in_bundle”: True
"screenshots":
{
"screensNum":5,
"screens":
[
"http://www.myscreens.com/screen1.jpg",
"http://www.myscreens.com/screen1.jpg",
...
]
}
"video":
{
"has_video": 1, (or 0 if no video)
"video_url": "http://www.youtube.com/myvid"
}
}
]
Error Response:
- Code :
404
- Content:
{
"success": False,
"message": "Bundle not found."
}
Sample Call:
GET danezo.com/apps/com.dev.appName
POST danezo.com/apps
Description: Create a new app bundle
Required parameters:
title=[alphanumeric]
promo_text=[alphanumeric]
Text describing in short the applicationdescription=[alphanumeric]
More extended description of the applicationcategory=[alphanumeric]
token_value=[integer]
os_version=[alphanumeric]
developer_name=[alphanumeric]
auth_token=[alphanumeric]
The token received when user logged in
Optional parameters:
privacy_policy_url=[url]
form factor=[alphanumeric]
'phone' 'tablet' 'both'
The App id and bundle id will be created internally.
Success Response:
- Code :
201
(created) - Content:
{
"success": True,
"success": "App with bundle ID #{bundle_id} has been successfully created."
}
Error Response:
- Code :
409
(conflict) - Content:
{
"success": False,
"message": "App with #{param_name(e.g.Bundle ID)}: #{param_value(e.g.com.dev.appName)} could not be created."
}
PUT danezo.com/apps/:bundle_id
Description: Update the data for an app
Optional parameters:
title=[alphanumeric]
promo_text=[alphanumeric]
Text describing in short the applicationdescription=[alphanumeric]
More extended description of the applicationcategory=[alphanumeric]
token_value=[integer]
os_version=[alphanumeric]
developer_name=[alphanumeric]
privacy_policy_url=[url]
form factor=[alphanumeric]
'phone' 'tablet' 'both'auth_token=[alphanumeric]
Success Response:
- Code :
200
(OK) - Content:
{
"success": True,
"success": "App successfully updated"
}
Error Response:
- Code :
403
- Content:
{
"success": False,
"message": "User not authorized"
}
- Code :
404
- Content:
{
"success": False,
"message": "App not found"
}
DELETE danezo.com/apps/:bundle_id
Description: Administrative action to delete app from store.
Required parameters:
auth_token=[alphanumeric]
Optional parameters:
Success Response:
- Code :
200
(OK) - Content:
{
"success": True,
"success": "App successfully deleted"
}
Error Response:
- Code :
403
- Content:
{
"success": False,
"message": "User not authorized"
}
- Code :
404
- Content:
{
"success": False,
"message": "App not found"
}
Sample Call:
DELETE danezo.com/apps/com.devName.app
POST danezo.com/apps/:bundle_id/version Description: Required parameters:
app_version=[alphanumeric]
os_version=[alphanumeric]
change_log=[alphanumeric]
apk=[binary]
auth_token=[alphanumeric]
Optional parameters: Success Response:
- Code :
200
(OK) - Content:
{
"success": True,
"success": "New app version successfully uploaded."
}
Error Response:
- Code :
403
- Content:
{
"success": False,
"message": "User not authorized."
}
- Code :
404
- Content:
{
"success": False,
"message": "App #{:bundle_id} could not be found."
}
- Code :
415
- Content:
{
"success": False,
"message": "Please ensure the file you are trying to upload has the file extension APK."
}
PUT danezo.com/apps/:bundle_id/version/:version_number
Description: Update the info of an already uploaded app version. The apk will not be updated through this call. Developers will have to create a new app version.
Required parameters: Optional parameters:
app_version=[alphanumeric]
os_version=[alphanumeric]
change_log=[alphanumeric]
auth_token=[alphanumeric]
Success Response:
- Code :
200
(OK) - Content:
{
"success": True,
"success": "New app version successfully uploaded."
}
Error Response:
- Code :
403
- Content:
{
"success": False,
"message": "User not authorized."
}
- Code :
404
- Content:
{
"success": False,
"message": "App #{:bundle_id} could not be found."
}
- Code :
404
- Content:
{
"success": False,
"message": "App #{:bundle_id} version #{:app_version} could not be found."
}
Sample call
PUT danezo.com/apps/com.angrybirds.rovio/version/3.1
DELETE danezo.com/apps/:bundle_id/version/:version_number
Description: Update the info of an already uploaded app version
Required parameters:
reason=[alphanumeric]
auth_token=[alphanumeric]
Optional parameters:
Success Response:
Error Response:
- Code :
403
- Content:
{
"success": False,
"message": "User not authorized."
}
- Code :
404
- Content:
{
"success": False,
"message": "App #{:bundle_id} could not be found."
}
- Code :
404
- Content:
{
"success": False,
"message": "App #{:bundle_id} version #{:app_version} could not be found."
}
GET danezo.com/apps/:bundle_id/download
Description: Retrieve the apk for an app
Required parameters:
auth_token=[alphanumeric]
Success Response
- Code :
200
- Content: binary file (apk)
Error Response
- Code :
404
- Content:
{
"success": False,
"message": "App #{:bundle_id} could not be found."
}
- Code :
404
- Content:
{
"success": False,
"message": "App #{:bundle_id} version #{:app_version} could not be found."
}
POST danezo.com/users/:user_id/sandbox
Required Parameters
bundle_id=[alphanumeric]
auth_token=[alphanumeric]
Description: User places an app to his sandbox
Success Response
- Code :
200
- Content:
{
"success": True,
“remaining_credit”: 2
"message": "App #{:bundle_id} placed in sandbox."
}
Error Response
- Code :
412
- Content:
{
"success": False,
"message": "Insufficient credit"
}
- Code :
403
- Content:
{
"success": False,
"message": "User not authorized"
}
- Code :
404
- Content:
{
"success": False,
"message": "App #{bundle_id} could not be found."
}
DELETE danezo.com/users/:user_id/sandbox
Required Parameters
bundle_id=[alphanumeric]
auth_token=[alphanumeric]
Description: User removes an app from his sandbox
Success Response
- Code :
200
- Content:
{
"success": True,
“remaining_credit”: 2,
"message": "App #{:bundle_id} removed from sandbox."
}
Error Response
- Code :
403
- Content:
{
"success": False,
"message": "User not authorized"
}
- Code :
404
- Content:
{
"success": False,
"message": "App #{bundle_id} could not be found."
}
GET danezo.com/users/:user_id/sandbox
Description: Required parameters:
auth_token=[alphanumeric]
Optional parameters:
results=[integer]
, default: 10, number of results to returnstart_index=[integer]
, default: 0, the index of the first app to returnsort_by=["price", "rating", "name"]
, default: "name"
Success Response:
- Code :
200
- Content:
[
{
"app_id": 231,
"bundle_id": "com.dev.appName",
"title": "App name",
"developer_name": "developer",
"description": "Tasks is an app that...",
"icon_url": "http://www.danezo/....gif",
"rating": 4,
"token_value":3,
"os_version":"4.1",
"version_number":"1.3",
“created_at:” “2009/12/31 13:00 UTC”
“downloads”: 420
“reviews”:20
},
{
"app_id": 232,
"bundle_id": "com.dev2.appName2",
"title": "App name2",
"developer_name": "developer2",
"description": "AppName 2 is an app that...",
"icon_url": "http://www.danezo/....gif",
"rating": 3,
"token_value":2,
"version_number":"1.3",
“created_at:” “2009/12/31 13:00 UTC”
“downloads”: 420
“reviews”:20
},
]
Error Response:
- Code :
403
- Content:
{
"success": False,
"message": "User not authorized"
}
- Code :
404
- Content:
{
"success": False,
"message": "User #{user_id} could not be found."
}
GET danezo.com/users/:user_id/sandbox
Description: Returns true if the supplied app is in the user’s sandbox Required parameters:
auth_token=[alphanumeric]
app_id=id
Optional parameters:
Success Response:
- Code :
200
- Content:
[
{
“exists_in_sandbox”: True
“date_added”: [date]
}
]
- Code :
200
- Content:
[
{
“exists_in_sandbox”: False
}
]
Error Response:
- Code :
403
- Content:
{
"success": False,
"message": "User not authorized"
}
- Code :
404
- Content:
{
"success": False,
"message": "User #{user_id} could not be found."
}
- Code :
404
- Content:
{
"success": False,
"message": "App #{app_id} could not be found."
}
GET danezo.com/users/:user_id/credit
Description: PRICING SCHEME/PLANS REQUIRES FURTHER DISCUSSION! Required parameters:
auth_token=[alphanumeric]
Optional parameters:
Success Response:
- Code :
200
- Content:
{
"total": 10,
"available": 2,
"expiration": " YYYY-MM-DD-hh-mm-ss GMT"
},
Error Response:
- Code :
403
- Content:
{
"success": False,
"message": "User not authorized"
}
- Code :
404
- Content:
{
"success": False,
"message": "User #{user_id} could not be found."
}
Buy subscription Payment was succesful
GET danezo.com/categories
Description: Retrieve the available app categories
Optional parameters:
- results, default: 32
- start_index (apps), default: 0
Success Response:
- Code :
200
- Content:
[
{
id: 1,
name: "Health & Fitness",
url_safe_name: “health_and_fitness”
total_apps: 420
},
{
id: 2,
name: "Transportation",
url_safe_name: “transportation”
total_apps: 221
},
]
POST danezo.com/categories
Description: Create a new category (admin)
Required parameters:
name=[alphanumeric]
auth_token=[alphanumeric]
Success Response:
- Code :
200
- Content:
{
"success": true,
"message": "Category created."
}
Error Response:
- Code :
403
- Content:
[
{
"success": false,
"message": "Forbidden"
}
]
- Code :
500
- Content:
{
"success": false,
"message": "internal server error"
}
PUT danezo.com/categories/:url_safe_name
Description: Update a category (admin)
Required parameters:
auth_token=[alphanumeric]
Success Response:
- Code :
200
- Content:
{
"success": true,
"message": "Category updated."
}
Error Response:
- Code :
403
- Content:
{
"success": false,
"message": "Forbidden"
}
- Code :
500
- Content:
{
"success": false,
"message": "internal server error"
}
- Code :
404
- Content:
{
"success": False,
"message": "Category not found"
}
DELETE danezo.com/categories/:url_safe_name
Description: Delete a category (admin)
Required parameters:
auth_token=[alphanumeric]
Success Response:
- Code :
200
- Content:
{
"success": true,
"message": "Category deleted."
}
Error Response:
- Code :
403
- Content:
{
"success": false,
"message": "Forbidden"
}
- Code :
500
- Content:
{
"success": false,
"message": "internal server error"
}
- Code :
404
- Content:
{
"success": false,
"message": "Category not found"
}
POST danezo.com/users
Description: Base user registration
Required parameters:
name=[alphanumeric]
email=[email]
country=[alphanumeric]
password=[password]
password_confirmation=[password]
date_of_birth=[date]
Optional parameters:
gender=[alphanumeric]
Success Response:
- Code :
202
- Content:
{
"success": true,
"message": "Base user created. A confirmation email has been sent to your email account"
}
Error Response:
- Code :
406
- Content:
{
"success": true,
"message": "An account with the provided email already exists
}
POST danezo.com/users/:user_id
Description: Updates can only be made with the provision of the current password
Required parameters:
password=[password]
auth_token=[alphanumeric]
Optional parameters:
name=[alphanumeric]
email=[email]
country=[alphanumeric]
new_password=[password]
new_password_confirmation=[password]
date_of_birth=[date]
Success Response:
- Code :
200
- Content:
{
"success": true,
"message": "Account details have been updated"
}
- Code :
201
- Content:
<html></html>
Error Response:
- Code : ``
- Content:
Sample Call
DELETE danezo.com/users/:user_id
Description:
Required parameters:
auth_token=[alphanumeric]
Optional parameters:
Success Response:
Error Response:
Sample Call
GET danezo.com/users/:user_id
Required parameters:
auth_token=[alphanumeric]
Optional parameters:
Success Response
- Code :
200
{
"name": John Rambo,
"email": "john@vietnam.com"
"country": Vietnam
"date_of_birth": 1950/12/31
"gender": male
"available_credit": 2
}
Error Response
- Code :
403
- Content:
{
"success": False,
"message": "User not authorized"
}
- Code :
404
- Content:
{
"success": False,
"message": "User not found"
}
GET danezo.com/search
Required parameters:
search_term=[string]
Optional parameters:
category=[alphanumeric]
developer=[alphanumeric]
min_value=[integer]
max_value=[integer]
min_os_version=[alphanumeric]
content_type=[alphanumeric]
min_rating=[alphanumeric]
Success Response
- Code :
200
[
{
"app_id": 231,
"bundle_id": "com.dev.appName",
"title": "App name",
"developer_name": "developer",
"description": "Tasks is an app that...",
"icon_url": "http://www.danezo/....gif",
"rating": 4,
"token_value":3,
"os_version":"4.1"
“downloads”: 420
“reviews”:20
“category”: “games”
“created_at:” “2009/12/31 13:00 UTC”
“content_rating”: “mature”
},
{
"app_id": 232,
"bundle_id": "com.dev2.appName2",
"title": "App name2",
"developer_name": "developer2",
"description": "AppName 2 is an app that...",
"icon_url": "http://www.danezo/....gif",
"rating": 3,
"token_value":2,
"os_version":"4.1"
“downloads”: 420
“reviews”:20
“category”: “games”
“created_at:” “2009/12/31 13:00 UTC”
“content_rating”: “mature”
},
]
Error Response
GET danezo.com??? daneezo.com Description: URL exposed by the activation email. Not intended for use by the mobile frontend!
POST danezo.com/login
Description
Required parameters:
email
password
A successful response will return the following message with status code 200:
{
"success": true,
"auth_token": "pvCXnuWhfPYkD4iDQp3",
"email": "foo@bar.com"
}