post__repo
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}'POST https://backend.flashback.tech/repo HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Accept: application/jsonconst inputBody = '{
"name": "string",
"storageType": "S3",
"mode": "MIRROR",
"repoBuckets": [
{
"bucketId": "string",
"folder": "string",
"master": true
}
],
"repoAiLlms": [
{
"aiLlmId": "string"
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('https://backend.flashback.tech/repo',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});{
"name": "My Backup Repository",
"storageType": "S3",
"mode": "MIRROR",
"workspaceId": "workspace-123",
"repoBuckets": [
{
"folder": "backups",
"master": true,
"bucketId": "123e4567-e89b-12d3-a456-426614174000",
}
],
"repoAiLlms": [
{
"aiLlmId": "ai-llm-123"
}
]
}Parameters
Name
In
Type
Required
Description
Parameter
Value
Responses
Status
Meaning
Description
Schema
Response Schema
Name
Type
Required
Restrictions
Description
Name
Type
Required
Restrictions
Description
Last updated
Was this helpful?