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
Establish OpenMetadata Server Connection
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 bev1
for now.Retry
: number of time the request should retry if the status code returned is inRetryCodes
. Use0
to use the default valueRetryWait
: number of second to wait betwee retries. Pass 0 to use the default valueRetryCodes
: HTTP status that will trigger a retry. Passnil
to use the defaultAuthTokenMode
: defaults toBearer
AccessToken
: JWT token use to authenticate the request
Create OpenMetadata Gateway
Once the connection details are provided, you can create an OpenMetadata Gateway using the following piece of code.
How to Use APIs Using the Java Client
Once you have instantiated a Rest
object you can call any of the 4 methods to perform any kind of operation against OpenMetadata API
Get
method
Method signature
Example
Post
method
Method signature
Example
Put
method
Method signature
Example
Patch
method
Method signature
Example
Delete
method
Method signature
Example