Networking NVIDIA UFM Cable Validation Tool

Users Management APIs

Get All Users

  • Description – get all users.

  • Request URL – GET /cablevalidation/users

  • Request Content Type – application/json

  • Status Codes

    • 200 – OK

    • 500 – INTERNAL SERVER ERROR 

  • Response Data Example 

    \[
        \{
            "name": "admin",
            "account_type": "admin"
        \}
    \]

Get User

  • Description – get user by the given name.

  • Request URL – GET /cablevalidation/users/<user_name>

  • Request Content Type – application/json

  • Status Codes

    • 200 – OK

    • 404 – NOT FOUND

  • Response Data Example 

    {
    "name": "admin",
    "account_type": "admin"
    }
    

Create User

  • Description – create user.

  • Request URL – POST /cablevalidation/users

  • Request Content Type – application/json

  • Request Data Example 

    {"account_type":"cabler","password":"user1","name":"user1"}
     

  • Status Codes

    • 201 – CREATED

    • 500 – INTERNAL SERVER ERROR

    • 400 – BAD REQUEST

  • Response - 201: Created


Update User

  • Description – update user, it updates account type or password or both.

  • Request URL – PATCH /cablevalidation/users/<user_name>

  • Request Content Type – application/json

  • Request Data Example 

     {"account_type":"nvidia","password":"test"} 

  • Status Codes  

    • 204 – NO CONTENT

    • 500 – INTERNAL SERVER ERROR

    • 400 – BAD REQUEST

  • Response - NA

Delete User

  • Description – delete user by the given name.

  • Request URL – DELETE /cablevalidation/users/<user_name>

  • Request Content Type – application/json

  • Status Codes

    • 204 – NO CONTENT

    • 500 – INTERNAL SERVER ERROR

  • Response - NA

Get Account Types

  • Description – get user account types.

  • Request URL – GET /cablevalidation/users/account_types

  • Request Content Type – application/json

  • Status Codes

    • 200 – OK

    • 500 – INTERNAL SERVER ERROR

  • Response Data Example  

    \["nvidia", "admin", "cabler", "developer"\]

Last updated: