Aspects

Available methods:

See also:

Get lists of aspects

Required API scope: contacts:read

Request

GET /api/v1/aspects

Response

[
  {
    "id": 1,
    "name": "Family",
    "order": 1
  },
  {
    "id": 2,
    "name": "Friends",
    "order": 2
  }
]

Get information about an aspect

Required API scope: contacts:read

Request

GET /api/v1/aspects/:aspect_id

Response

{
  "id": 1,
  "name": "Family",
  "order": 1,
  "chat_enabled": true
}

Create new aspect

Required API scope: contacts:modify

Request

POST /api/v1/aspects
{
  "name": "diaspora developers",
  "chat_enabled": true
}

Response

{
  "id": 3,
  "name": "diaspora developers",
  "order": 4,
  "chat_enabled": true
}

Edit an aspect

Required API scope: contacts:modify

Request

PATCH /api/v1/aspects/:aspect_id
{
  "name": "diaspora community"
}

Parameters

Name Type Description
chat_enabled boolean Whether the chat is enabled for this aspect or not.
name string The aspects name.
order integer The aspects position in the aspect list. If provided, the aspect will get inserted into the given position and other aspects will be reordered.

Response

{
  "id": 3,
  "name": "diaspora community",
  "order": 4,
  "chat_enabled": true
}

Delete an aspect

Required API scope: contacts:modify

Request

DELETE /api/v1/aspects/:aspect_id

Response

Status: 204 No Content