Export StorageGcs

Create new storage

POST

Create a new target storage connection to Google Cloud Storage.

For information about the required fields and prerequisites, see Google Cloud Storage in the Label Studio documentation.

After you add the storage, you should validate the connection before attempting to sync your data. Your data will not be exported until you sync your connection.

Request

This endpoint expects an object.
can_delete_objects
booleanOptional
Deletion from storage enabled.
title
stringOptional
Storage title
description
stringOptional
Storage description
project
integerOptional
Project ID
bucket
stringOptional
GCS bucket name
prefix
stringOptional
GCS bucket prefix
google_application_credentials
stringOptional

The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details.

google_project_id
stringOptional
Google project ID

Response

This endpoint returns an object
can_delete_objects
booleanOptional
Deletion from storage enabled.
title
stringOptional
Storage title
description
stringOptional
Storage description
project
integerOptional
Project ID
bucket
stringOptional
GCS bucket name
prefix
stringOptional
GCS bucket prefix
google_application_credentials
stringOptional

The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details.

google_project_id
stringOptional
Google project ID
POST
1curl -X POST http://localhost:8080/api/storages/export/gcs \
2 -H "Authorization: Token <api_key>" \
3 -H "Content-Type: application/json" \
4 -d '{}'
200Successful
1{
2 "can_delete_objects": true,
3 "title": "title",
4 "description": "description",
5 "project": 1,
6 "bucket": "bucket",
7 "prefix": "prefix",
8 "google_application_credentials": "google_application_credentials",
9 "google_project_id": "google_project_id"
10}