Tutorial: fdc3.getSystemChannels

fdc3.getSystemChannels

Returns the Interop-Broker-defined channels available for an entity to join.

This is a wrapper for interop.getContextGroups.

response

[
    {
        id: 'green',
        displayMetadata: {
            color: '#00CC88',
            name: 'green'
        }
    },
    {
        id: 'purple',
        displayMetadata: {
            color: '#8C61FF',
            name: 'purple'
        }
    },
    {
        id: 'orange',
        displayMetadata: {
            color: '#FF8C4C',
            name: 'orange'
        }
    },
    {
        id: 'red',
        displayMetadata: {
            color: '#FF5E60',
            name: 'red'
        }
    },
    {
        id: 'pink',
        displayMetadata: {
            color: '#FF8FB8',
            name: 'pink'
        }
    },
    {
        id: 'yellow',
        displayMetadata: {
            color: '#E9FF8F',
            name: 'yellow'
        }
    }
];

Example

fdc3.getSystemChannels()
        .then(channels => {
            channels.forEach(channel => {
                console.log(channel.displayMetadata.name)
                console.log(channel.displayMetadata.color)
            })
        })