Operations API

Learn how to manage Cloudback backup definitions programmatically using the Operations API for automated backup configuration.

Overview

The Cloudback Operations API allows users to manage backup definitions programmatically. It provides a RESTful interface to update backup definitions for repositories across all supported platforms, including GitHub and Azure DevOps.

Features

  • Automated backup definition configuration for repositories

  • Programmatic management of backup configurations

  • Multi-platform support (GitHub, Azure DevOps)

Prerequisites

Before you begin, ensure that you have the following:

  • Cloudback Account: An active account with appropriate permissions to create and manage backup resources.

  • API Key: Your API key for Cloudback's API. You can create one at the API Keysarrow-up-right page in the Cloudback dashboard.

  • Network Access: Ensure that your environment can reach Cloudback's endpoints: https://app.cloudback.it/api/ops/

API Reference

Get Backup Definition

Retrieve the current backup configuration for a repository.

Endpoint: POST /api/ops/definition/get

GitHub Example

Azure DevOps Repository Example

Azure DevOps Project Example

Response

Update Backup Definition

Update the backup configuration for a repository.

Endpoint: POST /api/ops/definition/update

GitHub Example

Azure DevOps Example

Response

Request Data Model

Field
Type
Required
Description

platform

string

Yes

The platform. Values: GitHub, AzureDevOps

account

string

Yes

The account or organization name

subjectName

string

Yes

The name of the backup subject (see below)

subjectType

string

Yes

The type of backup subject: Repository or Project

settings

object

Yes*

The backup configuration settings (*required for update)

Subject Name Format

The subjectName format varies by platform:

Platform
Subject Type
Format
Example

GitHub

Repository

repository-name

demo-repository

Azure DevOps

Repository

project-name/repository-name

my-project/demo-repo

Azure DevOps

Project

project-name

my-project

Settings Object

Field
Type
Required
Description

enabled

boolean

No

Whether automated backup is enabled

schedule

string

No

Backup schedule name (see schedulesarrow-up-right)

storage

string

No

Storage location name (see storagesarrow-up-right)

retention

string

No

Retention policy: Last 30 days, Last 90 days, Last 180 days, Last 360 days

Response Data Model

Field
Type
Description

platform

string

The platform (GitHub or AzureDevOps)

account

string

The account or organization name

backupSubjectName

string

The name of the backup subject

backupSubjectType

string

The type: Repository or Project

settings

object

The current backup configuration

Error Responses

Status Code
Description

400 Bad Request

Invalid request format or parameters

401 Unauthorized

API key is missing or invalid

402 Payment Required

Plan limit exceeded

404 Not Found

Repository or definition not found

422 Unprocessable Entity

Validation error (e.g., schedule not found)

Backwards Compatibility

For backwards compatibility, the repository field is still accepted in requests as an alias for subjectName. If both are provided, subjectName takes precedence. If subjectType is not provided, it defaults to Repository.

Platform-Specific Notes

GitHub

  • account: GitHub username or organization name

  • subjectName: Repository name

  • subjectType: Always Repository

Azure DevOps

  • account: Azure DevOps organization name

  • subjectName: For repositories use project/repository format; for projects use just the project name

  • subjectType: Use Repository for repository backups, Project for project-level backups

  • Ensure the Azure DevOps organization has Cloudback authorized

References

Last updated

Was this helpful?