List Streams for Enterprise

Returns a list of all the streams (IMs, chatrooms, Wall posts as well as streams reserved for internal use) for the calling user's company, sorted by creation date (ascending – oldest to newest).

Filtering parameters can be used to narrow the list of streams that are returned. For more information, refer to the Filtering Returned Streams section below.

Retrieve all the streams across the enterprise where the membership of the stream has been modified between a given time range

POSTyourpodURL.symphony.com/pod/v2/admin/streams/list
Query parameters
Header parameters
Body

Stream filtering criteria.

streamTypesarray of V2AdminStreamType (object)

type of streams to search for

scopestring

Scope of the room. Valid values are INTERNAL or EXTERNAL. If not specified, it will include both Internal and External scope

originstring

Origin of the room. It indicates whether the room was created by a user within the company by another company. Valid values are INTERNAL or EXTERNAL. If not specified, it will include both Internal and External origin

statusstring

Status of the room. Valid values are ACTIVE or INACTIVE. If not specified, it will include both Active and Inactive status

privacystring

Privacy setting of the stream. Valid values are PUBLIC or PRIVATE. If not specified, it will include both public and private streams

startDateinteger (int64)

Start date in unix timestamp in millseconds

endDateinteger (int64)

End date in unix timestamp in millseconds. If not specified, it assume to be current time.

Response

OK

Body
countinteger (int64)

total number of streams which match the filter criteria

skipinteger

number of streams skipped

limitinteger

maximum number of streams return

filterV2AdminStreamFilter (object)

stream filter criteria

streamsV2AdminStreamInfoList (array of V2AdminStreamInfo (object))

list of stream info

Request
const response = await fetch('yourpodURL.symphony.com/pod/v2/admin/streams/list', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "count": 4,
  "limit": 50,
  "filter": {
    "streamTypes": [
      {
        "type": "IM"
      },
      {
        "type": "ROOM"
      }
    ],
    "scope": "INTERNAL",
    "origin": "INTERNAL",
    "status": "ACTIVE",
    "privacy": "PRIVATE",
    "startDate": 1481575056047,
    "endDate": 1483038089833
  },
  "streams": [
    {
      "id": "Q2KYGm7JkljrgymMajYTJ3___qcLPr1UdA",
      "isExternal": false,
      "isActive": true,
      "isPublic": false,
      "type": "ROOM",
      "attributes": {
        "roomName": "Active Internal Private Room",
        "roomDescription": "Active Internal Private Room",
        "createdByUserId": 8933531975689,
        "createdDate": 1481575056047,
        "lastModifiedDate": 1481575056047,
        "originCompany": "Symphony",
        "originCompanyId": 130,
        "membersCount": 1,
        "lastMessageDate": 1516699467959
      }
    },
    {
      "id": "_KnoYrMkhEn3H2_8vE0kl3___qb5SANQdA",
      "isExternal": true,
      "isActive": false,
      "isPublic": false,
      "type": "ROOM",
      "attributes": {
        "roomName": "Inactive External Room",
        "roomDescription": "Inactive External Room",
        "createdByUserId": 8933531975686,
        "createdDate": 1481876438194,
        "lastModifiedDate": 1481876438194,
        "originCompany": "Symphony",
        "originCompanyId": 130,
        "membersCount": 2,
        "lastMessageDate": 1516699467959
      }
    }
  ]
}

Request Example

curl -X POST \
https://acme.symphony.com/pod/v2/admin/streams/list \
    -H 'Content-Type: application/json' \ 
    -H 'sessionToken: SESSION_TOKEN' \ 
    -d '{
          "streamTypes": [
            {"type": "IM"},
            {"type": "MIM"},
            {"type": "ROOM"},
            {"type": "POST"}
          ]
        }'

🚧 Required Permissions

This endpoint may only be called by Service User accounts with the User Provisioning role.

Note: visit Overview for an overview of streams.

Filtering Returned Streams

You can filter the streams that are returned by specifying optional body parameters.

For instance, the filter below would return active external chatrooms created by users who do not belong to your firm, created between Mon, 12 Dec 2016 20:37:36.047 GMT and Thu, 29 Dec 2016 19:01:29.833 GMT.

{
	"streamTypes": [{"type": "ROOM"}],
	"scope": "EXTERNAL",
	"origin": "EXTERNAL",
	"privacy": "PRIVATE",
	"status": "ACTIVE",
	"startDate": 1481575056047,
	"endDate": 1483038089833
}

📘 lastMessageDate

This is the date that the last message was sent in that room. The time is in epoch format.

📘 Scope vs. Origin

The scope property refers to the participants of the room: whether the room contains only users within the company (internal scope) or whether the room contains users within the company as well as users belonging to another company (external scope). The scope property can apply to IMs and MIMs as well.

The origin property applies only to rooms with external scope. Origin refers to the creator of the room with external scope: whether the room was created by a user of the company (internal origin) or whether the room was created by a user belonging to another company (external origin).

A room with external scope and internal origin would be a room created by a user within the company, where members can belong to both the origin company and one other company.

The response has defined variable "isExternal", and for external scope, can have two values {true, false}. This value is false, whenever the stream is created by an internal user.

📘 Privacy

The privacy property applies only to rooms with internal scope. It refers to the privacy setting of the internal room: whether members (who must belong to the same company) must be added to the room or whether anyone in the company can find and join the room.

External rooms are always private - members must be added to the room.

📘 Date Range Filter

The startDate and endDate properties can be used to filter the list of streams to return only streams that were modified within the specified time range.

For rooms, modification entails a change of room properties (ex. name or description updated, settings changed) or a change in room membership (ex. users added/removed, roles changed). Modification does not include message activity.

IMs and MIMs are immutable - there can be no membership changes or properties changes. Therefore, filtering is performed upon the stream creation date.

If neither startDate nor endDate are specified, all rooms since the beginning of the enterprise's time until the time of call are returned.

If startDate is specified, but not endDate, all rooms modified since the startDate until the time of call are returned.

If endDate is specified, but not startDate, all rooms modified since the beginning of the enterprise's time until the endDate are returned.

Last updated