hpe-container-platform-community/hpecp-python-library

Implement tenant.users()

snowch opened this issue · 1 comments

GET /api/v1/tenant/2?user HTTP/1.1
Host: 127.0.0.1:8080
Accept-Encoding: gzip, deflate
REMOTE_ADDR: 86.138.132.112
Accept: */*
User-Agent: python-requests/2.6.0 CPython/2.7.5 Linux/3.10.0-1127.13.1.el7.x86_64
Connection: keep-alive
X-BDS-SESSION: /api/v2/session/7ab6afb4-ac96-4adc-a422-7aeef8ab82fe
Authorization: /api/v2/session/7ab6afb4-ac96-4adc-a422-7aeef8ab82fe

HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 808
Content-Type: application/json
Date: Thu, 23 Jul 2020 15:53:42 GMT
Server: HPE Ezmeral Container Platform 5.1

{
  "_links": {
    "self": {
      "href": "/api/v1/tenant/2?user"
    }
  },
  "_embedded": {
    "users": [
      {
        "_links": {
          "self": {
            "href": "/api/v1/user/29"
          }
        },
        "_embedded": {
          "label": {
            "name": "ad_admin1",
            "description": ""
          },
          "is_group_added_user": true,
          "is_external": true,
          "is_service_account": false,
          "default_tenant": "",
          "role": "/api/v1/role/2"
        }
      },
      {
        "_links": {
          "self": {
            "href": "/api/v1/user/14"
          }
        },
        "_embedded": {
          "label": {
            "name": "demo.user",
            "description": "BlueData Anonymous User"
          },
          "is_group_added_user": false,
          "is_external": false,
          "is_service_account": false,
          "default_tenant": "",
          "role": "/api/v1/role/3"
        }
      },
      {
        "_links": {
          "self": {
            "href": "/api/v1/user/6"
          }
        },
        "_embedded": {
          "label": {
            "name": "admin",
            "description": "BlueData Administrator"
          },
          "is_group_added_user": false,
          "is_external": false,
          "is_service_account": false,
          "default_tenant": "/api/v1/tenant/1",
          "role": "/api/v1/role/2"
        }
      }
    ]
  }
}

Done.