sdk

No menu items for this category

Go SDK

We now present a high-level Go API as a gentle wrapper to interact with the OpenMetadata API.

The open-source OpenMetadata SDK for Go simplifies provisioning, managing, and using OpenMetadata resources from the Go application code.
The OpenMetadata SDK for Go modules build on top of the underlying OpenMetadata REST API, allows you to use those APIs through familiar Go paradigms.

You can find the source code for the OpenMetadata libraries in the GitHub repository. As an open-source project, contributions are always welcome!

You can add the module to your application with the below command

To create OpenMetadata Gateway, you will need to establish a connection with OpenMetadata Server. The following inputs will be needed:

  • BaseURL: The url on which your instance of OpenMetadata is up and running (include the port if you need to e.g. http://localhost:8585).
  • APIVersion: pass an empty string -- this will be v1 for now.
  • Retry: number of time the request should retry if the status code returned is in RetryCodes. Use 0 to use the default value
  • RetryWait: number of second to wait betwee retries. Pass 0 to use the default value
  • RetryCodes: HTTP status that will trigger a retry. Pass nil to use the default
  • AuthTokenMode: defaults to Bearer
  • AccessToken: JWT token use to authenticate the request

Once the connection details are provided, you can create an OpenMetadata Gateway using the following piece of code.

Once you have instantiated a Rest object you can call any of the 4 methods to perform any kind of operation against OpenMetadata API

Method signature

Example

Method signature

Example

Method signature

Example

Method signature

Example

Method signature

Example