DELETE/orgs/{org}/agents/variables/{name}/repositories/{repository_id}

Remove a repository from an organization variable

Removes a repository from an organization agent variable's selected repository access list. Use this operation when the variable's visibility is set to selected. The authenticated user needs collaborator access to the repository, and OAuth app tokens and personal access tokens (classic) need the admin:org scope; private repositories also require the repo scope.

3 parameters
orgstringrequired
The organization name. The name is not case sensitive.
namestringrequired
The name of the organization agent variable.
repository_idintegerrequired
The unique integer identifier of the repository to remove from the variable's selected repository access list.

2 status codes
204Returns no content and confirms that the repository was removed from the variable's selected repository access list.
409Returned when the variable's `visibility` is not set to `selected`.

Error handling

A 409 is returned when the variable's visibility is not set to selected. The org, name, and repository_id path parameters identify the organization, variable, and repository; the authenticated user needs collaborator access to the repository. OAuth app tokens and personal access tokens (classic) need the admin:org scope, and private repositories also require the repo scope.