Fetch a Contest Entry
From ePrize Developers Wiki
(Difference between revisions)
(New page: ==== Fetch a Contest Entry ==== Fetch entry: $ curl -i -X GET -H "Accept: text/xml" \ http://test.url.eprize.com/v1/eprize/ews12/contestv2/contest/entry/1 HTTP 200 (OK) Cache-Con...) |
|||
(One intermediate revision not shown.) | |||
Line 1: | Line 1: | ||
- | = | + | {{RESTfulAPI |
+ | |crumbs=[[API Home Page]] :: [[Contest API|Contest]] | ||
+ | |summary=Fetch a [[Enter Contest|contest entry]] by ID. This will return information about the contest entry. | ||
+ | |resource=/v1/{apikey}/contest/entry/{entryid} | ||
+ | |methods=GET | ||
+ | |resourceargs='''apikey''': Your [[API Key]]. | ||
- | + | '''entryid''': ID of the entry retrieved from [[Enter Contest|entry creation]] or by viewing the [[Browse_Contest_Gallery|gallery]]. | |
- | + | |paramsrequired=None. | |
- | + | }} | |
- | + | {{RESTfulExample | |
- | + | |title=Successfully fetch an entry | |
- | + | |summary=Demonstrates successful response | |
- | + | |responsecode=200 OK | |
- | + | |response=<?xml version="1.0" encoding="UTF-8" ?> | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
<result> | <result> | ||
<entry> | <entry> | ||
Line 34: | Line 32: | ||
</entry> | </entry> | ||
</result> | </result> | ||
+ | }} | ||
+ | {{RESTfulExample | ||
+ | |title=Request an entry ID that does not exist | ||
+ | |responsecode=404 Not Found | ||
+ | |response=<?xml version="1.0" encoding="UTF-8" ?> | ||
+ | <result> | ||
+ | <status>0</status> | ||
+ | </result> | ||
+ | }} |
Current revision
Summary
Fetch a contest entry by ID. This will return information about the contest entry.
Resource
/v1/{apikey}/contest/entry/{entryid}
Valid Methods
GET
Resource Arguments
Note: resource arguments are always required.
apikey: Your API Key.
entryid: ID of the entry retrieved from entry creation or by viewing the gallery.
Parameters Required
None.
Example: Successfully fetch an entry
Summary
Demonstrates successful response
Response
HTTP Status Code: 200 OK
<?xml version="1.0" encoding="UTF-8" ?> <result> <entry> <body>this is the body of my essay</body> <category>1</category> <city>PLEASANT RIDGE</city> <description></description> <entry_id>1</entry_id> <entry_state>approved</entry_state> <first_name>Todd</first_name> <last_name>C</last_name> <rating_ave>0.000</rating_ave> <rating_count>0</rating_count> <state>MI</state> <title>this is the title of my essay</title> <views>0</views> <votes>0</votes> </entry> </result>
Example: Request an entry ID that does not exist
Response
HTTP Status Code: 404 Not Found
<?xml version="1.0" encoding="UTF-8" ?> <result> <status>0</status> </result>