--- title: "Rename a connection" canonical: "https://admiral.io/docs/api/integrations/IntegrationAPI_RenameConnection" --- # Rename a connection `POST https://api.admiral.io/v1/integrations/{integration}/connections/{connection}/rename` - ALREADY_EXISTS when another connection to the same integration has the new id. - ABORTED when `etag` is set and the connection changed since it was read. Scope: `integration:write` ### Path parameters - `integration` (string, required): The integration id. - `connection` (string, required): The connection id. ### Request body - `connection_id` (string, required): The new id. Lowercase letters, digits and hyphens, starting and ending with a letter or digit, 1 to 63 characters. It may not have the shape of a uid (`int-` and twelve characters). connection_id.not_uid // a connection id may not have the shape of a uid Pattern `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. Length 1 to 63. - `etag` (string): When set, the rename is refused unless it matches the connection's current etag. ### Response 200 Success - `connection` (Connection): The connection under its new name. - `name` (string): (IDENTIFIER) The connection's name, `integrations/{integration}/connections/{connection}`, such as `integrations/github/connections/acme`. The id defaults to the vendor account's login, so it may start with a digit. Pattern `^integrations/[a-z]([a-z0-9-]{0,61}[a-z0-9])?/connections/[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. - `uid` (string): `int-` and twelve base36 characters. Never changes and is never reused, so it is what a reference to the connection holds. Pattern `^int-[0-9a-z]+$`. Read-only. - `settings` (ConnectionSettings): The block for the integration. Exactly one variant is populated. - `github` (GitHubConnectionSettings): GitHubConnectionSettings describes one installation of Admiral's GitHub App. GitHub is the source of every field, so all of it is read only. - `installation_id` (string (int64)): GitHub's id for the installation. Read-only. - `account_login` (string): The login of the organization or user the App is installed on, as GitHub spells it. Read-only. - `account_type` (AccountType): AccountType is what the App is installed on. One of `ACCOUNT_TYPE_UNSPECIFIED`, `ORGANIZATION`, `USER`. Read-only. - `repository_selection` (RepositorySelection): RepositorySelection is how the installation was scoped on GitHub. One of `REPOSITORY_SELECTION_UNSPECIFIED`, `ALL`, `SELECTED`. Read-only. - `repositories` (array of string): Full names, `owner/name`, when the selection is SELECTED. Empty when it is ALL, and empty on a DISCONNECTED connection. Read-only. - `url` (string): The page on GitHub where the installation is managed. Empty on a DISCONNECTED connection. Read-only. - `suspended_at` (Timestamp): Set while GitHub has the installation suspended. Read-only. - `status` (Status): One of `STATUS_UNSPECIFIED`, `CONNECTED`, `NEEDS_ATTENTION`, `DISCONNECTED`. Read-only. - `status_reason` (string): Why, and when, the status last left CONNECTED. Empty while connected. Read-only. - `etag` (string): Changes whenever the connection does. Send it back on rename or delete to refuse the change if someone else changed the connection first. Read-only. - `created_by` (ActorRef): Who connected it. Read-only. - `id` (string): The actor's typed id: a `usr-` user id or an `sa-` service account id. - `display_name` (string): Human-readable name (e.g., "John Smith", "deploy-bot"). - `email` (string): Email address (empty for non-human actors). - `created_at` (Timestamp): A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (`Z`); input may use an offset from UTC. Read-only. - `updated_at` (Timestamp): A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (`Z`); input may use an offset from UTC. Read-only.