Skip to main content
POST
https://sandbox.getcollate.io/api
/
v1
/
services
/
storageServices
POST /v1/services/storageServices
from metadata.sdk import configure
from metadata.sdk.entities import StorageServices
from metadata.generated.schema.api.services.createStorageService import CreateStorageServiceRequest

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

request = CreateStorageServiceRequest(
    name="s3_datalake",
    displayName="S3 Data Lake",
    serviceType="S3",
    description="Production S3 data lake for analytics",
    connection={
        "config": {
            "type": "S3",
            "awsConfig": {
                "awsAccessKeyId": "AKIA...",
                "awsSecretAccessKey": "***",
                "awsRegion": "us-east-1",
                "endPointURL": "https://s3.amazonaws.com/"
            }
        }
    }
)

service = StorageServices.create(request)
print(f"Created: {service.fullyQualifiedName}")
{
  "id": "d1589e1d-2ab0-431c-a383-15e4be20a106",
  "name": "s3_datalake",
  "fullyQualifiedName": "s3_datalake",
  "serviceType": "S3",
  "description": "Production S3 data lake for analytics",
  "connection": {
    "config": {
      "type": "S3",
      "awsConfig": {
        "enabled": false,
        "awsAccessKeyId": "AKIA...",
        "awsSecretAccessKey": "*********",
        "awsRegion": "us-east-1",
        "endPointURL": "https://s3.amazonaws.com/"
      }
    }
  },
  "version": 0.1,
  "updatedAt": 1769982621820,
  "updatedBy": "admin",
  "href": "http://localhost:8585/api/v1/services/storageServices/d1589e1d-2ab0-431c-a383-15e4be20a106",
  "owners": [],
  "tags": [],
  "deleted": false,
  "domains": []
}

Create a Storage Service

Create a new storage service connection to a platform such as S3, GCS, or ADLS.

Body Parameters

name
string
required
Name of the storage service. Must be unique across all storage services.
serviceType
string
required
Type of storage service (e.g., S3, GCS, ADLS, CustomStorage).
connection
object
required
Connection configuration specific to the service type.
displayName
string
Human-readable display name for the storage service.
description
string
Description of the storage service in Markdown format.
owners
array
Array of owner references (users or teams) to assign to the service.
domain
string
Fully qualified name of the domain to assign for governance purposes.
tags
array
Array of classification tags to apply to the storage service.
POST /v1/services/storageServices
from metadata.sdk import configure
from metadata.sdk.entities import StorageServices
from metadata.generated.schema.api.services.createStorageService import CreateStorageServiceRequest

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

request = CreateStorageServiceRequest(
    name="s3_datalake",
    displayName="S3 Data Lake",
    serviceType="S3",
    description="Production S3 data lake for analytics",
    connection={
        "config": {
            "type": "S3",
            "awsConfig": {
                "awsAccessKeyId": "AKIA...",
                "awsSecretAccessKey": "***",
                "awsRegion": "us-east-1",
                "endPointURL": "https://s3.amazonaws.com/"
            }
        }
    }
)

service = StorageServices.create(request)
print(f"Created: {service.fullyQualifiedName}")
{
  "id": "d1589e1d-2ab0-431c-a383-15e4be20a106",
  "name": "s3_datalake",
  "fullyQualifiedName": "s3_datalake",
  "serviceType": "S3",
  "description": "Production S3 data lake for analytics",
  "connection": {
    "config": {
      "type": "S3",
      "awsConfig": {
        "enabled": false,
        "awsAccessKeyId": "AKIA...",
        "awsSecretAccessKey": "*********",
        "awsRegion": "us-east-1",
        "endPointURL": "https://s3.amazonaws.com/"
      }
    }
  },
  "version": 0.1,
  "updatedAt": 1769982621820,
  "updatedBy": "admin",
  "href": "http://localhost:8585/api/v1/services/storageServices/d1589e1d-2ab0-431c-a383-15e4be20a106",
  "owners": [],
  "tags": [],
  "deleted": false,
  "domains": []
}

Returns

Returns the created storage service object with all specified properties and system-generated fields.

Response

id
string
Unique identifier for the storage service (UUID format).
name
string
Storage service name.
fullyQualifiedName
string
Fully qualified name of the service.
displayName
string
Human-readable display name.
description
string
Description of the storage service in Markdown format.
serviceType
string
Type of storage service (e.g., S3, GCS, ADLS, CustomStorage).
connection
object
Connection configuration for the service.
owners
array
List of owners assigned to the storage service.
domain
string
Fully qualified name of the assigned domain.
tags
array
Classification tags applied to the storage service.
version
number
Version number for the entity (starts at 0.1).

Create or Update (PUT)

Use PUT /v1/services/storageServices instead of POST to perform an upsert. If a storage service with the same fullyQualifiedName already exists, it will be updated; otherwise, a new service is created. The request body is the same as POST.
curl -X PUT "{base_url}/api/v1/services/storageServices" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{ ... same body as POST ... }'
PUT will not return a 409 conflict error if the entity already exists — it will update the existing entity instead.

Bulk Create or Update (PUT)

Use PUT /v1/services/storageServices/bulk to create or update multiple storage services in a single request. The request body is an array of create request objects.
curl -X PUT "{base_url}/api/v1/services/storageServices/bulk" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '[
    { "name": "s3_datalake", "serviceType": "S3", "connection": { "config": {} } },
    { "name": "gcs_analytics", "serviceType": "GCS", "connection": { "config": {} } }
  ]'

Error Handling

CodeError TypeDescription
400BAD_REQUESTInvalid request body or missing required fields
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission to create storage services
409ENTITY_ALREADY_EXISTSStorage service with same name already exists (POST only)