Harmont docs
Cloud SDKReference

User

Generated @harmont/cloud reference for the User endpoints.

createApiToken

POST /api/v0/user/api-tokens

Create a personal API key

Returns the raw secret in the response body. It is shown only once and cannot be retrieved later.

import { createApiToken } from "@harmont/cloud";
createApiToken(options): RequestResult<CreateApiTokenResponse>

Body ApiTokenCreateRequest (optional)

Returns CreateApiTokenResponse

See POST /api/v0/user/api-tokens for the full request and response schema.

deleteCurrentUser

DELETE /api/v0/user

Delete the current user's account

import { deleteCurrentUser } from "@harmont/cloud";
deleteCurrentUser(options): RequestResult<DeleteCurrentUserResponse>

Returns DeleteCurrentUserResponse

See DELETE /api/v0/user for the full request and response schema.

getCurrentUser

GET /api/v0/user

Get the current authenticated user

Returns the bearer-authenticated user and their personal-organization slug.

import { getCurrentUser } from "@harmont/cloud";
getCurrentUser(options): RequestResult<GetCurrentUserResponse>

Returns GetCurrentUserResponse

See GET /api/v0/user for the full request and response schema.

listApiTokens

GET /api/v0/user/api-tokens

List the current user's API keys

import { listApiTokens } from "@harmont/cloud";
listApiTokens(options): RequestResult<ListApiTokensResponse>

Returns ListApiTokensResponse

See GET /api/v0/user/api-tokens for the full request and response schema.

revokeApiToken

DELETE /api/v0/user/api-tokens/{id}

Revoke one of the current user's API keys

import { revokeApiToken } from "@harmont/cloud";
revokeApiToken(options): RequestResult<RevokeApiTokenResponse>
ParameterInTypeDescription
idpathstringThe API key id.

Returns RevokeApiTokenResponse

See DELETE /api/v0/user/api-tokens/{id} for the full request and response schema.

updateCurrentUser

PATCH /api/v0/user

Update the current user's display name

import { updateCurrentUser } from "@harmont/cloud";
updateCurrentUser(options): RequestResult<UpdateCurrentUserResponse>

Body UserUpdateRequest (optional)

Returns UpdateCurrentUserResponse

See PATCH /api/v0/user for the full request and response schema.

On this page