### Install Go SDK using go get Source: https://cloud.ibm.com/apidocs/resource-catalog/global-catalog Use `go get` to install the Global Catalog Go SDK. ```bash go get -u github.com/IBM/platform-services-go-sdk/globalcatalogv1 ``` -------------------------------- ### Install Go SDK with Go Get Source: https://cloud.ibm.com/apidocs/resource-controller Install or update the resource-controller SDK using 'go get'. ```bash go get -u github.com/IBM/platform-services-go-sdk/resourcecontrollerv2 ``` -------------------------------- ### Install Go SDK using go get Source: https://cloud.ibm.com/apidocs/mq-on-cloud Use the `go get` command to install the MQ on Cloud SDK for Go. ```bash go get -u github.com/IBM/mqcloud-go-sdk/mqcloudv1 ``` -------------------------------- ### Go SDK Installation with go get Source: https://cloud.ibm.com/apidocs/support-center/case-management Install the Go client library for the Case Management API using `go get`. ```go go get -u github.com/IBM/platform-services-go-sdk/casemanagementv1 ``` -------------------------------- ### Install Go SDK with go get Source: https://cloud.ibm.com/apidocs/context-based-restrictions Install the Context-based Restrictions Go SDK using `go get`. ```bash go get -u github.com/IBM/platform-services-go-sdk/contextbasedrestrictionsv1 ``` -------------------------------- ### Go SDK Installation with go get Source: https://cloud.ibm.com/apidocs/resource-catalog/private-catalog Download and install the Platform Services Go SDK project using the go get command. ```bash go get -u github.ibm.com/ibmcloud/platform-services-go-sdk ``` -------------------------------- ### Install Go SDK using go get Source: https://cloud.ibm.com/apidocs/usage-metering Install the Usage Metering v4 Go SDK package using the go get command. ```bash go get -u github.com/IBM/platform-services-go-sdk/usagemeteringv4 ``` -------------------------------- ### Install Go SDK with go get Source: https://cloud.ibm.com/apidocs/block-storage Use this command to install or update the Go SDK. ```bash go get -u github.com/IBM/sds-go-sdk/sdsaasv1 ``` -------------------------------- ### Install Go SDK using go get Source: https://cloud.ibm.com/apidocs/tagging Install or update the Global Tagging V1 SDK for Go using the `go get` command. ```bash go get -u github.com/IBM/platform-services-go-sdk/globaltaggingv1 ``` -------------------------------- ### Install Go SDK for Continuous Delivery (go get) Source: https://cloud.ibm.com/apidocs/tekton-pipeline Install the Go SDK for IBM Cloud Continuous Delivery using the `go get` command. This is an alternative to using Go modules. ```bash go get -u github.com/IBM/continuous-delivery-go-sdk/v2/cdtektonpipelinev2 ``` -------------------------------- ### Install Go SDK Source: https://cloud.ibm.com/apidocs/enterprise-apis/enterprise Install the Enterprise Management Go SDK using the go get command. ```go go get -u github.com/IBM/platform-services-go-sdk/enterprisemanagementv1 ``` -------------------------------- ### Install Go SDK with Go Get Source: https://cloud.ibm.com/apidocs/user-management Install or update the User Management SDK for Go using the 'go get' command. ```bash go get -u github.com/IBM/platform-services-go-sdk/usermanagementv1 ``` -------------------------------- ### Install Go SDK using go get Source: https://cloud.ibm.com/apidocs/object-storage Use the `go get` command to install or update the IBM Storage Ceph as a Service Go SDK. ```bash go get -u github.com/IBM/sds-go-sdk/sdsaasv1 ``` -------------------------------- ### Install IBM Cloud Databases Go SDK using go get Source: https://cloud.ibm.com/apidocs/cloud-databases-api/cloud-databases-api-v5 Alternatively, use `go get` to download and install the Go SDK packages. ```bash go get -u github.com/IBM/cloud-databases-go-sdk/clouddatabasesv5 ``` -------------------------------- ### Install Go SDK with go get Source: https://cloud.ibm.com/apidocs/resource-controller/resource-manager Use `go get` to install or update the Go SDK for the Resource Manager API. ```bash go get -u github.com/IBM/platform-services-go-sdk/resourcemanagerv2 ``` -------------------------------- ### Install Go SDK Source: https://cloud.ibm.com/apidocs/enterprise-apis/resource-usage-reports Install the Enterprise Usage Reports Go SDK using the go get command. ```go go get -u github.com/IBM/platform-services-go-sdk/enterpriseusagereportsv1 ``` -------------------------------- ### Get Database cURL Example Source: https://cloud.ibm.com/apidocs/watsonxdata-software Example of how to call the Get Database API using cURL. Replace placeholders like {instance_id} and {database_id} with actual values. ```curl curl -X GET -H "accept: application/json" -H "AuthInstanceId: {instance_id}" "https://{cpd-host}.cp.fyre.ibm.com/lakehouse/api/v2/database_registrations/{database_id}" ``` -------------------------------- ### Example Response for Get Mappings Source: https://cloud.ibm.com/apidocs/watsonxdata-software This is an example of a successful response body when retrieving Sal Integration Mappings. ```json { "wkc_catalog_id": "18b49d7a-9519-4539-8db5-ff080623c226", "wkc_project_id": "9519bd7a-9519-8db5-4539-ff080623c226" } ``` -------------------------------- ### Go SDK Example - Keystore Initialization Source: https://cloud.ibm.com/apidocs/uko Example demonstrating the initialization of the IBM UKO Go SDK and setting up core services for interacting with the API. ```go package main import ( "encoding/json" "fmt" "github.com/IBM/go-sdk-core/core" "github.com/IBM/ibm-hpcs-uko-sdk/ukov4" ) func main() { ``` -------------------------------- ### Example cURL Request to Get Options Source: https://cloud.ibm.com/apidocs/mq-on-cloud Example cURL command to fetch MQ service options using an IAM token and service instance GUID. ```curl curl -X GET --location --header "Authorization: Bearer ${iam_token}" --header "Accept: application/json" "${base_url}/v1/${service_instance_guid}/options" ``` -------------------------------- ### Example cURL Request to Get User Source: https://cloud.ibm.com/apidocs/mq-on-cloud This example demonstrates how to make a GET request to the MQ on Cloud API to retrieve user details using cURL. Ensure you replace placeholders with your actual token, base URL, service instance GUID, and user ID. ```curl curl -X GET --location --header "Authorization: Bearer ${iam_token}" --header "Accept: application/json" "${base_url}/v1/${service_instance_guid}/users/${user_id}" ``` -------------------------------- ### Curl example for GET integrations Source: https://cloud.ibm.com/apidocs/watsonxdata-software Use this curl command to retrieve integration details. Ensure you replace placeholders like {token} and {cpd-host} with your actual values. ```bash curl -X GET -H "accept: application/json" -H "AuthInstanceId: {token}" "https://{cpd-host}.cp.fyre.ibm.com/lakehouse/api/v2/integrations/{service_type}" ``` -------------------------------- ### Get Account Usage (Python) Source: https://cloud.ibm.com/apidocs/metering-reporting This Python example shows how to get account usage data. It calls the service with the required parameters and prints the result in a formatted JSON string. Ensure the SDK is installed and configured. ```python account_usage = usage_reports_service.get_account_usage( account_id=account_id, billingmonth=billing_month ).get_result() print(json.dumps(account_usage, indent=2)) ``` -------------------------------- ### Example Response for Get Table Columns Source: https://cloud.ibm.com/apidocs/watsonxdata-software This is an example of a successful response when listing columns for a table, showing column details like name, type, and precision. ```json { "columns": [ { "column_name": "expenses", "comment": "expenses", "extra": "", "precision": "1234567890", "type": "varchar" }, { "column_name": "amount", "comment": "amount", "extra": "", "scale": "10", "type": "integer" } ] } ``` -------------------------------- ### Create Volume Go SDK Example Source: https://cloud.ibm.com/apidocs/block-storage Example of using the Go SDK to create a volume. This snippet demonstrates initializing options and calling the CreateVolume method. ```go createVolumeOptions := ibmStorageCephAsAServiceBlockStorageApiService.NewCreateVolumeOptions( CreateMockDate("2025-02-01"), int64(1), ) volumeSummary, response, err := ibmStorageCephAsAServiceBlockStorageApiService.CreateVolume(createVolumeOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(volumeSummary, "", " ") fmt.Println(string(b)) ``` -------------------------------- ### GET Prompt Setup Status API Request Example Source: https://cloud.ibm.com/apidocs/ai-openscale This cURL command demonstrates how to retrieve the status of a prompt setup using the AI OpenScale API. Ensure you replace placeholders like {service-instance-id}, {prompt_template_asset_id}, and {Bearer token} with your actual values. ```curl curl -X 'GET' 'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/prompt_setup?prompt_template_asset_id={prompt_template_asset_id}&project_id={project_id}&space_id={space_id}&deployment_id={deployment_id}' -H 'accept: application/json' -H 'Authorization: {Bearer token}' ``` -------------------------------- ### Example GET Request for Function Revisions Source: https://cloud.ibm.com/apidocs/machine-learning-cp/machine-learning-cp-5.3.1 This cURL command demonstrates how to make a GET request to retrieve function revisions. It includes placeholders for function ID, space ID, project ID, and start token, along with query parameters for limit and version. ```curl curl --request GET 'https://us-south.ml.cloud.ibm.com/ml/v4/functions/:function_id/revisions?space_id=&project_id=&start=&limit=100&version=2020-09-01' ``` -------------------------------- ### Get All Columns Response Example (200 OK) Source: https://cloud.ibm.com/apidocs/watsonxdata-software Example JSON response when successfully retrieving column details for a table. It includes bucket, catalog, schema, table name, owner, and a list of columns with their types. ```json { "columns": [ { "bucket": "iceberg-bucket", "catalog": "iceberg_data", "columns": [ { "column": "club_name", "type": "string" }, { "column": "location", "type": "string" }, { "column": "sl_no", "type": "int" }, { "column": "stadium", "type": "string" } ], "owner": "ibmlhadmin", "schema": "s3", "table": "clubs" } ], "message": "1 entries found", "message_code": "success" } ``` -------------------------------- ### List Hosts Options and Pagination Example Source: https://cloud.ibm.com/apidocs/block-storage Shows how to use the ListHostsOptions struct to configure a request and then paginate through the results using the NewHostsPager. This example requires the `ibmstoragecephasaserviceblockstorageapiv1` and `core` packages. ```go listHostsOptions := &ibmstoragecephasaserviceblockstorageapiv1.ListHostsOptions{ IBMAPIVersion: CreateMockDate("2025-02-01"), Limit: core.Int64Ptr(int64(20)), Name: core.StringPtr("my-resource"), } pager, err := ibmStorageCephAsAServiceBlockStorageApiService.NewHostsPager(listHostsOptions) if err != nil { panic(err) } var allResults []ibmstoragecephasaserviceblockstorageapiv1.Host for pager.HasNext() { nextPage, err := pager.GetNext() if err != nil { panic(err) } allResults = append(allResults, nextPage...) } b, _ := json.MarshalIndent(allResults, "", " ") fmt.Println(string(b)) ``` -------------------------------- ### Example cURL Request to Get Application Source: https://cloud.ibm.com/apidocs/mq-on-cloud This cURL command demonstrates how to retrieve application details using the API. Ensure you replace placeholders with your actual token, GUID, and ID. ```curl curl -X GET --location --header "Authorization: Bearer ${iam_token}" --header "Accept: application/json" "${base_url}/v1/${service_instance_guid}/applications/${application_id}" ``` -------------------------------- ### Get Table Columns Response Example Source: https://cloud.ibm.com/apidocs/watsonxdata-software Example of a successful response body when retrieving table information, detailing the columns present in the table. ```json { "columns": [ { "column_name": "expenses", "comment": "", "extra": "", "precision": "1234567890", "type": "varchar" }, { "column_name": "amount", "comment": "", "extra": "", "scale": "10", "precision": "1234567890", "type": "integer" } ], "table_name": "newtable" } ``` -------------------------------- ### PhaDeploymentResponse - Provision Start Time Example Source: https://cloud.ibm.com/apidocs/dr-automation-powervs Example of the timestamp when provisioning started. ```text 2026-01-10T08:16:00Z ``` -------------------------------- ### Get Ingestion Jobs Request Example (cURL) Source: https://cloud.ibm.com/apidocs/watsonxdata-software Example cURL command to list ingestion jobs. Ensure to replace placeholders like {instance_id} and {cpd-host}. ```curl curl -X GET -H 'accept: application/json' -H 'AuthInstanceId: {instance_id}' 'https://{cpd-host}.cp.fyre.ibm.com/lakehouse/api/v2/ingestion_jobs' ``` -------------------------------- ### Activate Bucket cURL Example Source: https://cloud.ibm.com/apidocs/watsonxdata-software Example of how to activate a bucket using cURL, including necessary headers and parameters. ```bash curl -X POST -H "accept: application/json" -H "AuthInstanceId: {instance_id}" -d "" "https://{cpd-host}.cp.fyre.ibm.com/lakehouse/api/v2/bucket_registrations/{bucket_id}/activate" ``` -------------------------------- ### Curl Request to Get Training Definitions Source: https://cloud.ibm.com/apidocs/machine-learning-cp/machine-learning-cp-5.3.1 Example cURL command to retrieve training definitions. It demonstrates how to specify query parameters such as `space_id`, `project_id`, `start`, `limit`, `tag.value`, and `version`. ```curl curl --request GET 'https://us-south.ml.cloud.ibm.com/ml/v4/training_definitions?space_id=&project_id=&start=&limit=100&tag.value=&version=2020-09-01' ``` -------------------------------- ### Example Bucket Tags in Request Source: https://cloud.ibm.com/apidocs/watsonxdata-software This JSON array shows an example of how to provide tags for a bucket during registration. ```json [ "bucket-tag1", "bucket-tag2" ] ``` -------------------------------- ### Catalog Response Example Source: https://cloud.ibm.com/apidocs/watsonxdata-software Example of a successful catalog response. ```json { "actions": [], "associated_buckets": [ "d501dc2b-05db-4d93-9aed-edf93c7bb0f6-customer" ], "associated_databases": [], "associated_engines": [ "presto459", "spark422" ], "catalog_name": "iceberg_data", "catalog_type": "iceberg", "created_by": "user@example.com", "created_on": "1713155437", "description": "icebarg_data", "hostname": "hostname", "port": "", "sync_exception": [], "tags": [], "thrift_uri": "thrift://:" } ``` -------------------------------- ### Catalog Associated Buckets Example Source: https://cloud.ibm.com/apidocs/watsonxdata-software Example of associated buckets for a catalog. ```json [ "bucket_1", "bucket_2" ] ``` -------------------------------- ### Start IBM Cloud VPC Cluster with Go Source: https://cloud.ibm.com/apidocs/watsonxdata-vpcapi Demonstrates how to start a cluster using Go's standard HTTP client. Includes reading the response body. ```go package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.cvpc.lakehouse.cloud.ibm.com/v1/clusters/{id}/start" req, _ := http.NewRequest("PUT", url, nil) req.Header.Add("AuthInstanceId", "REPLACE_YOUR_CRN") req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` -------------------------------- ### Get rule request example Source: https://cloud.ibm.com/apidocs/context-based-restrictions Example of a GET request to retrieve a rule by its ID. ```http GET /v1/rules/{rule_id} ``` -------------------------------- ### Example Success Response (200) Source: https://cloud.ibm.com/apidocs/watsonxdata-software This is an example of a successful response when retrieving database registrations. ```json { "database_registrations": [ { "actions": [ "update", "delete" ], "associated_catalog": { "catalog_name": "hive_data", "catalog_tags": [ "catalog_tag_1", "catalog_tag_2" ], "catalog_type": "hive" }, "created_by": "user1@bim.com", "created_on": "1686792721", "database_details": { "database_name": "new_database", "hostname": "netezza://ps.fyre.com", "password": "samplepassword", "port": 4353, "ssl": true, "tables": "netezza_table_name", "username": "sampleuser" }, "database_display_name": "new_database", "database_id": "new_database_id", "database_type": "netezza", "description": "Description of the external Database", "tags": [ "testdatabase", "userdatabase" ] } ] } ``` -------------------------------- ### Storage Catalogs Example Source: https://cloud.ibm.com/apidocs/watsonxdata-software Example of how to specify storage catalogs for IKC integration. This is a list of strings, where each string is a catalog name. ```json [ "iceberg_data", "hive_data" ] ``` -------------------------------- ### Get all tables API request example Source: https://cloud.ibm.com/apidocs/watsonxdata-software Example curl command to retrieve all tables within a specific catalog and schema. Replace placeholders like {cpd-host}, {catalog_name}, {schema_name}, and {instance_id} with your actual values. ```curl curl -X 'GET' 'https://{cpd-host}.cp.fyre.ibm.com/lakehouse/api/v2/tables?catalog_name={catalog_name}&schema_name={schema_name}' -H 'accept: application/json' -H 'AuthInstanceId: {instance_id}' ``` -------------------------------- ### Example Bucket Actions Source: https://cloud.ibm.com/apidocs/watsonxdata-software This is an example of the actions that can be performed on a bucket. It is a list of strings representing available operations. ```json [ "read", "update" ] ``` -------------------------------- ### Service Instance GUID Example Source: https://cloud.ibm.com/apidocs/mq-on-cloud Example of a valid service instance GUID format. ```text a2b4d4bc-dadb-4637-bcec-9b7d1e723af8 ``` -------------------------------- ### Example Success Response for Get All Integrations Source: https://cloud.ibm.com/apidocs/watsonxdata-software This JSON structure represents a successful response when retrieving all existing integrations. It includes details for each integration, such as its ID, type, state, and configuration. ```json { "integrations": [ { "enable_data_policy_within_wxd": true, "integration_id": "ranger952", "modified_at": 1234567890, "modified_by": "admin", "password": "pasword_encrypted", "resource": "resource_name", "service_type": "ranger", "state": "active", "url": "http://abcd.efgh.com:9876/", "username": "username" }, { "apikey": "apikey_encrypted", "config_properties": "ikc-env.password=apikey_encrypted\nikc-env.url=https://abcd.efgh.com\nlh-unique-identifier=1234567890123456\nlh-crn=0123456789012345", "governance_properties": "query-governance.name=external", "integration_id": "ikc806", "modified_at": 1234567890, "modified_by": "admin", "service_type": "ikc", "state": "active", "storage_catalogs": [ "storage_catalog_1", "storage_catalog_2" ], "url": "https://abcd.efgh.com", "username": "username" } ] } ``` -------------------------------- ### Example Request: Get Resource Pool (Go SDK) Source: https://cloud.ibm.com/apidocs/vmware-service This Go SDK example demonstrates how to instantiate the client, set options for retrieving a resource pool, and handle the response. It includes setting custom headers like Accept-Language and X-Global-Transaction-ID. ```go package main import ( "encoding/json" "fmt" "github.com/IBM/go-sdk-core/v5/core" "github.com/IBM/vmware-go-sdk/vmwarev1" ) var ( vmwareService *vmwarev1.VmwareV1 ) func main() { getDirectorSitesPvdcsOptions := vmwareService.NewGetDirectorSitesPvdcsOptions( "site_id", "pvdc_id", ) getDirectorSitesPvdcsOptions.SetAcceptLanguage("en-us") getDirectorSitesPvdcsOptions.SetXGlobalTransactionID("transaction1") pvdc, response, err := vmwareService.GetDirectorSitesPvdcs(getDirectorSitesPvdcsOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(pvdc, "", " ") fmt.Println(string(b)) fmt.Println(response) } ``` -------------------------------- ### Get Workspace Input Variables (JavaScript) Source: https://cloud.ibm.com/apidocs/schematics/schematics Fetch workspace input variables using the IBM Cloud Schematics SDK for JavaScript. This example demonstrates parameter setup and asynchronous handling of the response. ```javascript const params = { wId: '', tId: '', }; schematicsService.getWorkspaceInputs(params) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) }); ``` -------------------------------- ### Get table details API request example Source: https://cloud.ibm.com/apidocs/watsonxdata-software Example curl command to retrieve details for a specific table. Ensure you replace placeholders like {cpd-host}, {table_name}, {catalog_name}, {schema_name}, and {instance_id} with your actual values. ```curl curl -X 'GET' 'https://{cpd-host}.cp.fyre.ibm.com/lakehouse/api/v2/tables/{table_name}?catalog_name={catalog_name}&schema_name={schema_name}' -H 'accept: application/json' -H 'AuthInstanceId: {instance_id}' ``` -------------------------------- ### Example POST tool request (Go SDK) Source: https://cloud.ibm.com/apidocs/toolchain This Go code snippet shows how to use the SDK to create a new tool. It involves setting up options and calling the create tool function. ```go createToolOptions := toolchainClient.NewCreateToolOptions(toolchainId, toolTypeId) createToolOptions.SetName(toolName) createToolOptions.SetParameters(toolParameters) tool, response, err := toolchainClient.CreateTool(createToolOptions) ``` -------------------------------- ### Example Success Response (201) Source: https://cloud.ibm.com/apidocs/watsonxdata-software Example of a successful response when creating or updating a catalog. ```json { "catalogs": [ { "actions": [ "action1", "action2" ], "catalog_name": "iceberg_data", "sync_exception": [], "tags": [ "tag1", "tag2" ] } ] } ``` -------------------------------- ### Start Time Example Source: https://cloud.ibm.com/apidocs/usage-metering Example of a start time in milliseconds since epoch, indicating from when the resource instance was metered. ```int64 1485907200000 ``` -------------------------------- ### List Key Templates - Go SDK Example Source: https://cloud.ibm.com/apidocs/uko Demonstrates how to list key templates using the IBM Cloud HPCS UKO Go SDK. Ensure the client is initialized with proper authentication. ```go package main import ( "encoding/json" "fmt" "log" "net/http" "net/url" "strings" "github.com/IBM/go-sdk-core/core" "github.com/IBM/ibm-hpcs-uko-sdk/ukov4" ) func main() { // Initialize the uko client as specified in Authentication //This struct can be left empty ukov4ListKeyTemplatesOptions := ukov4.ListKeyTemplatesOptions{ Limit: core.Int64Ptr(2), Offset: core.Int64Ptr(0), } ListKeyTemplates, _, _ := uko.ListKeyTemplates(&ukov4ListKeyTemplatesOptions) b, _ := json.MarshalIndent(ListKeyTemplates, "", " ") fmt.Println(string(b)) } ``` -------------------------------- ### Get Catalogs OK Response Source: https://cloud.ibm.com/apidocs/watsonxdata-software This is an example of a successful response when retrieving catalogs for a prestissimo engine. It returns an empty list if no catalogs are associated. ```json { "catalogs": [] } ```