Change a secret

PATCH https://runix.chat/api/v1/armada/secrets/{name}

Give one of the organization's secrets a new value, a new note or both. A new value replaces the old one, which cannot be read again; who gave it and when are kept. Runs get the new value from their next turn on. The organization's members get an armada_secret event.

Guests and bots cannot use this endpoint.

Changes: New in Zulip 13.0 (feature level ZF-448986).

Usage examples

The -u line implements HTTP Basic authentication. See the Authorization header documentation for how to get those credentials for users and bots.

curl -sSX PATCH https://runix.chat/api/v1/armada/secrets/WANDB_API_KEY \
    -u EMAIL_ADDRESS:API_KEY \
    --data-urlencode 'secret=the new value' \
    --data-urlencode 'note=The team'"'"'s W&B account, since October'

Parameters

name string required in path

Example: "WANDB_API_KEY"

The secret's name.


secret string optional

Example: "the new value"

The secret's new value, between 1 and 4096 characters.


note string optional

Example: "The team's W&B account, since October"

Its new note, at most 200 characters.


Response

Return values

  • secret: object

    One of the organization's secrets, as its members see it: never its value.

    Changes: New in Zulip 13.0 (feature level ZF-448986).

    • name: string

      The environment variable every run gets it in.

    • hint: string

      The last four characters of a value of 16 characters or more; empty for a shorter one.

    • note: string

      What the secret is for.

    • added_by: integer | null

      The ID of the user who added it, or null if they were deleted.

    • date_added: integer

      When it was added, as a UNIX timestamp.

    • replaced_by: integer | null

      The ID of the user who last gave it a new value, or null if no one has.

    • date_replaced: integer | null

      When it was last given a new value, as a UNIX timestamp, or null.

    • date_used: integer | null

      When a run was last started with it, as a UNIX timestamp, or null if none has been.

Example response(s)

Changes: As of Zulip 7.0 (feature level 167), if any parameters sent in the request are not supported by this endpoint, a successful JSON response will include an ignored_parameters_unsupported array.

A typical successful JSON response may look like:

{
    "msg": "",
    "result": "success",
    "secret": {
        "added_by": 11,
        "date_added": 1792230000,
        "date_replaced": null,
        "date_used": null,
        "hint": "7f3a",
        "name": "WANDB_API_KEY",
        "note": "The team's W&B account",
        "replaced_by": null
    }
}