post__repo
POST /repo
Create Repository
Create a new storage repository
TypeScript Client Library
// Function overloads for createStorageRepo
public createStorageRepo(data: CreateRepoRequest): Promise<CreateRepoResponse>;
public createStorageRepo(data: CreateRepoWithBucketsRequest): Promise<CreateRepoResponse>;
public async createStorageRepo(data: CreateRepoRequest | CreateRepoWithBucketsRequest): Promise<CreateRepoResponse> {
return this.makeRequest<CreateRepoResponse>('repo', 'POST', data);
}
Code Samples
# You can also use wget
curl -X POST https://backend.flashback.tech/repo \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
Body parameter
{
"name": "My Backup Repository",
"storageType": "S3",
"mode": "MIRROR",
"workspaceId": "workspace-123",
"repoBuckets": [
{
"folder": "backups",
"master": true,
"bucketId": "123e4567-e89b-12d3-a456-426614174000",
"bucket": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "My Backup Bucket",
"bucket": "my-backup-bucket-2024",
"storageType": "S3",
"key": "AKIAIOSFODNN7EXAMPLE",
"secret": {
"key": "encrypted-secret-key",
"iv": "initialization-vector",
"authTag": "authentication-tag",
"message": "encrypted-message"
},
"endpoint": "https://s3.amazonaws.com",
"region": "us-east-1",
"status": "ACTIVE",
"projectId": "my-project-123",
"createdAt": "2024-01-15T09:00:00Z"
}
}
]
}
Parameters
body
body
object
true
none
» name
body
string
true
none
» storageType
body
string
true
none
» mode
body
string
true
none
» workspaceId
body
string
true
Workspace ID for the repository
» repoBuckets
body
[object]
true
none
»» folder
body
string
false
none
»» master
body
boolean
false
none
»» bucketId
body
string
false
none
»» bucket
body
object
false
none
»»» id
body
string
false
none
»»» name
body
string
false
none
»»» bucket
body
string
false
none
»»» storageType
body
string
false
none
»»» key
body
string
false
none
»»» secret
body
object
false
none
»»»» key
body
string
false
none
»»»» iv
body
string
false
none
»»»» authTag
body
string
false
none
»»»» message
body
string
false
none
»»» endpoint
body
string
false
none
»»» region
body
string
false
none
»»» status
body
string
false
none
»»» projectId
body
string
false
none
»»» createdAt
body
string
false
none
Enumerated Values
» storageType
S3
» storageType
GCS
» storageType
AZURE
» mode
MIRROR
» mode
BACKUP
Example responses
200 Response
{
"success": true,
"repoId": "string",
"workspaceId": "workspace-123"
}
Responses
Response Schema
Status Code 200
» success
boolean
false
none
none
» repoId
string
false
none
none
» workspaceId
string
false
none
Workspace ID for the repository
Status Code 429
» success
boolean
false
none
none
» repoId
string
false
none
none
» error_code
string
false
none
none
» error_message
string
false
none
none
Last updated
Was this helpful?