API Home Page
From ePrize Developers Wiki
Line 1: | Line 1: | ||
- | '''New to | + | '''New to Helloworld Web Services?''' Read this first: [[Getting Started]] |
<!--<div style="float:right">http://code.eprize.com/wiki/images/6/68/EPrize_API.gif</div>--> | <!--<div style="float:right">http://code.eprize.com/wiki/images/6/68/EPrize_API.gif</div>--> | ||
- | + | Helloworld Web Services API uses a [[Wikipedia:Representational State Transfer|REST]] architecture for communication between your client and the Helloworld servers. This is the same architecture used by the web, so you can explore the API with a web browser. While exploring the API, its basic features become clear: | |
* All URLs represent resources available to you. URLs are never actions. | * All URLs represent resources available to you. URLs are never actions. | ||
Line 12: | Line 12: | ||
* All GET and PUT actions are idempotent; POST actions are not. | * All GET and PUT actions are idempotent; POST actions are not. | ||
- | These features come at a cost however: the API consists of very small building blocks that do not directly provide the promotion services you expect in an | + | These features come at a cost however: the API consists of very small building blocks that do not directly provide the promotion services you expect in an Helloworld promotion. For example, game plays are not automatically awarded upon login—there isn't even a login call! If you want to build clients using these more specific promotion features, you must use a client library. A library assembles the small building blocks into bigger features that you can reuse when building your promotion. |
- | '''It is important to note that all communication to and from the | + | '''It is important to note that all communication to and from the Helloworld Web Services API uses UTF-8 encoding.''' |
- | == | + | == Helloworld Web Services API == |
<div class="api_table"> | <div class="api_table"> |
Revision as of 14:00, 31 March 2014
New to Helloworld Web Services? Read this first: Getting Started
Helloworld Web Services API uses a REST architecture for communication between your client and the Helloworld servers. This is the same architecture used by the web, so you can explore the API with a web browser. While exploring the API, its basic features become clear:
- All URLs represent resources available to you. URLs are never actions.
- All actions on resources are basic HTTP methods such as GET, POST and PUT.
- All responses to your actions use basic HTTP status codes such as "200 OK" and "400 Bad Request".
- All responses include information on sub-resources and actions that may be performed.
- All responses use simple, regular media types that can be easily processed.
- All GET and PUT actions are idempotent; POST actions are not.
These features come at a cost however: the API consists of very small building blocks that do not directly provide the promotion services you expect in an Helloworld promotion. For example, game plays are not automatically awarded upon login—there isn't even a login call! If you want to build clients using these more specific promotion features, you must use a client library. A library assembles the small building blocks into bigger features that you can reuse when building your promotion.
It is important to note that all communication to and from the Helloworld Web Services API uses UTF-8 encoding.
Helloworld Web Services API
Output communication test | GET | /v1/{apikey}/test/communication | |
Input communication test | POST | /v1/{apikey}/test/communication | |
Input URL communication test | PUT | /v1/{apikey}/test/communication/{value} | |
Error response test | PUT | /v1/{apikey}/test/communication |
Create profile | POST | /v1/{apikey}/profiles |
Fetch profile by key | GET | /v1/{apikey}/profile({key})/{value} |
Fetch profile | GET | /v1/{apikey}/profile/{uid} |
Create CAPTCHA challenge | POST | /v1/{apikey}/captcha |
Fetch CAPTCHA challenge | GET | /v1/{apikey}/captcha/{challenge-id} |
Validating_CAPTCHA_challenge_secret |
Award sweepstakes entry | POST | /v1/{apikey}/game/{gameid}/sweeps |
Award instant win token | POST | /v1/{apikey}/game/{gameid}/tokens |
Fetch token | GET | /v1/{apikey}/game/{gameid}/token/{tokenid} |
Redeem token | POST | /v1/{apikey}/game/{gameid}/token/{tokenid} |
Fetch prize | GET | /v1/{apikey}/game/{gameid}/prize/{prizeid} |
Send email | POST | /v1/{apikey}/email/{template-id} |
Validate and consume code | POST | /v1/{apikey}/code/{codeClass}/{code} |
Photo Upload Key | POST | /v1/{apikey}/contest/photo_upload_key |
Enter Contest | POST | /v1/{apikey}/contest/entry |
Fetch a Contest Entry | GET | /v1/{apikey}/contest/entry/{entryId} |
Get All Contest Entries for a Profile | GET | /v1/{apikey}/profile/{profileId}.{webkey}/contest/entry |
Rate a Contest Entry | POST | /v1/{apikey}/contest/entry/{entryId}/rate |
Tattle on a Contest Entry | POST | /v1/{apikey}/contest/entry/{entryId}/tattle |
Vote on a Contest Entry | POST | /v1/{apikey}/contest/entry/{entryId}/vote |
Send a Contest Entry Link | POST | /v1/{apikey}/contest/entry/{entryId}/send_a_link |
Browse Contest Gallery | GET | /v1/{apikey}/contest/gallery |
Fetch Contest Leaderboard | GET | /v1/{apikey}/contest/most-popular |