Fetch profile

From ePrize Developers Wiki

(Difference between revisions)
Jump to: navigation, search
(New page: <pre> Response: 200 OK uid: {uid}, {profilekey}: {profilevalue}, awards: /v1/{apikey}/profile/{uid}/awards, tokens: /v1/{apikey}/profile/{uid}/tokens, {safekey1}:{value1}, {safekey2}:{valu...)
Current revision (15:52, 6 April 2011) (edit) (undo)
 
(10 intermediate revisions not shown.)
Line 1: Line 1:
-
<pre>
+
{{RESTfulAPI
-
Response:
+
|crumbs=[[API Home Page]] :: [[Profiles]]
-
200 OK
+
|summary=Fetch a profile by a [[API_Request/Response#Canonical_URLs|canonical profile URL]]. A profile URL is returned after [[Create_profile|creating a profile]] or from a [[Fetch_profile_by_key|profile search]].
-
uid: {uid},
+
-
{profilekey}: {profilevalue},
+
-
awards: /v1/{apikey}/profile/{uid}/awards,
+
-
tokens: /v1/{apikey}/profile/{uid}/tokens,
+
-
{safekey1}:{value1},
+
-
{safekey2}:{value2},
+
-
...
+
-
{safekeyN}:{valueN}
+
-
Response if profile with UID doesn't exist:
+
Only key:value pairs marked as safe for display (public) 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.
-
404 Not Found
+
-
</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.
+
|resource=/v1/{apikey}/profile/{uid}.{webkey}
 +
|methods=GET
 +
|resourceargs=A profile URL should be stored after a [[Create_profile|creating a profile]] or found via a [[Fetch_profile_by_key|profile search]]. Do not attempt to create a profile URL by constructing from variables.
 +
 
 +
|paramsrequired=None required
 +
}}
 +
 
 +
{{RESTfulExample
 +
|title=Found Profile
 +
|summary=This demonstrates a successful fetch profile request where a profile was found.
 +
|responsecode=200 OK
 +
|response=<?xml version="1.0" encoding="UTF-8" ?>
 +
<result ver="1.0">
 +
<profile>
 +
<id>{profile-number}</id>
 +
<email>some.email@address.com</email>
 +
<public1>public-value1</public1>
 +
<public2>public-value2</public2>
 +
...
 +
<publicN>public-valueN</publicN>
 +
</profile>
 +
</result>
 +
}}
 +
 
 +
{{RESTfulExample
 +
|title=Profile with UID Not Found
 +
|summary=This demonstrates a fetch profile request where no profile could be found for the given UID.
 +
|responsecode=404 Not Found
 +
|response=<?xml version="1.0" encoding="UTF-8" ?>
 +
<result ver="1.0">
 +
<status>0</status>
 +
</result>
 +
}}

Current revision

API Home Page :: Profiles

Summary

Fetch a profile by a canonical profile URL. A profile URL is returned after creating a profile or from a profile search.

Only key:value pairs marked as safe for display (public) 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.

Resource

/v1/{apikey}/profile/{uid}.{webkey}

Valid Methods

GET

Resource Arguments

Note: resource arguments are always required.

A profile URL should be stored after a creating a profile or found via a profile search. Do not attempt to create a profile URL by constructing from variables.

Parameters Required

None required



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="1.0">
  <profile>
    <id>{profile-number}</id>
    <email>some.email@address.com</email>
    <public1>public-value1</public1>
    <public2>public-value2</public2>
    ...
    <publicN>public-valueN</publicN>
  </profile>
</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="1.0">
  <status>0</status>
</result>


Personal tools