For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
EnterpriseQuick Start
API ReferenceTutorials
  • Introduction
    • Getting started
  • API Reference
      • GETList all import storages types
        • GETGet all import storage
        • POSTCreate import storage
        • POSTValidate import storage
        • GETGet import storage
        • DELDelete import storage
        • PATCHUpdate import storage
        • POSTSync import storage
LogoLogo
EnterpriseQuick Start
API ReferenceImport StorageGcs

Get all import storage

GET
http://localhost:8000/api/storages/gcs/
GET
/api/storages/gcs/
$curl -G http://localhost:8000/api/storages/gcs/ \
> -H "Authorization: Token <api_key>" \
> -H "Content-Type: application/json" \
> -d project=1
200Retrieved
1[
2 {
3 "created_at": "2024-01-15T09:30:00Z",
4 "id": 42,
5 "project": 7,
6 "type": "gcs",
7 "bucket": "label-studio-datasets",
8 "description": "Primary GCS bucket for project assets",
9 "google_application_credentials": "{ \"type\": \"service_account\", \"project_id\": \"label-studio-12345\", \"private_key_id\": \"abcdef1234567890\", \"private_key\": \"-----BEGIN PRIVATE KEY-----\\nMIIEv...\\n-----END PRIVATE KEY-----\\n\", \"client_email\": \"label-studio@label-studio-12345.iam.gserviceaccount.com\", \"client_id\": \"1234567890\", \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\", \"token_uri\": \"https://oauth2.googleapis.com/token\", \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\", \"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/label-studio%40label-studio-12345.iam.gserviceaccount.com\" }",
10 "google_project_id": "label-studio-12345",
11 "last_sync": "2024-04-10T14:45:00Z",
12 "last_sync_count": 150,
13 "last_sync_job": "sync-job-20240410-1445",
14 "meta": null,
15 "prefix": "images/2024/",
16 "presign": true,
17 "presign_ttl": 60,
18 "recursive_scan": true,
19 "regex_filter": ".*\\.(jpg|png|jpeg)$",
20 "status": "completed",
21 "synchronizable": true,
22 "title": "Project 7 GCS Storage",
23 "traceback": null,
24 "use_blob_urls": false
25 }
26]
Get a list of all GCS import storage connections.
Was this page helpful?
Previous

Create import storage

Next
Built with

Authentication

AuthorizationToken
The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: <br><pre><code class="language-bash">curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"</code></pre>

Query parameters

orderingstringOptional
Which field to use when ordering the results.
projectintegerRequired
Project ID

Response

created_atdatetimeRead-only
Creation time
idintegerRead-only
projectinteger
A unique integer value identifying this project.
typestringRead-onlyDefaults to gcs
bucketstring or null
GCS bucket name
descriptionstring or null
Cloud storage description
google_application_credentialsstring or null

The content of GOOGLE_APPLICATION_CREDENTIALS json file

google_project_idstring or null
Google project ID
last_syncdatetime or null
Last sync finished time
last_sync_countinteger or null0-2147483647
Count of tasks synced last time
last_sync_jobstring or null<=256 characters
Last sync job ID
metaany or null
Meta and debug information about storage processes
prefixstring or null
GCS bucket prefix
presignbooleanDefaults to true
presign_ttlinteger0-32767

Presigned URLs TTL (in minutes)

recursive_scanboolean or null
Perform recursive scan over the bucket content
regex_filterstring or null
Cloud storage regex for filtering objects
statusenum
  • initialized - Initialized
  • queued - Queued
  • in_progress - In progress
  • failed - Failed
  • completed - Completed
  • completed_with_errors - Completed with errors
synchronizablebooleanDefaults to true
titlestring or null<=256 characters
Cloud storage title
tracebackstring or null
Traceback report for the last failed sync
use_blob_urlsboolean
Interpret objects as BLOBs and generate URLs
The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example:
curl https://label-studio-host/api/projects -H “Authorization: Token [your-token]”