def get_url(key, **kwargs):
    """Get and format the url for the given key.
    """
    urls = {
        'disk folder': u'/disks',  # GET -> list; POST -> add
        'disk force': u'/disks/force',  # POST -> force add
        'disk info': u'/disks/{name}',  # DELETE -> remove; PUT -> update
        'get disk': u'/disks/archive/{name}.{ext}',  # GET-> disk archive
        'tree disk': u'/disks/tree/{name}',  # GET -> ls on the disk
        'link disk': u'/disks/link/{name}',  # POST -> create links
        'move disk': u'/disks/move/{name}',  # POST -> create links
        'ls disk': u'/disks/list/{name}/{path}',  # GET -> ls on the dir {path}
        'update file': u'/disks/{name}/{path}',  # POST -> add file; GET -> download file; DELETE -> remove file; PUT -> update file settings
        'tasks': u'/tasks',  # GET -> running tasks; POST -> submit task
        'tasks summaries': u'/tasks/summaries',  # GET -> running tasks summaries;
        'task force': u'/tasks/force',  # POST -> force add
        'task update': u'/tasks/{uuid}',  # GET->result; DELETE -> abort, PATCH -> update resources
        'task snapshot': u'/tasks/{uuid}/snapshot/periodic',  # POST -> snapshots
        'task instant': u'/tasks/{uuid}/snapshot',  # POST -> get a snapshot
        'task stdout': u'/tasks/{uuid}/stdout',  # GET -> task stdout
        'task stderr': u'/tasks/{uuid}/stderr',  # GET -> task stderr
        'task abort': u'/tasks/{uuid}/abort',  # GET -> task
        'pools': u'/pools',  # GET -> pools, POST -> submit pool
        'pools summaries': u'/pools/summaries',  # GET -> pools summaries
        'pool close': u'/pools/{uuid}/close',  # POST -> close pool
        'pool update': u'/pools/{uuid}',  # GET -> pool, DELETE -> close & delete
        'user': u'/info',  # GET -> user info
        'profiles': u'/profiles',  # GET -> profiles list
        'profile details': u'/profiles/{profile}',  # GET -> profile details
        'settings': u'/settings',  # GET -> instance settings
    }
    return urls[key].format(**kwargs)