hbp_service_client/storage_service/api.py
def get_signed_url(self, file_id):
        '''Get a signed unauthenticated URL.

        It can be used to download the file content without the need for a
        token. The signed URL expires after 5 seconds.

        Args:
            file_id (str): The UUID of the file to get the link for.

        Returns:
            The signed url as a string

        Raises:
            StorageArgumentException: Invalid arguments
            StorageForbiddenException: Server response code 403
            StorageNotFoundException: Server response code 404
            StorageException: other 400-600 error codes
        '''
        if not is_valid_uuid(file_id):
            raise StorageArgumentException(
                'Invalid UUID for file_id: {0}'.format(file_id))

        return self._authenticated_request \
            .to_endpoint('file/{}/content/secure_link/'.format(file_id)) \
            .return_body() \
            .get()['signed_url']
def get_signed_url(self, file_id):
        '''Get a signed unauthenticated URL.

        It can be used to download the file content without the need for a
        token. The signed URL expires after 5 seconds.

        Args:
            file_id (str): The UUID of the file to get the link for.

        Returns:
            The signed url as a string

        Raises:
            StorageArgumentException: Invalid arguments
            StorageForbiddenException: Server response code 403
            StorageNotFoundException: Server response code 404
            StorageException: other 400-600 error codes
        '''
        if not is_valid_uuid(file_id):
            raise StorageArgumentException(
                'Invalid UUID for file_id: {0}'.format(file_id))

        return self._authenticated_request \
            .to_endpoint('file/{}/content/secure_link/'.format(file_id)) \
            .return_body() \
            .get()['signed_url']
Get a signed unauthenticated URL.

        It can be used to download the file content without the need for a
        token. The signed URL expires after 5 seconds.

        Args:
            file_id (str): The UUID of the file to get the link for.

        Returns:
            The signed url as a string

        Raises:
            StorageArgumentException: Invalid arguments
            StorageForbiddenException: Server response code 403
            StorageNotFoundException: Server response code 404
            StorageException: other 400-600 error codes