> For the complete documentation index, see [llms.txt](https://helpcenter.xopero.com/xopero-one-en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpcenter.xopero.com/xopero-one-en/use-cases/devops/rest-api.md).

# REST API

#### With Xopero ONE REST API for DevOps ecosystems, you can automate backup and restore tasks, integrating them seamlessly into your development workflows.

***

## Getting the latest backup plan status

{% hint style="warning" %}
The following guide applies to **GitHub**, **Bitbucket** & **GitLab** only.
{% endhint %}

First, use the authorization method to obtain a token, which allows you to perform further operations. After obtaining the token, select the appropriate authentication method as described in the [API authentication article](/xopero-one-en/management/rest-api-for-devops-ecosystems/overview-and-authentication.md).

Once authorized, you can use the `getMany` method to list all your organizations along with their backup plans and most recent statuses.

***

## Activating a license for the repository&#x20;

First, use the authorization method to obtain a token, which allows you to perform further operations. After getting the token, select the appropriate authentication method as described in the [API authentication article](/xopero-one-en/management/rest-api-for-devops-ecosystems/overview-and-authentication.md).

Once authorized, use the `getMany` method to find the repository names and IDs required for the next step. After collecting the repository IDs, use the `Activate` method with an array of the selected repository IDs to activate the license.

***

## Deactivating the license for the repository&#x20;

First, use the authorization method to obtain a token, which allows you to perform further operations. After getting the token, select the appropriate authentication method as described in the [API authentication article](/xopero-one-en/management/rest-api-for-devops-ecosystems/overview-and-authentication.md).

Once authorized, use the `getMany` method to find the repository names and IDs required for the next step. After collecting the repository IDs, use the `Deactivate` method with an array of the selected repository IDs to deactivate the license.

***

## Attach repository to a backup plan&#x20;

First, use the authorization method to obtain a token, which allows you to perform further operations. After getting the token, select the appropriate authentication method as described in the [API authentication article](/xopero-one-en/management/rest-api-for-devops-ecosystems/overview-and-authentication.md).&#x20;

Once authorized, use the `getMany` method (`GitOrganizationController`) to find the backup plan ID and the `getMany` method (`GitRepositoryController`) to obtain the repository ID. After collecting the repository and plan IDs, use the `Attach` method with the selected repository ID and plan ID pair.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://helpcenter.xopero.com/xopero-one-en/use-cases/devops/rest-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
