On this page

    Create and Update Tags and Wiki for a Catalog

    This API creates and updates Tags and Wiki content for a catalog entity.

    Syntax

    POST /catalog/{id}/collaboration
    
    OperationURI
    Creates and updates Tags for a catalog entity.POST /api/v3/catalog/{id}/collaboration/tag
    Creates Wiki content for a catalog entity.POST /api/v3/catalog/{id}/collaboration/wiki

    Request Input

    Tags

    Sets a list of tags for the entity.

    • Tag updates are done in bulk as there is no need for per-item updates right now.
    • If there is a duplicate tag, the entire call fails.
    • The version option (optional) and can be used for concurrency checks.
    {
      tags: String[],
      version: String
    }
    

    Wikis

    • The version option is only required if a wiki already exists, else it can be omitted.
    {
      text: String,
      version: String
    }
    

    Response Codes

    Tags

    400 - Invalid payload - tag doesn’t validate.
    403 - User does not have WRITE access to the entity.
    404 - Catalog entity not found.
    409 - A tag specified already exists.

    Wikis

    400 - Invalid payload (wiki text doesn’t validate).
    403 - User does not have WRITE access to the entity.
    404 - Catalog entity not found.
    409 - A newer version already exists.

    Example: Update Tags

    The following curl example updates a tag by setting a new tag. This request uses the catalog ID, 7c9788ba-ead3-441f-940d-aa1a9396e87c, which is used in the Examples for retrieving Tags/Wiki content.

    curl -X POST \
    -H "Content-Type: application/json" \
    -H "Authorization: _dremioaj0a7eakllnorhjrcuvocha2fh" \
    http://localhost:9047/api/v3/catalog/7c9788ba-ead3-441f-940d-aa1a9396e87c/collaboration/tag \   
    -d '{"tags": ["newtag","anothernewtag"], "version":11}' 
    

    Response:

    {
       "tags":[
          "newtag",
          "anothernewtag"
       ],
       "version":12
    }
    

    Example: Update Wiki content

    The following curl example updates the wiki for a catalog entry using the version number option. This request uses the catalog ID, 7c9788ba-ead3-441f-940d-aa1a9396e87c, which is used in the Examples for retrieving Tags/Wiki content.

    curl -X POST \
    -H "Content-Type: application/json" \
    -H "Authorization: _dremioaj0a7eakllnorhjrcuvocha2fh" \
    http://localhost:9047/api/v3/catalog/7c9788ba-ead3-441f-940d-aa1a9396e87c/collaboration/wiki \
    -d '{"text": "This is new wiki content", "version": 3}' 
    

    Response:

    {  
       "text":"This is new wiki content",
       "version":4
    }