Skip to content

Contract Editor

The contract editor has many

ItemDescription
OpenPress on this button to load an existing contract
NewPress this to create a new contract
ManagePress 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.

ItemDescription
DescriptionThis section is for adding a custom description to the contract
EndpointThis is where you place the API URL.
Request TypeSelect between a Post, Get, Put, Patch, Delete, Head , Options request type
HeadersOption 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
ParametersOptional 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 TypeThis gives the option of setting the format of the body as being either Text or JSON
BodyPut the body content in this section
Curl OptionsAdd any further curl options here. Generally this is empty
Auth TypeProvides 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.

ItemDescription
DescriptionThis section is for adding a custom description to the contract
Server HostThe remote server connection string. If yours is a URL add the URL without the https://
Server PortThis is generally 3306, but in many Managed Databases this could be something different
DatabaseName of the database schema that you want to use
UsernameUsername for connecting to the database server
PasswordPassword for connecting to the database server
Secure Connection MethodSelect 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.

ItemDescription
DescriptionThis section is for adding a custom description to the contract
Server From NameThis is the email server short description name like "My Cool Email System"
Server HostThis is the address of the server. This will generally start with tls://
Server PortThis is typically port 587, but some services use a different port
UsernameUsername for the SMTP service
PasswordPassword 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: