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 Keys 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
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:
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
Response Data Model
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
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 namesubjectName: Repository namesubjectType: AlwaysRepository
Azure DevOps
account: Azure DevOps organization namesubjectName: For repositories useproject/repositoryformat; for projects use just the project namesubjectType: UseRepositoryfor repository backups,Projectfor project-level backupsEnsure the Azure DevOps organization has Cloudback authorized
References
Last updated
Was this helpful?