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/documentation/whoami --http-method GET

where file request.yaml has following contents:

namespace: documentation

vesctl yaml response:

{}

Request using curl:

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

curl response:

HTTP/1.1 200 OK
Content-Length: 981
Content-Type: application/json
Date: Wed, 25 Aug 2021 09:04:18 GMT
Vary: Accept-Encoding

{
  "namespace": "documentation",
  "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": "1629882258",
  "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": "2021-08-25T09:04:18.393886106Z",
  "company": "Acme Ltd.",
  "plan_type": "FREE",
  "active_plan_transition_uid": "",
  "disabled": false,
  "tenant_state": "",
  "tenant_flags": {
  },
  "state": "StateUndefined",
  "last_login_timestamp": null
}