Skip to main content

Run How-Tos

You can find many examples related to managing identities and channels in the Github repo:).

The next sections will describe each example in detail.

Running Examples

  1. Get Integration Service API's endpoint by setting the api-key and api-url in env.properties file.
  2. Make sure you have an adminIdentity.json file which is actually an Admin Identity. If this is not the case, please run example-0 (details below) to make the identity an AdminIdentity
  3. Make sure that the aforementioned file is located in the same directory from which the code is run (recommended: examples/). This folder will be known as the "examples folder" throughout this section of the docs.
  4. Run mvn compile to install the dependencies from the example folder's pom.xml.
  5. Run each example in turn either via the console or your favourite IDE.

Alternatively, a basic Dockerfile has been provided that will allow you to run all the examples in one go.

Configure the Examples

In Java, you will need to set up a env.properties file with the following properties:

api-key=XXXXXXX
api-version=vX.X
api-url=XXXXXXX
identity-file=adminIdentity.json

Please note the Java SDK assumes that an instance of the API, including its MongoDB connection, is already running elsewhere.

Run Example 0

Once you have completed the previous steps, if you do not have an identity stored in adminIdentity.json which is actually an Admin Identity you can run example-0

mvn exec:_java -Dexec.mainClass=net.gradbase.how_tos.AddAsRootIdentity