GET /v1/storedProcedures
from metadata.sdk import configure
from metadata.sdk.entities import StoredProcedures
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
# List first page
procedures = StoredProcedures.list(limit=50)
for sp in procedures.data:
print(f"{sp.fullyQualifiedName}")
# List all with auto-pagination
for sp in StoredProcedures.list_all():
print(f"{sp.fullyQualifiedName}")
# Filter by database schema
procedures = StoredProcedures.list(
databaseSchema="snowflake_prod.analytics.public",
fields=["owners", "tags", "domain"],
limit=50
)
for sp in procedures.data:
print(f"{sp.fullyQualifiedName}")
if sp.owners:
print(f" Owners: {[o.name for o in sp.owners]}")
if sp.tags:
print(f" Tags: {[t.tagFQN for t in sp.tags]}")
{
"data": [
{
"id": "d02b24fa-a246-4563-adf1-9ad21f251c0e",
"name": "calculate_average",
"fullyQualifiedName": "sample_data.ecommerce_db.shopify.calculate_average",
"description": "Procedure to calculate average",
"storedProcedureCode": {
"code": "CREATE OR REPLACE PROCEDURE calculate_average(numbers INT ARRAY) RETURNS FLOAT NOT NULL LANGUAGE SQL AS $$DECLARE sum_val INT = 0;count_val INT = 0;average_val FLOAT;BEGIN\n FOR num IN ARRAY numbers DO sum_val := sum_val + num;\n count_val := count_val + 1;\nEND FOR;\nIF count_val = 0 THEN\n average_val := 0.0;\nELSE\n average_val := sum_val / count_val;\nEND IF;\nRETURN average_val;\nEND;$$;"
},
"version": 0.1,
"updatedAt": 1769982660822,
"updatedBy": "admin",
"storedProcedureType": "StoredProcedure",
"href": "http://localhost:8585/api/v1/storedProcedures/d02b24fa-a246-4563-adf1-9ad21f251c0e",
"databaseSchema": {
"id": "4dd30184-009c-4792-b296-9562eaed651f",
"type": "databaseSchema",
"name": "shopify",
"fullyQualifiedName": "sample_data.ecommerce_db.shopify",
"description": "This **mock** database contains schema related to shopify sales and orders with related dimension tables.",
"displayName": "shopify",
"deleted": false,
"href": "http://localhost:8585/api/v1/databaseSchemas/4dd30184-009c-4792-b296-9562eaed651f"
},
"database": {
"id": "0be090de-0941-48c4-af49-a6157c91cda0",
"type": "database",
"name": "ecommerce_db",
"fullyQualifiedName": "sample_data.ecommerce_db",
"description": "This **mock** database contains schemas related to shopify sales and orders with related dimension tables.",
"displayName": "ecommerce_db",
"deleted": false,
"href": "http://localhost:8585/api/v1/databases/0be090de-0941-48c4-af49-a6157c91cda0"
},
"serviceType": "BigQuery",
"deleted": false,
"owners": [],
"tags": [],
"domains": [],
"processedLineage": false,
"entityStatus": "Unprocessed"
}
],
"paging": {
"after": "...",
"total": 12
}
}
List Stored Procedures
List all stored procedures with optional filtering and pagination
GET
/
v1
/
storedProcedures
GET /v1/storedProcedures
from metadata.sdk import configure
from metadata.sdk.entities import StoredProcedures
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
# List first page
procedures = StoredProcedures.list(limit=50)
for sp in procedures.data:
print(f"{sp.fullyQualifiedName}")
# List all with auto-pagination
for sp in StoredProcedures.list_all():
print(f"{sp.fullyQualifiedName}")
# Filter by database schema
procedures = StoredProcedures.list(
databaseSchema="snowflake_prod.analytics.public",
fields=["owners", "tags", "domain"],
limit=50
)
for sp in procedures.data:
print(f"{sp.fullyQualifiedName}")
if sp.owners:
print(f" Owners: {[o.name for o in sp.owners]}")
if sp.tags:
print(f" Tags: {[t.tagFQN for t in sp.tags]}")
{
"data": [
{
"id": "d02b24fa-a246-4563-adf1-9ad21f251c0e",
"name": "calculate_average",
"fullyQualifiedName": "sample_data.ecommerce_db.shopify.calculate_average",
"description": "Procedure to calculate average",
"storedProcedureCode": {
"code": "CREATE OR REPLACE PROCEDURE calculate_average(numbers INT ARRAY) RETURNS FLOAT NOT NULL LANGUAGE SQL AS $$DECLARE sum_val INT = 0;count_val INT = 0;average_val FLOAT;BEGIN\n FOR num IN ARRAY numbers DO sum_val := sum_val + num;\n count_val := count_val + 1;\nEND FOR;\nIF count_val = 0 THEN\n average_val := 0.0;\nELSE\n average_val := sum_val / count_val;\nEND IF;\nRETURN average_val;\nEND;$$;"
},
"version": 0.1,
"updatedAt": 1769982660822,
"updatedBy": "admin",
"storedProcedureType": "StoredProcedure",
"href": "http://localhost:8585/api/v1/storedProcedures/d02b24fa-a246-4563-adf1-9ad21f251c0e",
"databaseSchema": {
"id": "4dd30184-009c-4792-b296-9562eaed651f",
"type": "databaseSchema",
"name": "shopify",
"fullyQualifiedName": "sample_data.ecommerce_db.shopify",
"description": "This **mock** database contains schema related to shopify sales and orders with related dimension tables.",
"displayName": "shopify",
"deleted": false,
"href": "http://localhost:8585/api/v1/databaseSchemas/4dd30184-009c-4792-b296-9562eaed651f"
},
"database": {
"id": "0be090de-0941-48c4-af49-a6157c91cda0",
"type": "database",
"name": "ecommerce_db",
"fullyQualifiedName": "sample_data.ecommerce_db",
"description": "This **mock** database contains schemas related to shopify sales and orders with related dimension tables.",
"displayName": "ecommerce_db",
"deleted": false,
"href": "http://localhost:8585/api/v1/databases/0be090de-0941-48c4-af49-a6157c91cda0"
},
"serviceType": "BigQuery",
"deleted": false,
"owners": [],
"tags": [],
"domains": [],
"processedLineage": false,
"entityStatus": "Unprocessed"
}
],
"paging": {
"after": "...",
"total": 12
}
}
List Stored Procedures
List all stored procedures with optional filtering and pagination.Query Parameters
Filter by database schema fully qualified name.
Filter by database fully qualified name.
Maximum number of results to return (max: 1000000).
Cursor for backward pagination.
Cursor for forward pagination.
Comma-separated list of fields to include:
owners, tags, followers, votes, extension, domains, sourceHash. See Supported Fields below.Include
all, deleted, or non-deleted entities.GET /v1/storedProcedures
from metadata.sdk import configure
from metadata.sdk.entities import StoredProcedures
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
# List first page
procedures = StoredProcedures.list(limit=50)
for sp in procedures.data:
print(f"{sp.fullyQualifiedName}")
# List all with auto-pagination
for sp in StoredProcedures.list_all():
print(f"{sp.fullyQualifiedName}")
# Filter by database schema
procedures = StoredProcedures.list(
databaseSchema="snowflake_prod.analytics.public",
fields=["owners", "tags", "domain"],
limit=50
)
for sp in procedures.data:
print(f"{sp.fullyQualifiedName}")
if sp.owners:
print(f" Owners: {[o.name for o in sp.owners]}")
if sp.tags:
print(f" Tags: {[t.tagFQN for t in sp.tags]}")
{
"data": [
{
"id": "d02b24fa-a246-4563-adf1-9ad21f251c0e",
"name": "calculate_average",
"fullyQualifiedName": "sample_data.ecommerce_db.shopify.calculate_average",
"description": "Procedure to calculate average",
"storedProcedureCode": {
"code": "CREATE OR REPLACE PROCEDURE calculate_average(numbers INT ARRAY) RETURNS FLOAT NOT NULL LANGUAGE SQL AS $$DECLARE sum_val INT = 0;count_val INT = 0;average_val FLOAT;BEGIN\n FOR num IN ARRAY numbers DO sum_val := sum_val + num;\n count_val := count_val + 1;\nEND FOR;\nIF count_val = 0 THEN\n average_val := 0.0;\nELSE\n average_val := sum_val / count_val;\nEND IF;\nRETURN average_val;\nEND;$$;"
},
"version": 0.1,
"updatedAt": 1769982660822,
"updatedBy": "admin",
"storedProcedureType": "StoredProcedure",
"href": "http://localhost:8585/api/v1/storedProcedures/d02b24fa-a246-4563-adf1-9ad21f251c0e",
"databaseSchema": {
"id": "4dd30184-009c-4792-b296-9562eaed651f",
"type": "databaseSchema",
"name": "shopify",
"fullyQualifiedName": "sample_data.ecommerce_db.shopify",
"description": "This **mock** database contains schema related to shopify sales and orders with related dimension tables.",
"displayName": "shopify",
"deleted": false,
"href": "http://localhost:8585/api/v1/databaseSchemas/4dd30184-009c-4792-b296-9562eaed651f"
},
"database": {
"id": "0be090de-0941-48c4-af49-a6157c91cda0",
"type": "database",
"name": "ecommerce_db",
"fullyQualifiedName": "sample_data.ecommerce_db",
"description": "This **mock** database contains schemas related to shopify sales and orders with related dimension tables.",
"displayName": "ecommerce_db",
"deleted": false,
"href": "http://localhost:8585/api/v1/databases/0be090de-0941-48c4-af49-a6157c91cda0"
},
"serviceType": "BigQuery",
"deleted": false,
"owners": [],
"tags": [],
"domains": [],
"processedLineage": false,
"entityStatus": "Unprocessed"
}
],
"paging": {
"after": "...",
"total": 12
}
}
Returns
Returns a paginated list of stored procedure objects. By default, only basic fields are included. Use thefields parameter to request additional data.
Response
Array of stored procedure objects.
Show properties
Show properties
Unique identifier for the stored procedure (UUID format).
Stored procedure name.
Fully qualified name in format
service.database.schema.storedProcedure.Human-readable display name.
Reference to the parent database schema.
Type of database service (e.g., Snowflake, BigQuery, PostgreSQL).
Source code of the stored procedure.
List of owners assigned to the stored procedure. Only included when
fields contains owners.Classification tags applied. Only included when
fields contains tags.Domain assignments for governance. Only included when
fields contains domains.Users following this stored procedure. Only included when
fields contains followers.User votes and ratings. Only included when
fields contains votes.Custom properties. Only included when
fields contains extension.Supported Fields
The following fields can be requested via thefields query parameter:
| Field | Description |
|---|---|
owners | Owner references (users and teams) |
tags | Classification tags |
followers | Users following the stored procedure |
votes | User votes and ratings |
extension | Custom property values |
domains | Domain assignments for governance |
sourceHash | Hash for change detection |
Error Handling
| Code | Error Type | Description |
|---|---|---|
401 | UNAUTHORIZED | Invalid or missing authentication token |
403 | FORBIDDEN | User lacks permission to list stored procedures |
Was this page helpful?
⌘I