Skip to Content
OpenETL
ReferenceAPIAccess Service

Create principal

POST
/v1/principals

Query Parameters

principalId?string

The last part of its name: a lowercase letter, then lowercase letters, digits and hyphens, at most 63 in all.

Request Body

application/json
  1. body

A user or a service account, which calls the API with its keys.

name?string

principals/{principal}

type?string
Formatenum
Value in"PRINCIPAL_TYPE_UNSPECIFIED""PRINCIPAL_TYPE_USER""PRINCIPAL_TYPE_SERVICE_ACCOUNT"
displayName?string
email?string

Users only.

disabled?boolean

Output only: DisablePrincipal and EnablePrincipal set it.

roleBindings?array<>

Output only: GrantRole and RevokeRole change them.

createTime?string
Formatdate-time

Response Body

OK

application/json
  1. response
principal?

A user or a service account, which calls the API with its keys.

Example Request
curl -X POST 'http://localhost:8080/v1/principals' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "principal": {    "name": "string",    "type": "PRINCIPAL_TYPE_UNSPECIFIED",    "displayName": "string",    "email": "string",    "disabled": true,    "roleBindings": [      {        "role": "ROLE_UNSPECIFIED",        "workspace": "string"      }    ],    "createTime": "2019-08-24T14:15:22Z"  }}