All pages
Powered by GitBook
1 of 1

Loading...

MaxScale 22.08 Admin User Resource

Admin User Resource

Admin User Resource

Admin users represent administrative users that are able to query and change MaxScale's configuration.

Resource Operations

Get network user

Get a single network user. The :name in the URI must be a valid network user name.

Response

Status: 200 OK

Get all network users

Get all network users.

Response

Status: 200 OK

Get enabled UNIX account

Note: This endpoint has been deprecated and does nothing.

Get all enabled UNIX accounts

Note: This endpoint has been deprecated and does nothing.

Get all users

Get all administrative users.

Response

Status: 200 OK

Create a network user

Create a new network user. The request body must define at least the following fields.

  • data.id

  • The username

  • data.type

  • Type of the object, must be inet

Only admin accounts can perform POST, PUT, DELETE and PATCH requests. If a basic account performs one of the aforementioned request, the REST API will respond with a 401 Unauthorized error.

Here is an example request body defining the network user my-user with the password my-password that is allowed to execute only read-only operations.

Response

Enable a UNIX account

This enables an existing UNIX account on the system for administrative operations. The request body must define at least the following fields.

  • data.id

  • The username

  • data.type

  • Type of the object, must be unix

Here is an example request body enabling the UNIX account jdoe for read-only operations.

Response

Delete a network user

The :name part of the URI must be a valid user name.

Response

Disable a UNIX account

The :name part of the URI must be a valid user name.

Response

Update a network user

Update network user. Currently, only the password can be updated. This means that the request body must define the data.attributes.password field.

Here is an example request body that updates the password.

Response

CC BY-SA / Gnu FDL

Get all network users
  • Response

  • Get enabled UNIX account

  • Get all enabled UNIX accounts

  • Get all users

    • Response

  • Create a network user

    • Response

  • Enable a UNIX account

    • Response

  • Delete a network user

    • Response

  • Disable a UNIX account

    • Response

  • Update a network user

    • Response

  • data.attributes.password

  • The password for this user

  • data.attributes.account

  • Set to admin for administrative users and basic to read-only users

  • data.attributes.account

  • Set to admin for administrative users and basic to read-only users

  • Admin User Resource
    Resource Operations
    Get network user
    Response
    GET /v1/users/inet/:name
    {
        "data": {
            "attributes": {
                "account": "admin",
                "created": "Thu, 20 Jul 2023 15:29:02 GMT",
                "last_login": "Thu, 20 Jul 2023 15:29:12 GMT",
                "last_update": null,
                "name": "admin"
            },
            "id": "admin",
            "links": {
                "self": "http://localhost:8989/v1/users/inet/admin/"
            },
            "type": "inet"
        },
        "links": {
            "self": "http://localhost:8989/v1/users/inet/admin/"
        }
    }
    GET /v1/users/inet
    {
        "data": [
            {
                "attributes": {
                    "account": "admin",
                    "created": "Thu, 20 Jul 2023 15:29:02 GMT",
                    "last_login": "Thu, 20 Jul 2023 15:29:12 GMT",
                    "last_update": null,
                    "name": "admin"
                },
                "id": "admin",
                "links": {
                    "self": "http://localhost:8989/v1/users/inet/admin/"
                },
                "type": "inet"
            }
        ],
        "links": {
            "self": "http://localhost:8989/v1/users/inet/"
        }
    }
    GET /v1/users/unix/:name
    GET /v1/users/unix
    GET /v1/users
    {
        "data": [
            {
                "attributes": {
                    "account": "admin",
                    "created": "Thu, 20 Jul 2023 15:29:02 GMT",
                    "last_login": "Thu, 20 Jul 2023 15:29:12 GMT",
                    "last_update": null,
                    "name": "admin"
                },
                "id": "admin",
                "links": {
                    "self": "http://localhost:8989/v1/users/inet/admin/"
                },
                "type": "inet"
            }
        ],
        "links": {
            "self": "http://localhost:8989/v1/users/inet/"
        }
    }
    POST /v1/users/inet
    {
        "data": {
            "id": "my-user", // The user to create
            "type": "inet", // The type of the user
            "attributes": {
                "password": "my-password", // The password to use for the user
                "account": "basic" // The type of the account
            }
        }
    }
    Status: 204 No Content
    POST /v1/users/unix
    {
        "data": {
            "id": "jdoe", // Account name
            "type": "unix" // Account type
            "attributes": {
                "account": "basic" // Type of the user account in MaxScale
            }
        }
    }
    Status: 204 No Content
    DELETE /v1/users/inet/:name
    Status: 204 No Content
    DELETE /v1/users/unix/:name
    Status: 204 No Content
    PATCH /v1/users/inet/:name
    {
        "data": {
            "attributes": {
                "password": "new-password"
            }
        }
    }
    Status: 204 No Content