Fetch profile

From ePrize Developers Wiki

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
-
[[API Home Page]] :: [[Profiles]]
+
{{RESTfulAPI
-
<pre>
+
|crumbs=[[API Home Page]] :: [[Profiles]]
-
Response:
+
|summary=Only key:value pairs marked as safe for display will be returned. The {apikey} defines which keys are safe and the client may not change them except by requesting a new {apikey}. This allows clients to easily handle personalization, but minimizes the risk of exposing PII with a programming error. Full profiles are available through the Analytics "profile download" service.
-
awards: /v1/{apikey}/profile/{uid}/awards,
+
}}
-
tokens: /v1/{apikey}/profile/{uid}/tokens,
+
-
</pre>
+
-
Response (Success)
+
{{RESTfulExample
-
<pre>
+
|title=Found Profile
-
HTTP Status: 200 OK
+
|summary=This demonstrates a successful fetch profile request where a profile was found.
-
<?xml version="1.0" encoding="UTF-8" ?>
+
|responsecode=200 OK
 +
|response=<?xml version="1.0" encoding="UTF-8" ?>
<result ver="ePrize Web Services 1.0">
<result ver="ePrize Web Services 1.0">
<result>
<result>
Line 23: Line 22:
<status>1</status>
<status>1</status>
</result>
</result>
-
</pre>
+
}}
-
Response (Failure - Profile with UID doesn't exist)
+
{{RESTfulExample
-
<pre>
+
|title=Profile with UID Not Found
-
HTTP Status: 404 Not Found
+
|summary=This demonstrates a fetch profile request where no profile could be found for the given UID.
-
<?xml version="1.0" encoding="UTF-8" ?>
+
|responsecode=404 Not Found
 +
|response=<?xml version="1.0" encoding="UTF-8" ?>
<result ver="ePrize Web Services 1.0">
<result ver="ePrize Web Services 1.0">
<result></result>
<result></result>
<status>1</status>
<status>1</status>
</result>
</result>
 +
}}
 +
 +
 +
<pre>
 +
Response:
 +
awards: /v1/{apikey}/profile/{uid}/awards,
 +
tokens: /v1/{apikey}/profile/{uid}/tokens,
</pre>
</pre>
- 
-
Only key:value pairs marked as safe for display will be returned. The {apikey} defines which keys are safe and the client may not change them except by requesting a new {apikey}. This allows clients to easily handle personalization, but minimizes the risk of exposing PII with a programming error. Full profiles are available through the Analytics "profile download" service.
 

Revision as of 15:36, 18 March 2009

API Home Page :: Profiles

Summary

Only key:value pairs marked as safe for display will be returned. The {apikey} defines which keys are safe and the client may not change them except by requesting a new {apikey}. This allows clients to easily handle personalization, but minimizes the risk of exposing PII with a programming error. Full profiles are available through the Analytics "profile download" service.





Example: Found Profile

Summary

This demonstrates a successful fetch profile request where a profile was found.


Response

HTTP Status Code: 200 OK


<?xml version="1.0" encoding="UTF-8" ?>
<result ver="ePrize Web Services 1.0">
  <result>
    <profile>
      <id>{uid}</id>
      <email>some.email@address.com</email>
      <safekey1>safekey1-value</safekey1>
      <safekey2>safekey2-value</safekey2>
      ...
      <safekeyN>safekeyN-value</safekeyN>
    </profile>
  </result>
  <status>1</status>
</result>


Example: Profile with UID Not Found

Summary

This demonstrates a fetch profile request where no profile could be found for the given UID.


Response

HTTP Status Code: 404 Not Found


<?xml version="1.0" encoding="UTF-8" ?>
<result ver="ePrize Web Services 1.0">
  <result></result>
  <status>1</status>
</result>



Response:
awards: /v1/{apikey}/profile/{uid}/awards,
tokens: /v1/{apikey}/profile/{uid}/tokens,
Personal tools