Skip to main content

Account Service

Account Service API updates Argo CD account settings.

Service Definition

Package: account Service: AccountService The AccountService manages user accounts, authentication tokens, and permission checks in Argo CD.

RPC Methods

ListAccounts

Returns the list of accounts. Request: ListAccountRequest (Empty request) Response: AccountsList
Account[]
List of accounts
Account Fields:
  • name (string): Account name
  • enabled (bool): Whether the account is enabled
  • capabilities (string[]): Account capabilities
  • tokens (Token[]): List of tokens associated with the account
REST Endpoint: GET /api/v1/account

GetAccount

Returns an account by name. Request: GetAccountRequest
string
required
The account name
Response: Account
string
Account name
bool
Whether the account is enabled
string[]
Account capabilities (e.g., “login”, “apiKey”)
Token[]
List of tokens associated with the account
Token Fields:
  • id (string): Token ID
  • issuedAt (int64): Token issue timestamp
  • expiresAt (int64): Token expiration timestamp
REST Endpoint: GET /api/v1/account/{name}

UpdatePassword

Updates an account’s password to a new value. Request: UpdatePasswordRequest
string
required
The account name
string
required
The current password
string
required
The new password
Response: UpdatePasswordResponse REST Endpoint: PUT /api/v1/account/password

CreateToken

Creates an authentication token for an account. Request: CreateTokenRequest
string
required
The account name
string
Token identifier (optional, auto-generated if not provided)
int64
Token expiration duration in seconds (0 means no expiration)
Response: CreateTokenResponse
string
The generated JWT token
REST Endpoint: POST /api/v1/account/{name}/token

DeleteToken

Deletes an authentication token. Request: DeleteTokenRequest
string
required
The account name
string
required
The token ID to delete
Response: EmptyResponse REST Endpoint: DELETE /api/v1/account/{name}/token/{id}

CanI

Checks if the current account has permission to perform an action. Request: CanIRequest
string
required
The resource type (e.g., “applications”, “clusters”, “repositories”)
string
required
The action to check (e.g., “get”, “create”, “update”, “delete”, “sync”, “override”)
string
The subresource (e.g., specific project name or application name)
Response: CanIResponse
string
Either “yes” or “no” indicating if the action is allowed
REST Endpoint: GET /api/v1/account/can-i/{resource}/{action}/{subresource}

gRPC Example