PeopleAggregator API: method peopleaggregator.newPersona

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

Method: peopleaggregator.newPersona

Creates a new persona.

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

name

Type: string
Persona name
Example: my-picture.jpg

persona_service_id

Type: int
Persona service id
Example: 123

sequence

Type: int
Sequence number
Example: 1

configuration

Type: string
JSON persona configuration
Example: json

Return value (see also Exceptions)

Type: hash

Attributes:

success

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

persona_id

Type: int
Persona ID
Example: 123

Example REST (XML) request

Request

POST /api/xml/peopleaggregator/newPersona HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 142

authToken=as9d867f234o7asdf%3A928734982734987234%3A298374982734987234&persona_service_id=123&configuration=json&name=my-picture.jpg&sequence=1

Response

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

<response>
 <persona_id>123</persona_id>
 <success>true</success>
</response>

Example REST (JSON) request

Request

POST /api/json/peopleaggregator/newPersona HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 142

authToken=as9d867f234o7asdf%3A928734982734987234%3A298374982734987234&persona_service_id=123&configuration=json&name=my-picture.jpg&sequence=1

Response

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

{"persona_id": 123, "success": true}

Example XML-RPC call

Request

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

<?xml version='1.0'?>
 <methodCall>
  <methodName>peopleaggregator.newPersona</methodName>
  <params>
   <param>
    <value><struct>
     <member>
      <name>authToken</name>
      <value><string>as9d867f234o7asdf:928734982734987234:298374982734987234</string></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>name</name>
      <value><string>my-picture.jpg</string></value>
     </member>
     <member>
      <name>sequence</name>
      <value><int>1</int></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodCall>
 

Response

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

<?xml version='1.0'?>
 <methodResponse>
  <params>
   <param>
    <value><struct>
     <member>
      <name>persona_id</name>
      <value><int>123</int></value>
     </member>
     <member>
      <name>success</name>
      <value><boolean>1</boolean></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodResponse>