Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/windmill/windmill-api/UserApi.md

Windmill deno client (separated from the main repo because most of the code is auto-generated from the openapi and not worth committing)
Go to Latest
File

.UserApi

All URIs are relative to /api

Method HTTP request Description
acceptInvite POST /users/accept_invite accept invite to workspace
createToken POST /users/tokens/create create token
createUser POST /w/{workspace}/users/add create user (require admin privilege)
createUserGlobally POST /users/create create user
declineInvite POST /users/decline_invite decline invite to workspace
deleteToken DELETE /users/tokens/delete/{token_prefix} delete token
deleteUser DELETE /w/{workspace}/users/delete/{username} delete user (require admin privilege)
getCurrentEmail GET /users/email get current user email (if logged in)
globalUserUpdate POST /users/update/{email} global update user (require super admin)
globalWhoami GET /users/whoami get current global whoami (if logged in)
leaveWorkspace POST /w/{workspace}/users/leave_workspace leave workspace
listTokens GET /users/tokens/list list token
listUsernames GET /w/{workspace}/users/list_usernames list usernames
listUsers GET /w/{workspace}/users/list list users
listUsersAsSuperAdmin GET /users/list_as_super_admin list all users as super admin (require to be super amdin)
listWorkspaceInvites GET /users/list_invites list all workspace invites
login POST /auth/login login with password
loginWithOauth POST /oauth/login_callback/{client_name} login with oauth authorization flow
logout POST /users/logout logout
setPassword POST /users/setpassword set password
updateUser POST /w/{workspace}/users/update/{username} update user (require admin privilege)
whoami GET /w/{workspace}/users/whoami whoami
whois GET /w/{workspace}/users/whois/{username} whois

acceptInvite

string acceptInvite(inlineObject5)

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:.UserApiAcceptInviteRequest = {
  // InlineObject5
  inlineObject5: {
    workspaceId: "workspaceId_example",
    username: "username_example",
  },
};

apiInstance.acceptInvite(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
inlineObject5 InlineObject5

Return type

string

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 status -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createToken

string createToken(newToken)

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:.UserApiCreateTokenRequest = {
  // NewToken | new token
  newToken: {
    label: "label_example",
    expiration: new Date('1970-01-01T00:00:00.00Z'),
  },
};

apiInstance.createToken(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
newToken NewToken new token

Return type

string

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain

HTTP response details

Status code Description Response headers
201 token created -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createUser

string createUser(newUser)

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:.UserApiCreateUserRequest = {
  // string
  workspace: "workspace_example",
  // NewUser | new user
  newUser: {
    email: "email_example",
    username: "username_example",
    isAdmin: true,
  },
};

apiInstance.createUser(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
newUser NewUser new user
workspace [string] defaults to undefined

Return type

string

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain

HTTP response details

Status code Description Response headers
201 user created -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createUserGlobally

string createUserGlobally(inlineObject1)

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:.UserApiCreateUserGloballyRequest = {
  // InlineObject1
  inlineObject1: {
    email: "email_example",
    password: "password_example",
    superAdmin: true,
    name: "name_example",
    company: "company_example",
  },
};

apiInstance.createUserGlobally(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
inlineObject1 InlineObject1

Return type

string

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain

HTTP response details

Status code Description Response headers
201 user created -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

declineInvite

string declineInvite(inlineObject6)

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:.UserApiDeclineInviteRequest = {
  // InlineObject6
  inlineObject6: {
    workspaceId: "workspaceId_example",
  },
};

apiInstance.declineInvite(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
inlineObject6 InlineObject6

Return type

string

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 status -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteToken

string deleteToken()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:.UserApiDeleteTokenRequest = {
  // string
  tokenPrefix: "token_prefix_example",
};

apiInstance.deleteToken(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
tokenPrefix [string] defaults to undefined

Return type

string

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 delete token -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteUser

string deleteUser()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:.UserApiDeleteUserRequest = {
  // string
  workspace: "workspace_example",
  // string
  username: "username_example",
};

apiInstance.deleteUser(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
workspace [string] defaults to undefined
username [string] defaults to undefined

Return type

string

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 delete user -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getCurrentEmail

string getCurrentEmail()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:any = {};

apiInstance.getCurrentEmail(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

This endpoint does not need any parameter.

Return type

string

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 user email -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

globalUserUpdate

string globalUserUpdate(inlineObject2)

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:.UserApiGlobalUserUpdateRequest = {
  // string
  email: "email_example",
  // InlineObject2
  inlineObject2: {
    isSuperAdmin: true,
  },
};

apiInstance.globalUserUpdate(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
inlineObject2 InlineObject2
email [string] defaults to undefined

Return type

string

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 user updated -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

globalWhoami

GlobalUserInfo globalWhoami()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:any = {};

apiInstance.globalWhoami(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

This endpoint does not need any parameter.

Return type

GlobalUserInfo

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 user email -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

leaveWorkspace

string leaveWorkspace()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:.UserApiLeaveWorkspaceRequest = {
  // string
  workspace: "workspace_example",
};

apiInstance.leaveWorkspace(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
workspace [string] defaults to undefined

Return type

string

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 status -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listTokens

Array listTokens()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:any = {};

apiInstance.listTokens(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

This endpoint does not need any parameter.

Return type

Array

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 truncated token -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listUsernames

Array listUsernames()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:.UserApiListUsernamesRequest = {
  // string
  workspace: "workspace_example",
};

apiInstance.listUsernames(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
workspace [string] defaults to undefined

Return type

Array

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 user -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listUsers

Array listUsers()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:.UserApiListUsersRequest = {
  // string
  workspace: "workspace_example",
};

apiInstance.listUsers(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
workspace [string] defaults to undefined

Return type

Array

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 user -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listUsersAsSuperAdmin

Array listUsersAsSuperAdmin()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:.UserApiListUsersAsSuperAdminRequest = {
  // number | which page to return (start at 1, default 1) (optional)
  page: 1,
  // number | number of items to return for a given page (default 30, max 100) (optional)
  perPage: 1,
};

apiInstance.listUsersAsSuperAdmin(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
page [number] which page to return (start at 1, default 1) (optional) defaults to undefined
perPage [number] number of items to return for a given page (default 30, max 100) (optional) defaults to undefined

Return type

Array

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 user -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listWorkspaceInvites

Array listWorkspaceInvites()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:any = {};

apiInstance.listWorkspaceInvites(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

This endpoint does not need any parameter.

Return type

Array

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 list all workspace invites -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

login

string login(login)

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:.UserApiLoginRequest = {
  // Login | credentials
  login: {
    email: "email_example",
    password: "password_example",
  },
};

apiInstance.login(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
login Login credentials

Return type

string

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 Successfully authenticated. The session ID is returned in a cookie named `token` and as plaintext response. Preferred method of authorization is through the bearer token. The cookie is only for browser convenience. * Set-Cookie -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

loginWithOauth

string loginWithOauth(inlineObject10)

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:.UserApiLoginWithOauthRequest = {
  // string
  clientName: "client_name_example",
  // InlineObject10
  inlineObject10: {
    code: "code_example",
    state: "state_example",
  },
};

apiInstance.loginWithOauth(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
inlineObject10 InlineObject10
clientName [string] defaults to undefined

Return type

string

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 Successfully authenticated. The session ID is returned in a cookie named `token` and as plaintext response. Preferred method of authorization is through the bearer token. The cookie is only for browser convenience. * Set-Cookie -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

logout

string logout()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:any = {};

apiInstance.logout(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

This endpoint does not need any parameter.

Return type

string

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 logout -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

setPassword

string setPassword(inlineObject)

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:.UserApiSetPasswordRequest = {
  // InlineObject
  inlineObject: {
    password: "password_example",
  },
};

apiInstance.setPassword(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
inlineObject InlineObject

Return type

string

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 password set -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateUser

string updateUser(editWorkspaceUser)

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:.UserApiUpdateUserRequest = {
  // string
  workspace: "workspace_example",
  // string
  username: "username_example",
  // EditWorkspaceUser | new user
  editWorkspaceUser: {
    isAdmin: true,
  },
};

apiInstance.updateUser(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
editWorkspaceUser EditWorkspaceUser new user
workspace [string] defaults to undefined
username [string] defaults to undefined

Return type

string

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 edited user -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

whoami

User whoami()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:.UserApiWhoamiRequest = {
  // string
  workspace: "workspace_example",
};

apiInstance.whoami(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
workspace [string] defaults to undefined

Return type

User

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 user -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

whois

User whois()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .UserApi(configuration);

let body:.UserApiWhoisRequest = {
  // string
  workspace: "workspace_example",
  // string
  username: "username_example",
};

apiInstance.whois(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
workspace [string] defaults to undefined
username [string] defaults to undefined

Return type

User

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 user -

[Back to top] [Back to API list] [Back to Model list] [Back to README]