List domains that CertCentral knows about. You can filter by
    container_id (also known as "Division") by passing a container_id.

    CLI Example:

    .. code-block:: bash

        salt-run digicert.list_domains

def list_domains(container_id=None):
    '''
    List domains that CertCentral knows about. You can filter by
    container_id (also known as "Division") by passing a container_id.

    CLI Example:

    .. code-block:: bash

        salt-run digicert.list_domains
    '''
    if container_id:
        url = '{0}/domain?{1}'.format(_base_url(), container_id)
    else:
        url = '{0}/domain'.format(_base_url())

    orgs = _paginate(url,
                     "domains",
                     method='GET',
                     decode=True,
                     decode_type='json',
                     header_dict={
                         'X-DC-DEVKEY': _api_key(),
                         'Content-Type': 'application/json',
                     }
    )

    ret = {'domains': orgs}
    return ret