-
Notifications
You must be signed in to change notification settings - Fork 1
Profile
Borja Gorriz edited this page Sep 23, 2013
·
3 revisions
Base URL: api/dime/rest/{mainSaId}/profile
| Method | Path | Description |
| GET | /{personId}/@all | Returns a collection of all profile AND profilecards the user has. |
| POST | @me | Creates a new profile OR profile card. |
| GET | /{personId}/{Pid} | Returns a specific profile OR profile card. |
| POST | /{personId}/{Pid} | Updates a specific profile OR profile card. |
| DELETE | /{personId}/{Pid} | Deletes a specific profile OR profile card. |
| GET | @me/@all/shared?sharedWithAgent={agentId} | Returns all the profiles OR profile cards shared with a specific agent |
| GET | @me/@all/shared?sharedWithService={serviceId} | Returns all the profiles OR profile shared with a specific service |
Parameters:
- personId: Id of an specific person. It includes @me.
- Pid: Id of an specific profile OR profile card.
- agentId: Id of a specific agent.
- serviceId: Id of a specific service.
Examples:
- Call: api/dime/rest/5b223cde-07e5-4987-b531-231876fa7601/profile/@me/@all
- Response:
{
"response":{
"meta":{
"v":"0.9",
"status":"OK",
"code":200,
"timeRef":"2011-08-30T15:01:59+02:00",
"msg": ""
},
"data":{
"startIndex":0,
"itemsPerPage":2,
"totalResults":2,
"entry": [
{
"guid": "p_<profileId>",
"created": 1338824999,
"lastModified":1338824999,
"name": "Business-Profile",
"userId":"<userId>|@me",
"imageUrl": "<imageUrl>",
"type": "profile",
"editable":true/false
"items": [
profileAttrId1,
profileAttrId2],
"said": "<serviceAccountId>|@me"
},
{
"guid": "pc_<profilecardId>",
"created": 1338824999,
"lastModified":1338824999,
"name": "profilecard name",
"userId":"<userId>|@me",
"imageUrl": "<imageUrl>",
"type": "profile",
"editable": true,
"items": [
profileAttrId1,
profileAttrId2],
"said": "AccountId",
"nao:includes": [
{
"saidSender":"jdaspojsd39023",
"groups": [groupId, ...],
"persons": [
{"personId":"392a", "saidReceiver":”fweo634ifwo},
{...}
] ,
"services": ["serviceId",...]
},
{
...
}
],
"nao:excludes": [
],
]
}
}