def createDefinition(samweb, defname, dims, user=None, group=None, description=None):
    """ Create a new dataset definition
    arguments:
        definition name
        dimensions string
        user: username (default None)
        group: group name (default None)
        description: description of new definition (default None)
    """

    params = { "defname": defname,
             "dims": dims,
             "group": group or samweb.group,
             }
    if description:
        params["description"] = description
    if user:
        params["user"] = user

    result = samweb.postURL('/definitions/create', params, secure=True)
    return result.json()