ves-io-schema-user-CustomAPI-Create

Examples of performing user CustomAPI Create

Usecase:

create user-1@ves.io role-1

Request:

Request using vesctl:

vesctl request rpc user.CustomAPI.Create -i request.yaml --uri /public/custom/namespaces/documentation/user_roles --http-method POST

where file request.yaml has following contents:

email: user-1@ves.io
namespace: documentation
namespaceRoles:
- namespace: documentation
  role: role-1

vesctl yaml response:

{}

Request using curl:

curl -X 'POST' -d '{"namespace":"documentation","email":"user-1@ves.io","namespaceRoles":[{"namespace":"documentation","role":"role-1"}]}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build743694289_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/web/custom/namespaces/documentation/user_roles'

curl response:

HTTP/1.1 200 OK
Content-Length: 65
Content-Type: application/json
Date: Thu, 02 Jul 2020 15:53:39 GMT
Vary: Accept-Encoding

{
  "metadata": null,
  "system_metadata": null,
  "spec": null
}