# Available API requests

**Xopero ONE REST API provides a compact set of DevOps-oriented endpoints (implemented as POST methods) for authenticating clients, discovering and managing Git organizations and repositories, and automating backup operations such as attaching or detaching repositories, initiating synchronization, and querying organization status.**

***

## API endpoint list

The table below lists all available **Xopero ONE** API endpoints, along with a short description and a link to the full API request documentation.

{% hint style="warning" %}
An access token must be used to authorize all API requests (except for sign-in). For more information on API authentication, see [this article](https://helpcenter.xopero.com/xopero-one-en/management/overview-and-authentication#authentication).
{% endhint %}

| HTTP method and path                                                               | Description                                                             |
| ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [`POST /account/login`](#post-account-login)                                       | Log in to **Xopero ONE Management Service** and obtain an access token. |
| [`POST /git/organizations/getmany`](#post-git-organizations-getmany)               | List **Git** organizations integrated with **Xopero ONE**.              |
| [`POST /plans/listassignedtoorganization`](#post-plans-listassignedtoorganization) | List all backup plans assigned to the selected **Git** organization.    |
| [`POST /plans/attachgitrepository`](#post-plans-attachgitrepository)               | Attach a repository to a backup plan.                                   |
| [`POST plans/AttachAzureProject`](#post-plans-attachazureproject)                  | Attach an **Azure DevOps** project to a backup plan.                    |
| [`POST /plans/detachgitrepository`](#post-plans-detachgitrepository)               | Remove a repository from a backup plan.                                 |
| [`POST plans/DetachAzureProject`](#post-plans-detachazureproject)                  | Remove an **Azure DevOps** project from a backup plan.                  |
| [`POST /plans/modifygitplan`](#post-plans-modifygitplan)                           | Edit settings of an existing backup plan.                               |
| [`POST plans/ModifyAzurePlanAsync`](#post-plans-modifyazureplanasync)              | Edit settings of an existing **Azure DevOps** backup plan.              |
| [`POST /git/repositories/getmany`](#post-git-repositories-getmany)                 | Retrieve a list of the selected **Git** organization's repositories.    |
| [`POST /git/repositories/activate`](#post-git-repositories-activate)               | Activate licenses for selected repositories.                            |
| [`POST /git/repositories/deactivate`](#post-git-repositories-deactivate)           | Deactivate licenses for selected repositories.                          |
| [`POST /git/repositories/remove`](#post-git-repositories-remove)                   | Remove a repository from the **Xopero ONE** system.                     |
| [`POST /git/repositories/sync`](#post-git-repositories-sync)                       | Synchronize organization data with the **Xopero ONE** system.           |

***

## Account

<details>

<summary><code>POST /account/login</code></summary>

Log in to **Xopero ONE Management Service**.

{% hint style="info" %}
This request returns an access token, which is required for all subsequent API requests.
{% endhint %}

{% hint style="warning" %}
The access token generated with the POST sign-in request is valid for 30 days.
{% endhint %}

**API endpoint:**

{% code overflow="wrap" %}

```http
POST https://server_address/account/login
```

{% endcode %}

**Parameters:**

| Key          | Value description                          | Value type |
| ------------ | ------------------------------------------ | ---------- |
| `email`      | **Xopero ONE** username (email address).   | String     |
| `password`   | **Xopero ONE** password.                   | String     |
| `rememberMe` | Specifies whether to remember the session. | Boolean    |

**Request example:**

{% code title="JSON" overflow="wrap" %}

```json
{
    "email":"admin@company.com",
   "password":"admin123",
    "rememberMe":true
}
```

{% endcode %}

**Response example:**

{% code overflow="wrap" %}

```json
{
 "userId":"a4ac78431-30c2-4d65-bd3e-eb6416784c",     "accessToken":"yMDA1LzA1L2lka4acXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6ImZiODZiNDMxLTMwYzItNGQ2NS1iZDNlLWViNjQxzL25hbWUiOiJhjm1lbG9uQHhvcGVyby5jb20iLCJodHRwOhjvc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2a4aclbWFpbGFkZHJlc3MiOiJtLm1lbG9uQHhvcGVyby5jb20iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOlsiU3l50IiwiVXNlck1hbmFnZW1lbnQiXSwiZXhwIjoxNjU0NjkwNhj4LCJpc3MiOiJodHRa4acxob3N0OjUwMDAiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjUwMDAifQ.eHVRw1KqYi3SOqN-AJUXoEIFKxGVokhoMp910L1LkzA"
}
```

{% endcode %}

</details>

***

## Organization

<details>

<summary><code>POST /git/organizations/getmany</code></summary>

Retrieve a list of **Git** organizations.

**API endpoint:**

{% code overflow="wrap" %}

```http
POST https://server_address/git/organizations/getmany
```

{% endcode %}

**Parameters:**

| Key         | Value description                                            | Value type      |
| ----------- | ------------------------------------------------------------ | --------------- |
| `limit`     | Number of repositories per page.                             | Integer         |
| `orderby`   | Specifies the field and sort direction for returned results. | String          |
| `ordertype` | Specifies the sort order.                                    | String          |
| `page`      | Page number.                                                 | Integer         |
| `filters`   | Data filters.                                                | Array\<filters> |

**Request example:**

{% code title="JSON" overflow="wrap" %}

```json
{
    "limit": 2,
    "orderby": "Name",
    "ordertype": "asc",
    "Page": 2
}
```

{% endcode %}

**Response example:**

{% code overflow="wrap" expandable="true" %}

```json
{
    "currentPage": 2,
    "pageCount": 2,
    "totalEntries": 4,
    "result": [
        {
            "id": "a4ac2cd0-ed2f-4ced-be39-60c631e033ff",
            "driver": 1,
            "name": "OrgName",
            "apiUrl": null,
            "isReadOnly": false,
            "protectedRepositories": 43,
            "totalRepositories": 58,
            "missingLicences": 58,
            "removedRepositories": 15,
            "defaultWorkerId": "a4ac11eb-bbe7-406e-b3da-24fb4df5642a",
            "isCreatedByMarketplace": false,
            "synchronizationInProgress": false,
            "plans": [
                {
                    "id": "a4acff69-266e-4771-b47b-fd5e4fae6a40",
                    "name": "name1",
                    "backupType": 5,
                    "includeMetadata": true,
                    "repoCount": 1,
                    "lastStatus": {
                        "successes": 0,
                        "warnings": 0,
                        "errors": 1
                    },
                    "planFinishedTime": 1643754961233,
                    "isRunning": false
                },
                {
                    "id": "a4ac8dd-6bf4-4c6c-8bc3-7305a9cc4dad",
                    "name": "name2",
                    "backupType": 5,
                    "includeMetadata": true,
                    "repoCount": 1,
                    "lastStatus": {
                        "successes": 0,
                        "warnings": 0,
                        "errors": 1
                    },
                    "planFinishedTime": 1643754482141,
                    "isRunning": false
                },
                {
                    "id": "a4ac8001-1d3f-45ae-bb7a-49e86286ad6b",
                    "name": "name3",
                    "backupType": 5,
                    "includeMetadata": true,
                    "repoCount": 1,
                    "lastStatus": {
                        "successes": 0,
                        "warnings": 0,
                        "errors": 1
                    },
                    "planFinishedTime": 1643754482453,
                    "isRunning": false
                }
            ]
        },
        {
            "id": "a4ac6bff8-0000-0000-0000-000000000000",
            "driver": 2,
            "name": "xopero",
            "apiUrl": null,
            "isReadOnly": false,
            "protectedRepositories": 1,
            "totalRepositories": 775,
            "missingLicences": 676,
            "removedRepositories": 0,
            "defaultWorkerId": "a4ac0f30-6641-a4ac7-ac26-fd7e47abf8f3",
            "isCreatedByMarketplace": false,
            "synchronizationInProgress": false,
            "plans": [
                {
                    "id": "3a4ac5-fdd1-4a4ac1-9415-66d0fbedb0e0",
                    "name": "name1",
                    "backupType": 5,
                    "includeMetadata": true,
                    "repoCount": 1,
                    "lastStatus": {
                        "successes": 1,
                        "warnings": 0,
                        "errors": 0
                    },
                    "planFinishedTime": 1645136722019,
                    "isRunning": false
                },
                {
                    "id": "a4aca5252-2d02-a4ac-8a24-e2be4598c8ce",
                    "name": "name2",
                    "backupType": 5,
                    "includeMetadata": true,
                    "repoCount": 1,
                    "lastStatus": {
                        "successes": 0,
                        "warnings": 1,
                        "errors": 0
                    },
                    "planFinishedTime": 1645115366992,
                    "isRunning": false
                },
                {
                    "id": "a4acb8c-7b2a-a4ac83-8167-44a9a1e14272",
                    "name": "name3",
                    "backupType": 5,
                    "includeMetadata": true,
                    "repoCount": 1,
                    "lastStatus": {
                        "successes": 0,
                        "warnings": 1,
                        "errors": 0
                    },
                    "planFinishedTime": 1645115380587,
                    "isRunning": false
                }
            ]
        }
    ]
}
```

{% endcode %}

</details>

***

## Backup

<details>

<summary><code>POST /plans/listassignedtoorganization</code></summary>

List all backup plans to which the selected **Git** organization's repositories are assigned.

**API endpoint:**

{% code overflow="wrap" %}

```http
POST https://server_address/plans/listassignedtoorganization
```

{% endcode %}

**Parameters:**

| Key              | Value description                                                           | Value type |
| ---------------- | --------------------------------------------------------------------------- | ---------- |
| `limit`          | Specifies the maximum number of results to return in a single API response. | Integer    |
| `page`           | Page number.                                                                | Integer    |
| `organizationid` | Organization ID.                                                            | Guid       |

**Request example:**

{% code title="JSON" overflow="wrap" %}

```json
{
    "limit":5,
    "page":5,
    "organizationid":"a4a4acgd0-eg78f-4a4ac-kl39-99ka4ac1e777ff"
}
```

{% endcode %}

**Response example:**

{% code overflow="wrap" expandable="true" %}

```json
{
    "currentPage": 5,
    "pageCount": 5,
    "totalEntries": 23,
    "result": [
        {
            "id": "ea6a260b-a4ac-4204-a92d-918e6940b136",
            "name": "example1",
            "includeAllRepositories": false,
            "repositoryIds": [
                "c1961c1c-a425-a4ac-8757-32d5b6fc9aeb"
            ]
        },
        {
            "id": "fba158dd-6bf4-a4ac-8bc3-7305a9cc4dad",
            "name": "example2",
            "includeAllRepositories": false,
            "repositoryIds": [
                "de5c5995-b422-43c4-90b7-7ee182480dbb"
            ]
        },
        {
            "id": "fdb48001-1d3f-45ae-bb7a-49e86286ad6b",
            "name": "example3",
            "includeAllRepositories": false,
            "repositoryIds": [
                "a4ac5995-b422-43c4-a4ac-7ee182480dbb"
            ]
        }
     ]
}
```

{% endcode %}

</details>

<details>

<summary><code>POST /plans/attachgitrepository</code></summary>

Add a repository to a backup plan, provided that both the repository and the plan already exist.

**API endpoint:**

{% code overflow="wrap" %}

```http
POST https://server_address/plans/attachgitrepository
```

{% endcode %}

**Parameters:**

| Key            | Value description          | Value type |
| -------------- | -------------------------- | ---------- |
| `planid`       | Backup plan I&#x44;**\***. | Guid       |
| `repositoryid` | Repository ID.             | Guid       |

<sub>**\***</sub><sub>You can use the</sub> <sub></sub><sub>`getMany`</sub> <sub></sub><sub>request to find the specific backup plan ID.</sub>

**Request example:**

{% code title="JSON" overflow="wrap" %}

```json
{
    "planid":"hjkhkj60b-baac-4564-a92d-918e6940b136",
    "repositoryid":"ca4ac8f1c-a425-4869-8757-32c6567gc9aeb"
}
```

{% endcode %}

**Response example:**

```json
200 OK
```

</details>

<details>

<summary><code>POST plans/AttachAzureProject</code></summary>

Add an **Azure DevOps** project to a backup plan, provided that both the project and the plan already exist.

{% hint style="danger" %}
Works only for plans with individual project selection.
{% endhint %}

**API endpoint:**

{% code overflow="wrap" %}

```http
POST https://server_address/plans/attachazureproject
```

{% endcode %}

**Parameters:**

| Key         | Value description          | Value type |
| ----------- | -------------------------- | ---------- |
| `planId`    | Backup plan I&#x44;**\***. | Guid       |
| `projectId` | Project ID.                | Guid       |

<sub>**\***</sub><sub>You can use the</sub> <sub></sub><sub>`getMany`</sub> <sub></sub><sub>request to find the specific backup plan ID.</sub>

**Request example:**

{% code title="JSON" overflow="wrap" %}

```json
{
    "planId":"ea6a260b-brrc-4204-a56c-918e6940b136",
    "projectId": "c1961r1e-a425-4769-8757-32d6b6fc7aeb"
}
```

{% endcode %}

**Response example:**

{% code overflow="wrap" %}

```json
200 OK
```

{% endcode %}

</details>

<details>

<summary><code>POST /plans/detachgitrepository</code></summary>

Remove a repository from a backup plan.

**API endpoint:**

```http
POST https://server_address/plans/detachgitrepository
```

**Parameters:**

| Key            | Value description          | Value type |
| -------------- | -------------------------- | ---------- |
| `planid`       | Backup plan I&#x44;**\***. | Guid       |
| `repositoryid` | Repository ID.             | Guid       |

<sub>**\***</sub><sub>You can use the</sub> <sub></sub><sub>`getMany`</sub> <sub></sub><sub>request to find the specific backup plan ID.</sub>

**Request example:**

```json
{
    "planid":"hjkhkj60b-baac-4564-a92d-918e6940b136",
    "repositoryid":"a4ac8f1c-a425-48hj-8757-32hj567gchjeb"
}
```

**Response example:**

```json
200 OK
```

</details>

<details>

<summary><code>POST plans/DetachAzureProject</code></summary>

Remove an **Azure DevOps** project from a backup plan.

{% hint style="danger" %}
Works only for plans with individual project selection.
{% endhint %}

**API endpoint:**

{% code overflow="wrap" %}

```http
POST https://server_address/plans/detachazureproject
```

{% endcode %}

**Parameters:**

| Key         | Value description          | Value type |
| ----------- | -------------------------- | ---------- |
| `planId`    | Backup plan I&#x44;**\***. | Guid       |
| `projectId` | Project ID.                | Guid       |

<sub>**\***</sub><sub>You can use the</sub> <sub></sub><sub>`getMany`</sub> <sub></sub><sub>request to find the specific backup plan ID.</sub>

**Request example:**

{% code title="JSON" overflow="wrap" %}

```json
{
    "planId": "05d46e44-f026-4cf9-a64a-1dd97328808c",
    "projectId": "022056bd-0044-0000-0000-004400000003"
}
```

{% endcode %}

**Response example:**

{% code overflow="wrap" %}

```json
200 OK
```

{% endcode %}

</details>

<details>

<summary><code>POST /plans/modifygitplan</code></summary>

Edit an existing **Git** backup plan.

**API endpoint:**

{% code overflow="wrap" %}

```http
POST https://server_address/plans/modifygitplan
```

{% endcode %}

**Parameters:**

| Key                       | Value description                                                                                      | Value type                  |
| ------------------------- | ------------------------------------------------------------------------------------------------------ | --------------------------- |
| `id`                      | Backup plan I&#x44;**\***.                                                                             | Guid                        |
| `isActive`                | Indicates whether the schedule is currently enabled (`true`) or disabled (`false`).                    | Boolean                     |
| `name`                    | Backup plan name.                                                                                      | String                      |
| `type`                    | Specifies the type of the backup plan.                                                                 | EPlanType                   |
| `backupType`              | Backup type.                                                                                           | EBackupType                 |
| `storageId`               | Backup storage ID.                                                                                     | Guid                        |
| `repositoriesIds`         | Repository ID table.                                                                                   | IEnumerable\<Guid>          |
| `workerId`                | The unique identifier of the agent (worker) performing the backup operation.                           | Guid                        |
| `schedule`                | Backup schedule.                                                                                       | BackupScheduleDTO           |
| `advancedOptions`         | Advanced options.                                                                                      | Dictionary\<string, string> |
| `compressionSettings`     | Compression settings.                                                                                  | CompressionSettingsEntry    |
| `encryptionSettings`      | Encryption settings.                                                                                   | EncryptionSettingsEntry     |
| `customActions`           | User defined actions.                                                                                  | BackupCustomActionsEntry    |
| `inculdeAllReposistories` | If `true`, the plan ignores selected repositories and includes all repositories from the organization. | Boolean                     |
| `organizationId`          | Organization ID.                                                                                       | Guid                        |
| `includeMetadata`         | If `true`, backup includes metadata.                                                                   | Boolean                     |

<sub>**\***</sub><sub>You can use the</sub> <sub></sub><sub>`getMany`</sub> <sub></sub><sub>request to find the specific backup plan ID.</sub>

**Request example:**

{% code title="JSON" overflow="wrap" expandable="true" %}

```json
{
   "id":"a4acc15-b08b-40cb-a4ac-5e40ea4ac54",
   "isActive":true,
   "name":"example",
   "backupType":5,
   "schedule":{
      "id":"a4ac21-6da6-4c8c-a4ac5-f2ffca4ac516",
      "scheme":3,
      "delay":0,
      "preventSystemSleep":false,
      "options":[
         {
            "type":1,
            "trigger":1,
            "frequency":1,
            "days":[
               1
            ],
            "startAt":[
               {
                  "hour":17,
                  "minute":25
               }
            ],
            "interval":0,
            "nthDayOfWeek":0
         },
         {
            "type":3,
            "trigger":1,
            "frequency":3,
            "days":[
               1,
               2,
               3,
               4,
               5
            ],
            "startAt":[
               {
                  "hour":17,
                  "minute":25
               }
            ],
            "interval":0,
            "nthDayOfWeek":0
         }
      ],
      "backupWindow":
      [     
         [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
         [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
         [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
         [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
         [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
         [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
         [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
      ],
      "retention":{
         "id":"00000000-0000-0000-0000-000000000000",
         "rule":1,
         "options":null,
         "order":0
      }
   },
   "compressionSettings":{
      "codec":2,
      "level":2
   },
   "encryptionSettings":null,
   "customActions":{
      "preBackupAction":null,
      "postSnapshotAction":null,
      "postBackupAction":null
   },
   "advancedOptions":{
      "useVss":"True",
      "maxTaskRetriesCount":"3",
      "taskRetriesFrequency":"60000",
      "maxConcurrentTasks":"5",
      "processorProperties_PartSize":"1048576"
   },
   "deltaSettings":null,
   "workerId":"a4ac1eb-bbe7-a4ac-b3da-a4acf5642a",
   "filteringSettings":null,
   "organizationId":"a4ac2cd0-ea4ac-4ced-be39-6a4ace033ff",
   "repositoriesIds":[
      "c1961c1c-a425-4769-8757-32d5b6fc9aeb"
   ],
   "includeAllRepositories":false,
   "includeMetadata":true,
   "storageId":"a4ac74ac-7a4ac-4fec-9448-a4ace9267d7"
}
```

{% endcode %}

**Response example:**

{% code overflow="wrap" %}

```json
200 OK
```

{% endcode %}

</details>

<details>

<summary><code>POST plans/ModifyAzurePlanAsync</code></summary>

Edit an existing **Azure DevOps** backup plan.

**API endpoint:**

{% code overflow="wrap" %}

```http
POST https://server_address/plans/modifyazureplanasync
```

{% endcode %}

**Parameters:**

<table><thead><tr><th width="220">Key</th><th width="219.66666666666666">Value description</th><th>Value type</th></tr></thead><tbody><tr><td><code>id</code></td><td>Backup plan ID<strong>*</strong>.</td><td>Guid</td></tr><tr><td><code>isActive</code></td><td>Indicates whether the schedule is currently enabled (<code>true</code>) or disabled (<code>false</code>).</td><td>Boolean</td></tr><tr><td><code>name</code></td><td>Backup plan name.</td><td>String</td></tr><tr><td><code>type</code></td><td>Specifies the type of the backup plan.</td><td>EPlanType</td></tr><tr><td><code>backupType</code></td><td>Backup type.</td><td>EBackupType</td></tr><tr><td><code>storageId</code></td><td>Backup storage ID.</td><td>Guid</td></tr><tr><td><code>repositoriesIds</code></td><td>Repository IDs to backup.</td><td>IEnumerable&#x3C;Guid></td></tr><tr><td><code>excludedRepositoriesIds</code></td><td>Excluded repository IDs.</td><td>IEnumerable&#x3C;Guid></td></tr><tr><td><code>projectsIds</code></td><td>Project IDs to backup.</td><td>IEnumerable&#x3C;Guid></td></tr><tr><td><code>wikisIds</code></td><td>Wiki IDs to backup.</td><td>IEnumerable&#x3C;Guid></td></tr><tr><td><code>workerId</code></td><td>The unique identifier of the agent (worker) performing the operation.</td><td>Guid</td></tr><tr><td><code>schedule</code></td><td>Backup schedule.</td><td>BackupScheduleDTO</td></tr><tr><td><code>advancedOptions</code></td><td>Advanced backup plan options.</td><td>Dictionary&#x3C;string, string></td></tr><tr><td><code>compressionSettings</code></td><td>Compression settings.</td><td>CompressionSettingsEntry</td></tr><tr><td><code>encryptionSettings</code></td><td>Encryption settings.</td><td>EncryptionSettingsEntry</td></tr><tr><td><code>customActions</code></td><td>User defined actions.</td><td>BackupCustomActionsEntry</td></tr><tr><td><code>notificationSettings</code></td><td>Notification settings.</td><td>NotificationSettingsEntry</td></tr><tr><td><code>organizationId</code></td><td><strong>Azure DevOps</strong> organization ID.</td><td>Guid</td></tr><tr><td><code>includeMetadata</code></td><td>If <code>true</code>, the backup includes metadata.</td><td>Boolean</td></tr><tr><td><code>useExtraCredentials</code></td><td>Indicates whether additional credentials are used during backup of cloud organization.</td><td>Boolean</td></tr><tr><td><code>additionalCredentials</code></td><td>Collection of additional credentials.</td><td>Guid[]</td></tr><tr><td><code>resourceKindsToIgnore</code></td><td>Resource kinds to ignore.</td><td>List&#x3C;int></td></tr><tr><td><code>gitChoiceMode</code></td><td>Repository choice mode.</td><td>[EGitChoiceMode](Classes/EGitChoiceMode.md)</td></tr><tr><td><code>rules</code></td><td>Rule-based choice settings for each element: project, wiki, repository.</td><td>List&#x3C;AzureDevOpsRule></td></tr></tbody></table>

<sub>**\***</sub><sub>You can use the</sub> <sub></sub><sub>`getMany`</sub> <sub></sub><sub>request to find the specific backup plan ID.</sub>

**Request example:**

{% code title="JSON" overflow="wrap" expandable="true" %}

```json
{
  "id":"f4b99db4-c0e9-4111-9292-ffc5812aad2c",
  "isActive":true,
  "name":"Plan DevOps",
  "backupType":10,
  "schedule":{
    "scheme":5,
    "options":[
      {
        "type":0,
        "trigger":1,
        "frequency":3,
        "days":[
          0,
          1,
          2,
          3,
          4,
          5,
          6
        ],
        "startAt":[
          {
            "hour":9,
            "minute":29
          }
        ],
        "nthDayOfWeek":0,
        "interval":0
     }
    ],
    "retention":{
      "rule":3,
      "options":[
        {
          "number":3,
          "period":1,
          "type":0
        }
      ],
      "order":0
    },
    "backupWindow":[
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    ]
  },
  "compressionSettings":{
    "codec":2,
    "level":2
  },
  "encryptionSettings":null,
  "customActions":{
  "preBackupAction":{
      "windows":{
        "enabled":true,
        "scriptType":0,
        "command":"C:\\Users\\Name\\Desktop\\test.bat",
        "passwordId":"00000000-0000-0000-0000-000000000000",
        "arguments":null
      },
      "unix":{
        "enabled":false
      },
      "waitForExecution":true,
      "waitingInterval":0
    },
    "postSnapshotAction":null,
    "postBackupAction":null
  },
  "advancedOptions":{
    "useVss":"True",
    "maxTaskRetriesCount":3,
    "taskRetriesFrequency":60000,
    "maxConcurrentTasks":5,
    "largeResourcesBufferSize":134217728
  },
  "deltaSettings":null,
  "notificationSettings":{
    "enabled":false,
    "planNotificationsConfiguration":null,
    "recipients":[

    ]
  },
  "workerId":"758fa497-f93b-436f-9571-2a3f7d496ac1",
  "filteringSettings":null,
  "ignoreCorruptedAttachments":false,
  "organizationId":"017f210e-0edd-6645-82a8-f9c9c3cae4d6",
  "gitChoiceMode":3,
  "repositoriesIds":[

  ],
  "excludedRepositoriesIds":[

  ],
  "projectsIds":[

  ],
  "wikisIds":[

  ],
  "additionalCredentials":[

  ],
  "rules":[
    {
      "choiceMode":2,
      "type":2,
      "ruleChoice":{
        "meetAllRules":false,
        "rules":[

        ]
      }
    },
    {
      "choiceMode":2,
      "type":1,
      "ruleChoice":{
        "meetAllRules":false,
        "rules":[

        ]
      }
    }
  ],
  "storageId":"718fgta6-fo5c-4194-8d4e-13e91cd68a70",
  "type":1
}
```

{% endcode %}

**Response example:**

{% code overflow="wrap" %}

```json
200 OK
```

{% endcode %}

</details>

***

## Repository

<details>

<summary><code>POST /git/repositories/getmany</code></summary>

Retrieve a list of the selected **Git** organization's repositories.

**API endpoint:**

{% code overflow="wrap" %}

```http
POST https://server_address/git/repositories/getmany
```

{% endcode %}

**Parameters:**

| Key         | Value description                                                    | Value type      |
| ----------- | -------------------------------------------------------------------- | --------------- |
| `id`        | Organization ID.                                                     | Guid            |
| `limit`     | Defines the number of repositories returned per page.                | Integer         |
| `orderby`   | Specifies the field used to sort the returned results.               | String          |
| `ordertype` | Defines the sorting order: ascending (`asc`) or descending (`desc`). | String          |
| `page`      | Page number.                                                         | Integer         |
| `filters`   | Data filters.                                                        | Array\<filters> |

**Request example:**

{% code title="JSON" overflow="wrap" %}

```json
{
    "id": "a4ac2cd0-a4ac-4ced-be39-a4ac31e033ff",
    "limit": 2,
    "orderby": "Name",
    "ordertype": "asc",
    "page": 1,
    "filters":[
    {
        "operator": "eq",
        "value": true,
        "property": "IsRemoved"
    }
    ]
}
```

{% endcode %}

**Response example:**

{% code overflow="wrap" expandable="true" %}

```json
{
    "currentPage": 1,
    "pageCount": 1,
    "totalEntries": 2,
    "result": {
        "synchronizationInProgress": false,
        "lastSynchronizationRepositoriesStartTime": 1645546071481,
        "repositories": [
            {
                "id": "a4ac3ac7d-99e4-a4ac-b5a4-a4acdeee5",
                "serverId": "a4acac7d-99e4-a4ac-b5a4-ea4ac2deee5",
                "name": "org/repo1",
                "lastBackup": 0,
                "lastSuccessfulBackup": 0,
                "nextBackup": 0,
                "isProtected": true,
                "isRemoved": true,
                "status": 2,
                "lastBackupTaskStatus": 0,
                "isPublic": false
            },
            {
                "id": "a4acf294-b30e-a4ac-aabb-6a4ac6578686",
                "serverId": "a4ac294-b30e-a4ac-aabb-63a4ac578686",
                "name": "org/repo2",
                "lastBackup": 0,
                "lastSuccessfulBackup": 0,
                "nextBackup": 1645556400000,
                "isProtected": true,
                "isRemoved": true,
                "status": 2,
                "lastBackupTaskStatus": 0,
                "isPublic": false
            }
       ],
     "removedRepositories": 15
}
```

{% endcode %}

</details>

<details>

<summary><code>POST /git/repositories/activate</code></summary>

Activate licenses for selected **Git** repositories.

{% hint style="danger" %}
Authorization requires a user account with one of the following roles: **DataRemoveManagement** or **GitManagement**.
{% endhint %}

**API endpoint:**

{% code overflow="wrap" %}

```http
POST https://server_address/git/repositories/activate
```

{% endcode %}

**Parameters:**

| Key   | Value description               | Value type   |
| ----- | ------------------------------- | ------------ |
| `Ids` | Repository IDs to be activated. | Array\<Guid> |

**Request example:**

{% code title="JSON" overflow="wrap" %}

```json
{
    "Ids":[
        "a4ac979e-0000-0000-0000-000000000000",
        "a4acca07-0000-0000-0000-000000000000",
        "a4ac7c5-0000-0000-0000-000000000000",
        "a4ac9d7a-0000-0000-0000-000000000000",
        "1a4ac9bc9-0000-0000-0000-000000000000",
        "a4ac79fe9-0000-0000-0000-000000000000",
        "a4ac3f220-0000-0000-0000-000000000000",
        "a4aca817-0000-0000-0000-000000000000"
    ]
}
```

{% endcode %}

**Response example:**

{% code overflow="wrap" expandable="true" %}

```json
{
    "success": [],
    "error": [
        {
            "id": "a4ac7979e-0000-0000-0000-000000000000",
            "errorCode": "LI5020"
        },
        {
            "id": "a4acdca07-0000-0000-0000-000000000000",
            "errorCode": "LI5020"
        },
        {
            "id": "a4ac797c5-0000-0000-0000-000000000000",
            "errorCode": "LI5020"
        },
        {
            "id": "a4ac79d7a-0000-0000-0000-000000000000",
            "errorCode": "LI5020"
        },
        {
            "id": "a4ac79bc9-0000-0000-0000-000000000000",
            "errorCode": "LI5020"
        },
        {
            "id": "a4ac79fe9-0000-0000-0000-000000000000",
            "errorCode": "LI5020"
        },
        {
            "id": "a4ac3f220-0000-0000-0000-000000000000",
            "errorCode": "LI5020"
        },
        {
            "id": "a4acea817-0000-0000-0000-000000000000",
            "errorCode": "LI5020"
        }
    ]
}
```

{% endcode %}

</details>

<details>

<summary><code>POST /git/repositories/deactivate</code></summary>

Deactivate licenses for selected **Git** repositories.&#x20;

{% hint style="danger" %}
Authorization requires a user account with one of the following roles: **DataRemoveManagement** or **GitManagement**.
{% endhint %}

**API endpoint:**

{% code overflow="wrap" %}

```http
POST https://server_address/git/repositories/deactivate
```

{% endcode %}

**Parameters:**

| Key   | Value description                 | Value type   |
| ----- | --------------------------------- | ------------ |
| `Ids` | Repository IDs to be deactivated. | Array\<Guid> |

**Request example:**

{% code title="JSON" overflow="wrap" %}

```json
{
    "Ids":[
        "a4ac7979e-0000-0000-0000-000000000000",
        "a4acdca07-0000-0000-0000-000000000000",
        "a4ac797c5-0000-0000-0000-000000000000",
        "a4ac79d7a-0000-0000-0000-000000000000",
        "a4ac79bc9-0000-0000-0000-000000000000",
        "a4ac79fe9-0000-0000-0000-000000000000",
        "a4ac3f220-0000-0000-0000-000000000000",
        "a4acea817-0000-0000-0000-000000000000"
    ]
}
```

{% endcode %}

**Response example:**

{% code overflow="wrap" expandable="true" %}

```json
{
    "success": [],
    "error": [
        {
            "id": "a4ac7979e-0000-0000-0000-000000000000",
            "errorCode": "GT1001"
        },
        {
            "id": "a4acdca07-0000-0000-0000-000000000000",
            "errorCode": "GT1001"
        },
        {
            "id": "a4ac797c5-0000-0000-0000-000000000000",
            "errorCode": "GT1001"
        },
        {
            "id": "a4ac79d7a-0000-0000-0000-000000000000",
            "errorCode": "GT1001"
        },
        {
            "id": "a4ac79bc9-0000-0000-0000-000000000000",
            "errorCode": "GT1001"
        },
        {
            "id": "a4ac79fe9-0000-0000-0000-000000000000",
            "errorCode": "GT1001"
        },
        {
            "id": "a4ac3f220-0000-0000-0000-000000000000",
            "errorCode": "GT1001"
        },
        {
            "id": "a4acea817-0000-0000-0000-000000000000",
            "errorCode": "GT1001"
        }
    ]
}
```

{% endcode %}

</details>

<details>

<summary><code>POST /git/repositories/remove</code></summary>

Delete a repository data from the **Xopero ONE** system.

{% hint style="danger" %}
Authorization requires a user account with one of the following roles: **DataRemoveManagement** or **GitManagement**.
{% endhint %}

**API endpoint:**

{% code overflow="wrap" %}

```http
POST https://server_address/git/repositories/remove
```

{% endcode %}

**Parameters:**

| Key          | Value description                                                              | Value type |
| ------------ | ------------------------------------------------------------------------------ | ---------- |
| `id`         | Repository IDs to be deleted.                                                  | Guid       |
| `removedata` | If `true`, the system also deletes the backup data of the selected repository. | Boolean    |

**Request example:**

{% code title="JSON" overflow="wrap" %}

```json
{
    "id": "a4acd28-eee0-404a-a4ac0-6ca4ac260ca",
    "removedata": true
}
```

{% endcode %}

**Response example:**

{% code overflow="wrap" %}

```json
{
    "succeededIds": [
        "a4ac8d28-eee0-a4ac-a070-6a4ac76260ca"
    ],
    "failedIds": [],
    "errors": []
}
```

{% endcode %}

</details>

<details>

<summary><code>POST /git/repositories/sync</code></summary>

Run synchronization for the selected **Git** organization.

**API endpoint:**

{% code overflow="wrap" %}

```http
POST https://server_address/git/repositories/sync
```

{% endcode %}

**Parameters:**

| Key  | Value description | Value type |
| ---- | ----------------- | ---------- |
| `id` | Organization ID.  | Guid       |

**Request example:**

{% code title="JSON" overflow="wrap" %}

```json
{
    "id": "a4ac2cd0-a4ac-4ced-a4ac-60ca4ac3ff"
}
```

{% endcode %}

**Response example:**

{% code overflow="wrap" %}

```json
200 OK
```

{% endcode %}

</details>
