Create a REST client

With Collibra Command Line Interface, you can create a REST client with a single command.

rest-client-create --api collibra-core --language java --projectName MyCollibraProject

The fully configured project allows you to:

  • Perform API calls with a simple method call.
  • Use Collibra model objects directly.

Command

rest-client-create

Description

Options

Output

Generate a client for the Collibra Platform REST APIs.
  • --api string

    The Collibra API used to generate the client.

    Available option: collibra-core.

  • --language or -l

    The programming language of the client.

    Available option: java.

  • --projectName or -n string

    The name of the Gradle project and the folder containing the client.

  • --packageName or -p

    The package used by the sources of the client.

    This is an optional parameter. By default, the package name is com.collibra.client.

The project is generated in the folder you have started the CLI.

The project folder contains:

  • .openapi-generator/
  • build.gradle
  • gradlew
  • gradle/
  • specFiles/
  • gradlew.bat
  • gradle.properties
  • src/
  • README.md
  • settings.gradle

The client is generated in src/java/<packageName>.

The README.md file contains a script example that you can use to bootstrap your project.

Set your Collibra Platform URL in the COLLIBRA_HOST variable as well as your credentials.

Example of a REST client generated by the Collibra Command Line Interface