ASI/channels

GET ^top

Lists channels. Parameters are optional but only one kind of listing (either search or by person id or by group id) is possible at a time. Only channels that current user has access to are listed.

Parameters

include_private

Include private channels in the results. Defaults to false.

type_filter

Restrict the results to one type of channel. This parameter overrides include_private. Parameter can be negated by prefixing with '!' e.g. type_filter=!friend returns all channels except those of type 'friend'.

Access

Application

Returns

  • 200 - OK

Response example


{
  "entry": [
    {
      "name": "Chanel 9",
      "channel_type": null,
      "created_at": null,
      "updated_at": null,
      "owner_id": "cqiyrE6Cir4juJeJfcaj6R",
      "id": "cqeZJQ6Cir4juJeJfcaj6R",
      "message_count": 0,
      "owner_name": "Essi Esimerkki",
      "updated_by": {
        "name": "Essi Esimerkki",
        "link": {
          "href": "/people/cqiyrE6Cir4juJeJfcaj6R/@self"
        }
      },
      "description": "Hethethethethethe",
      "hidden": false
    },
    {
      "name": "Chanel 10",
      "channel_type": null,
      "created_at": null,
      "updated_at": null,
      "owner_id": "cqsC-A6Cir4juJeJfcaj6R",
      "id": "cqsB6i6Cir4juJeJfcaj6R",
      "message_count": 0,
      "owner_name": "Essi Esimerkki",
      "updated_by": {
        "name": "Essi Esimerkki",
        "link": {
          "href": "/people/cqsC-A6Cir4juJeJfcaj6R/@self"
        }
      },
      "description": "Hethethethethethe",
      "hidden": false
    }
  ]
}
            

POST ^top

Creates a channel. Parameters are optional except name. Current user is set to channel owner and current client is set to creator_app. Owner is subscribed to the channel (except for group channels).

Channel description.

Parameters

channel
channel_type

Currently public, group, friend and private channels are supported. Default is public.

name

Channel name. Must be at least two characters long.

group_id

A single group's id which is then subscribed to the channel if channel_type == 'group'. Current user must have admin rights to that group.

person_id

A single person's id which is then subscribed to the channel if channel_type == 'private'.

description

Channel description.

hidden

Whether the channel shows up in listings and searches (irrespective of the access controls determined by channel_type). Defaults to false.

Access

Application

Returns

  • 200 - OK

Response example


{
  "entry": {
    "name": "Chanel 11",
    "channel_type": null,
    "created_at": null,
    "updated_at": null,
    "owner_id": "cqtTY66Cir4juJeJfcaj6R",
    "id": "cqtSWG6Cir4juJeJfcaj6R",
    "message_count": 0,
    "owner_name": "Essi Esimerkki",
    "updated_by": {
      "name": "Essi Esimerkki",
      "link": {
        "href": "/people/cqtTY66Cir4juJeJfcaj6R/@self"
      }
    },
    "description": "Hethethethethethe",
    "hidden": false
  }
}
            

SUBRESOURCES ^top