Skip to content

ListVars

POST
/hopbox.v1.VarService/ListVars
curl --request POST \
--url https://example.com/hopbox.v1.VarService/ListVars \
--header 'Connect-Protocol-Version: 1' \
--header 'Connect-Timeout-Ms: 1000' \
--header 'Content-Type: application/json' \
--data '{ "orgId": "example" }'

ListVars lists the shared and all values of the org and the private values of the caller, by name. It returns the value of each env var and no value of a secret.

Connect-Protocol-Version
Connect-Protocol-Version

Define the version of the Connect protocol

number
Allowed value: 1

Define the version of the Connect protocol

Example

1
Connect-Timeout-Ms
Connect-Timeout-Ms

Define the timeout, in ms

number

Define the timeout, in ms

Example

1000
Media typeapplication/json
ListVarsRequest

ListVarsRequest names the org.

object
orgId
org_id

Org_id is the UUID of the org. The default is the org of the API key, or else the personal org of the caller.

string | null

Example generated

{
"orgId": "example"
}

Success

Media typeapplication/json
ListVarsResponse

ListVarsResponse lists the values.

object
vars
vars
Array<object>
Var

Var is an env var or a secret.

object
id
id

Id is the UUID of the value.

string
orgId
org_id

Org_id is the UUID of the org of the value.

string
name
name

Name is the name of the env var in the machine, such as DATABASE_URL.

string
scope
scope
string
Allowed values: VAR_SCOPE_UNSPECIFIED VAR_SCOPE_SHARED VAR_SCOPE_PRIVATE VAR_SCOPE_ALL
secret
secret

Secret is true for a sealed value.

boolean
value
value

Value is the value of an env var, and empty for a secret.

string
ownerAccountId
owner_account_id

Owner_account_id is the UUID of the account of a private value, and empty for a shared or an all value.

string
updaterAccountId
updater_account_id

Updater_account_id is the UUID of the account that set the value last, or empty after its deletion.

string
createTime
create_time

Create_time is the time of the first set of the value.

string format: date-time
updateTime
update_time

Update_time is the time of the last set of the value.

string format: date-time

Example

{
"vars": [
{
"scope": "VAR_SCOPE_UNSPECIFIED",
"createTime": "2023-01-15T01:30:15.01Z",
"updateTime": "2023-01-15T01:30:15.01Z"
}
]
}

Error

Media typeapplication/json
Connect Error
object
code

The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].

string
Allowed values: canceled unknown invalid_argument deadline_exceeded not_found already_exists permission_denied resource_exhausted failed_precondition aborted out_of_range unimplemented internal unavailable data_loss unauthenticated
message

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.

string
details

A list of messages that carry the error details. There is no limit on the number of messages.

Array<object>

Contains an arbitrary serialized message along with a @type that describes the type of the serialized message, with an additional debug field for ConnectRPC error details.

object
type

A URL that acts as a globally unique identifier for the type of the serialized message. For example: type.googleapis.com/google.rpc.ErrorInfo.

string
value

The Protobuf message, serialized as bytes and base64-encoded. The specific message type is identified by the type field.

string format: byte
debug
Debug

Deserialized error detail payload. The ‘type’ field indicates the schema. This field is for easier debugging and should not be relied upon for application logic.

object
key
additional properties
any
key
additional properties
any
key
additional properties
any

Example

{
"code": "canceled"
}