PeopleAggregator API: method peopleaggregator.getPersona

Arguments | Return value | REST (XML) example | REST (JSON) example | XML-RPC example

Method: peopleaggregator.getPersona

Get a user's persona by index.

Arguments (see also Authentication)

If calling by XML-RPC, note that this method takes a single struct as input, with the following keys:

authToken

Type: string
An authentication token
Example: as9d867f234o7asdf:928734982734987234:298374982734987234

index

Type: int
The zero based index of the persona to retrieve
Example: 0

Return value (see also Exceptions)

Type: hash

Attributes:

success

Type: boolean
true if the persona list request was processed successfully, or false if an error occurred
Example: True

persona

Type: hash

Attributes:

persona_id

Type: int
Persona ID
Example: 123

user_id

Type: int
User ID
Example: 123

persona_service_id

Type: int
Persona Service ID
Example: 123

sequence

Type: int
Sequence
Example: 1

name

Type: string
Persona Name
Example: My MySpace Persona

configuration

Type: string
JSON Persona Configuration
Example: json

Example REST (XML) request

Request

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 498

<response>
 <persona>
  <user_id>123</user_id>
  <name>My MySpace Persona</name>
  <sequence>1</sequence>
  <persona_service_id>123</persona_service_id>
  <configuration>json</configuration>
  <persona_id>123</persona_id>
 </persona>
 <success>true</success>
</response>

Example REST (JSON) request

Request

Response

HTTP/1.1 200 OK
Content-Type: application/x-javascript
Content-Length: 162

{"persona": {"user_id": 123, "name": "My MySpace Persona", "sequence": 1, "persona_service_id": 123, "configuration": "json", "persona_id": 123}, "success": true}

Example XML-RPC call

Request

POST /api/xmlrpc HTTP/1.1
Content-Type: text/xml
Content-Length: 1016

<?xml version='1.0'?>
 <methodCall>
  <methodName>peopleaggregator.getPersona</methodName>
  <params>
   <param>
    <value><struct>
     <member>
      <name>authToken</name>
      <value><string>as9d867f234o7asdf:928734982734987234:298374982734987234</string></value>
     </member>
     <member>
      <name>index</name>
      <value><int>0</int></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodCall>
 

Response

HTTP/1.1 200 OK
Content-Type: text/xml
Content-Length: 2865

<?xml version='1.0'?>
 <methodResponse>
  <params>
   <param>
    <value><struct>
     <member>
      <name>persona</name>
      <value><struct>
       <member>
        <name>user_id</name>
        <value><int>123</int></value>
       </member>
       <member>
        <name>name</name>
        <value><string>My MySpace Persona</string></value>
       </member>
       <member>
        <name>sequence</name>
        <value><int>1</int></value>
       </member>
       <member>
        <name>persona_service_id</name>
        <value><int>123</int></value>
       </member>
       <member>
        <name>configuration</name>
        <value><string>json</string></value>
       </member>
       <member>
        <name>persona_id</name>
        <value><int>123</int></value>
       </member>
      </struct></value>
     </member>
     <member>
      <name>success</name>
      <value><boolean>1</boolean></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodResponse>