Create a connection

 


Log in a Swagger UI instance

Before you can set up a connection, you need to login a Swagger UI instance first. In practice, data managers will need to log in the Production Swagger UI of their respective crops before a connection can be made. For demonstration purposes, we will be using the UAT Swagger UI instance below.

 

  1. Load the UAT Swagger UI instance in an internet browser by using this link.

  2. To begin your login process, click the Authorize button indicated by an open padlock .

 

3. A modal window will be shown. In the Value field, you need to enter a token.

 

4. Generate a token by entering this URL in a new browser: https://cbapi-uat.ebsproject.org/v3/docs/auth/login

“/auth/login” indicates that you aim to generate a token for login purposes using your organizational email address.

 

5. The browser will ask you to log in using your organizational email address. Click the one that applies to you.

Sign in with your organizational email address if you haven’t signed in your current browser yet.

 

6. The token will be shown after the page loads. Copy the entire token.

7. After pasting the token in the Value field, click Authorize.

 

8. Your login is confirmed when the word “Authorized” is displayed in the modal window.

 

9. Upon closing the modal window, the right-most button should now display a secure padlock. You can now use the UAT Swagger instance APIs to create your connection. You can browse different API calls and connect these to your printout templates or reports.

 

 

Create a connection

  1. In the Printout tool, click Connections.

 

2. On the main browser, click New Connection.

 

3. The Create Data Source Connection modal window will appear. You only need to fill-out the general details and the Query Parameters section to create a connection.

General Details

A. Connection Name field allows you to set your connection's name.

B. Data Source URi field allows you to create a link to a specific data table via the API. It follows this input format: Server Value/API for specific data

  • Server Value pertains to the URL of the specific Swagger UI link that is found in this text box:

  • APIs are protocols that allow programs to communicate to each other, such as:

C. Http Method field lets you specify the API command.

D. Link to Template field lets you link the connection to your template.

Query Parameter

E. Name field requires you to identify the occurrence ID by typing, “occurrenceDbId”

F. Value or Expression field requires you to set the expression using this format: “?occurrenceDbId”

G. Default Value field allows you to set a default occurrence ID.

The Data Source URi follows this input format: Server Value/API for specific data

 

4. Once you are done, click Test Connection.

5. You will be notified by a confirmation message once the connection is working successfully.


Great job! You now have a successfully created template and a working connection. Next up is designing the template!