def get_instance_contents(instance_url, instance_key, instance_session, instance_name=''):
    instance_contentIds = []
    instance_content_url = get_content_path(instance_url, instance_key)
    instance_contents = instance_session.get(instance_content_url)
    if (instance_contents.status_code != 200):
        logger.error('instance{} server error - response {}'.format(instance_name, instance_contents.status_code))
        exit_system()
    else:
        try:
            instance_contents = instance_contents.json()
        except:
            logger.error(f'Could not decode contents from {instance_content_url}')
            exit_system()
    for content_to_sync in instance_contents:
        instance_contentIds.append(content_to_sync[content_id_key])
    logger.debug('{} contents in instance {}'.format(len(instance_contentIds), instance_name))
    return (instance_contents, instance_contentIds)
def get_instance_contents(instance_url, instance_key, instance_session, instance_name=):
    instance_contentIds = []
    instance_content_url = get_content_path(instance_url, instance_key)
    instance_contents = instance_session.get(instance_content_url)
    if (instance_contents.status_code != 200):
        logger.error('instance{} server error - response {}'.format(instance_name, instance_contents.status_code))
        exit_system()
    else:
        try:
            instance_contents = instance_contents.json()
        except:
            logger.error(f'Could not decode contents from {instance_content_url}')
            exit_system()
    for content_to_sync in instance_contents:
        instance_contentIds.append(content_to_sync[content_id_key])
    logger.debug('{} contents in instance {}'.format(len(instance_contentIds), instance_name))
    return (instance_contents, instance_contentIds)