Appearance
Contract Editor
The contract editor has many
| Item | Description |
|---|---|
| Open | Press on this button to load an existing contract |
| New | Press this to create a new contract |
| Manage | Press this button to manage contracts |
When you press on the New button you will be presented with a dialog to choose the type of contract to create. The three types are API, MySQL and Email Server.
If you choose API from the selection dialog you will see the following screen.
API Contract Entry
API contracts are for standard API requests. API requests have a set of configurations that need to be specified in the contract entry form. Below is a description of the different settings.
| Item | Description |
|---|---|
| Description | This section is for adding a custom description to the contract |
| Endpoint | This is where you place the API URL. |
| Request Type | Select between a Post, Get, Put, Patch, Delete, Head , Options request type |
| Headers | Option section for adding headers to the request. Just press the Add button to add the key and value for each header. You can add as many headers as need by simply pressing on the Add button for each new header |
| Parameters | Optional section for adding get parameters. Just press the Add button to add the key and value for each header. You can add as many headers as need by simply pressing on the Add button for each new parameter |
| Body Request Type | This gives the option of setting the format of the body as being either Text or JSON |
| Body | Put the body content in this section |
| Curl Options | Add any further curl options here. Generally this is empty |
| Auth Type | Provides options for authorization type. You can choose one of the following authorization types: No Auth, Basic Auth, Bearer Token, or API key |
MySql Contract Entry
MySQL contracts are for remote MySql databases. This interface may also work with MariaDb but varies in some cases. Mysql connections are generally implemented in two types of connection methods. The first method is connection over SSH and the second is a connection over SSL. There is a None option, but it is highly recommended that you do not allow your database to be connected without any type of secure connection method.
| Item | Description |
|---|---|
| Description | This section is for adding a custom description to the contract |
| Server Host | The remote server connection string. If yours is a URL add the URL without the https:// |
| Server Port | This is generally 3306, but in many Managed Databases this could be something different |
| Database | Name of the database schema that you want to use |
| Username | Username for connecting to the database server |
| Password | Password for connecting to the database server |
| Secure Connection Method | Select None, Connect over SSH, or Connect over SSL |
If the Secure Connection Method is set to Connect over SSH, 3 more entries will be shown to add the SSH Host, the SSH username and the SSH password.
If the Secure Connection Method is set to Connect over SSL, an upload button will be presented. This if for uploading the ca-cerificates.crt file. You can get this file from your managed database provider.
Email Server Contract Entry
Email Server Contracts are for SMTP relay servers like SMTP2GO, SMTP.com, SendGrid.com, Mailgun.com, etc. RobotAgentz is the default email service, but it limited in how many emails can be sent per day. If you are needing more email capacity then it is recommended to use your own email service like one of the above mentioned. In order to use one of them they generally use a SMTP configured connection. The following is how this connection contract is configured.
| Item | Description |
|---|---|
| Description | This section is for adding a custom description to the contract |
| Server From Name | This is the email server short description name like "My Cool Email System" |
| Server Host | This is the address of the server. This will generally start with tls:// |
| Server Port | This is typically port 587, but some services use a different port |
| Username | Username for the SMTP service |
| Password | Password for the SMTP service |
After this is configured, navigate over to the Mission Editor and create a simple mission to send an email using this new contract. The new contract is entered into the "Email Server" section of the email task block. Here is an example of testing a new contract called razsmtp: