Users REST API

  • Description – these interfaces are used for managing UFM users by getting, creating, updating, and deleting them

  • Request URL – /ufmRest/app/users

  • Main Operations

    • Get all users

    • Get a user by name

    • Create a user

    • Update a user

    • Delete a user

    Warning

    Note that in UFM Appliance, only TENANT users can be managed.

  • Description – lists all users in UFM

  • Request URL – GET /ufmRest/app/users

  • Request Content Type – Application/json

  • Response

    Copy
    Copied!
                

    [ { "name": "admin-3", "group": "System_Admin", "id": 3 }, { "name": "tenant-1", "group": "Tenant", "id": 4 } ]

  • Status Codes

    • 200 – OK

  • Description – fet a specific user using its name

  • Request URL – GET /ufmRest/app/users/<name>

  • Request Content Type – Application/json

  • Response

    Copy
    Copied!
                

    { "name": "admin", "group" "System_Admin", "id": "1" }

  • Status Codes

    • 200 – OK

    • 404 – NOT FOUND

  • Description – creates a new user

  • Request URL – POST /ufmRest/app/users

  • Request Content Type – Application/json

  • Request Data Parameters

    Name

    Values

    Default

    Description

    Mandatory/
    Optional

    name

    String.
    Minimum length is 4.
    Maximum length is 30, composed of alphanumeric characters and "_", "-".

    None

    Name of user

    Mandatory

    group

    String. One of the following:

    • "System_Admin",

    • "Fabric_Admin",

    • "Fabric_Operator",

    • "Monitoring_Only",

    • "Tenant"

    None

    Name of group

    Mandatory

    password

    String.
    Minimum length is 4.
    Maximum length is 30, composed of alphanumeric and "_" characters

    None

    User’s password

    Mandatory

  • Request Data Example

    Copy
    Copied!
                

    { "name": "ufm-tenant", "group": "Tenant", "password": "655478" }

  • Response

    Copy
    Copied!
                

    { "name": "ufm-tenant" }

  • Status Codes

    • 200 – OK

    • 400 – BAD REQUEST

  • Description – updates user’s password

  • Request URL – PUT /ufmRest/app/users/<name>

  • Request Content Type – Application/json

  • Request Data Parameters

    Name

    Values

    Default

    Description

    Mandatory/
    Optional

    password

    String.
    Minimum length is 4.
    Maximum length is 30, composed of alphanumeric and "_" characters

    None

    User’s password

    Mandatory

  • Request Data Example

    Copy
    Copied!
                

    { "password": "45364nnfgd" }

  • Response – returns the username in the response body. Example:

    Copy
    Copied!
                

    { "name": "admin" }

  • Status Codes

    • 200 – OK

    • 400 – BAD REQUEST

  • Description – deletes an existing user. Note that “admin” user cannot be deleted.

  • Request URL – DELETE /ufmRest/app/users/<name>

  • Request Content Type – Application/json

  • Response – N/A

  • Status Codes

    • 204 – NO CONTENT

    • 400 – BAD REQUEST

    • 404 – NOT FOUND

© Copyright 2023, NVIDIA. Last updated on Sep 4, 2023.