ves-io-schema-user-CustomAPI-Get

Examples of performing user CustomAPI Get

Usecase:

get user-1 information

Request:

Request using vesctl:

vesctl request rpc user.CustomAPI.Get -i request.yaml --uri /public/custom/namespaces/system/whoami --http-method GET

where file request.yaml has following contents:

namespace: system

vesctl yaml response:

{}

Request using curl:

curl -X 'GET' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build038462651_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/web/custom/namespaces/system/whoami?namespace=system'

curl response:

HTTP/1.1 200 OK
Content-Length: 1031
Content-Type: application/json
Date: Wed, 12 Jan 2022 14:51:22 GMT
Vary: Accept-Encoding

{
  "namespace": "system",
  "name": "testname",
  "email": "test@test.com",
  "first_name": "Testname",
  "last_name": "Testsurname",
  "type": "USER",
  "namespace_roles": [
    {
      "namespace": "system",
      "role": "admin"
    }
  ],
  "tenant": "ves-io",
  "tenant_type": "ENTERPRISE",
  "feature_flags": [
    {
      "name": "testfeature",
      "disabled": false
    }
  ],
  "tos_current_version": "v1.2",
  "tos_accepted": "1641999082",
  "idm_type": "SSO",
  "domain_owner": false,
  "cname": "testdomain",
  "billing_flags": [
    {
      "billing_flag": "PAYMENT_METHOD_EXPIRED",
      "failed": true,
      "additional_info": "",
      "action": "ADD_NEW_PAYMENT_METHOD"
    }
  ],
  "creation_timestamp": "2022-01-12T14:51:22.492795500Z",
  "company": "Acme Ltd.",
  "plan_type": "FREE",
  "active_plan_transition_uid": "",
  "disabled": false,
  "tenant_state": "",
  "tenant_flags": {
  },
  "state": "StateUndefined",
  "last_login_timestamp": null,
  "tile_access": {
  },
  "addon_service_status": {
  }
}