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-build013258245_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: 885
Content-Type: application/json
Date: Wed, 16 Sep 2020 10:50:59 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": "1600253459",
  "idm_type": "SSO",
  "namespace_access": {
    "system": {
      "roles": [
        "admin"
      ]
    }
  },
  "domain_owner": false,
  "cname": "testdomain",
  "billing_flags": [
    {
      "billing_flag": "PAYMENT_METHOD_EXPIRED",
      "failed": true,
      "additional_info": "",
      "action": "ADD_NEW_PAYMENT_METHOD"
    }
  ],
  "creation_timestamp": "2020-09-16T10:50:59.715039300Z",
  "company": "Acme Ltd."
}