PUT /v1/services/storageServices
curl -X PUT "{base_url}/api/v1/services/storageServices" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{
"name": "s3_datalake",
"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/"
}
}
}
}'
from metadata.sdk import configure
from metadata.sdk.entities import StorageServices
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
# Retrieve, modify, and update
svc = StorageServices.retrieve("d1589e1d-2ab0-431c-a383-15e4be20a106")
svc.description = "Updated: Production S3 data lake with new region configuration"
updated = StorageServices.update(svc)
print(f"Updated to version {updated.version.root}")
import org.openmetadata.schema.entity.services.StorageService;
import org.openmetadata.sdk.fluent.StorageServices;
// Retrieve, modify, and update
StorageService service = StorageServices.retrieve("d1589e1d-2ab0-431c-a383-15e4be20a106");
service.setDescription("Updated: Production S3 data lake with new region configuration");
StorageService updated = StorageServices.update(service);
# Update by ID
curl -X PATCH "{base_url}/api/v1/services/storageServices/d1589e1d-2ab0-431c-a383-15e4be20a106" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Updated: Production S3 data lake with new region configuration"}
]'
# Update by name
curl -X PATCH "{base_url}/api/v1/services/storageServices/name/s3_datalake" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Updated: Production S3 data lake with new region configuration"}
]'
{
"id": "d1589e1d-2ab0-431c-a383-15e4be20a106",
"name": "s3_datalake",
"fullyQualifiedName": "s3_datalake",
"serviceType": "S3",
"description": "Updated: Production S3 data lake with new region configuration",
"connection": {
"config": {
"type": "S3",
"awsConfig": {
"enabled": false,
"awsAccessKeyId": "AKIA...",
"awsSecretAccessKey": "*********",
"awsRegion": "us-east-1",
"endPointURL": "https://s3.amazonaws.com/"
}
}
},
"version": 0.2,
"updatedAt": 1769982621820,
"updatedBy": "admin",
"href": "http://localhost:8585/api/v1/services/storageServices/d1589e1d-2ab0-431c-a383-15e4be20a106",
"owners": [],
"tags": [],
"deleted": false,
"domains": []
}
Update a Storage Service
Create or update a storage service with a full request body
PUT
/
v1
/
services
/
storageServices
PUT /v1/services/storageServices
curl -X PUT "{base_url}/api/v1/services/storageServices" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{
"name": "s3_datalake",
"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/"
}
}
}
}'
from metadata.sdk import configure
from metadata.sdk.entities import StorageServices
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
# Retrieve, modify, and update
svc = StorageServices.retrieve("d1589e1d-2ab0-431c-a383-15e4be20a106")
svc.description = "Updated: Production S3 data lake with new region configuration"
updated = StorageServices.update(svc)
print(f"Updated to version {updated.version.root}")
import org.openmetadata.schema.entity.services.StorageService;
import org.openmetadata.sdk.fluent.StorageServices;
// Retrieve, modify, and update
StorageService service = StorageServices.retrieve("d1589e1d-2ab0-431c-a383-15e4be20a106");
service.setDescription("Updated: Production S3 data lake with new region configuration");
StorageService updated = StorageServices.update(service);
# Update by ID
curl -X PATCH "{base_url}/api/v1/services/storageServices/d1589e1d-2ab0-431c-a383-15e4be20a106" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Updated: Production S3 data lake with new region configuration"}
]'
# Update by name
curl -X PATCH "{base_url}/api/v1/services/storageServices/name/s3_datalake" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Updated: Production S3 data lake with new region configuration"}
]'
{
"id": "d1589e1d-2ab0-431c-a383-15e4be20a106",
"name": "s3_datalake",
"fullyQualifiedName": "s3_datalake",
"serviceType": "S3",
"description": "Updated: Production S3 data lake with new region configuration",
"connection": {
"config": {
"type": "S3",
"awsConfig": {
"enabled": false,
"awsAccessKeyId": "AKIA...",
"awsSecretAccessKey": "*********",
"awsRegion": "us-east-1",
"endPointURL": "https://s3.amazonaws.com/"
}
}
},
"version": 0.2,
"updatedAt": 1769982621820,
"updatedBy": "admin",
"href": "http://localhost:8585/api/v1/services/storageServices/d1589e1d-2ab0-431c-a383-15e4be20a106",
"owners": [],
"tags": [],
"deleted": false,
"domains": []
}
Update a Storage Service
Create a storage service or update it if it already exists, usingPUT /v1/services/storageServices with the full request body. Send the complete definition, not just the fields you want to change. To change only some fields, use PATCH with a JSON Patch array and the application/json-patch+json content type, as shown in the PATCH examples below.
Body Parameters
string
required
Name of the storage service. Must be unique across all storage services.
string
required
Type of storage service, for example
S3, GCS, ADLS, CustomStorage.object
required
Connection configuration specific to the service type.
Show properties
Show properties
object
Service-specific connection configuration, for example AWS credentials for S3, project ID for GCS.
string
Human-readable display name for the storage service.
string
Description of the storage service in Markdown format.
array
array
Fully qualified names of the domains to assign for governance purposes.
array
PUT /v1/services/storageServices
curl -X PUT "{base_url}/api/v1/services/storageServices" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{
"name": "s3_datalake",
"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/"
}
}
}
}'
from metadata.sdk import configure
from metadata.sdk.entities import StorageServices
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
# Retrieve, modify, and update
svc = StorageServices.retrieve("d1589e1d-2ab0-431c-a383-15e4be20a106")
svc.description = "Updated: Production S3 data lake with new region configuration"
updated = StorageServices.update(svc)
print(f"Updated to version {updated.version.root}")
import org.openmetadata.schema.entity.services.StorageService;
import org.openmetadata.sdk.fluent.StorageServices;
// Retrieve, modify, and update
StorageService service = StorageServices.retrieve("d1589e1d-2ab0-431c-a383-15e4be20a106");
service.setDescription("Updated: Production S3 data lake with new region configuration");
StorageService updated = StorageServices.update(service);
# Update by ID
curl -X PATCH "{base_url}/api/v1/services/storageServices/d1589e1d-2ab0-431c-a383-15e4be20a106" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Updated: Production S3 data lake with new region configuration"}
]'
# Update by name
curl -X PATCH "{base_url}/api/v1/services/storageServices/name/s3_datalake" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Updated: Production S3 data lake with new region configuration"}
]'
{
"id": "d1589e1d-2ab0-431c-a383-15e4be20a106",
"name": "s3_datalake",
"fullyQualifiedName": "s3_datalake",
"serviceType": "S3",
"description": "Updated: Production S3 data lake with new region configuration",
"connection": {
"config": {
"type": "S3",
"awsConfig": {
"enabled": false,
"awsAccessKeyId": "AKIA...",
"awsSecretAccessKey": "*********",
"awsRegion": "us-east-1",
"endPointURL": "https://s3.amazonaws.com/"
}
}
},
"version": 0.2,
"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 updated storage service object with the new version number.Response
string
Unique identifier for the storage service (UUID format).
string
Storage service name.
string
Fully qualified name of the service.
string
Updated description.
number
Incremented version number.
Error Handling
| Code | Error Type | Description |
|---|---|---|
400 | BAD_REQUEST | Invalid or malformed request body |
401 | UNAUTHORIZED | Invalid or missing authentication token |
403 | FORBIDDEN | User lacks permission to update this storage service |
409 | CONFLICT | Concurrent modification detected |
Was this page helpful?