API management and Embedded integrations

The API operation trigger is not designed to be used in Solutions and Solution Instances.

To make use of API management in your Embedded integrations, you can use the HTTP client to make any necessary calls to endpoints that you have set up in standalone API management projects within your Embedded workspace.

The query / body parameters can be dynamically passed in to a Solution Instance by making use of config data.

It is important to note that APIm authentications cannot be created dynamically for external Embedded End Users via the Config Wizard.

Therefore APIm endpoints can only be called using hardcoded static authentications.

So in Solutions and Solution Instances a common approach would be to use APIm to build utility APIs which are not dependent on an End User's unique service authentications.

For example an AI utility endpoint which summarizes information such as the following:

Could be used in a Solution which allows End Users to activate an integration which sends them a weekly Slack message about their open / working leads.

In this Solution all an End User would have to do is e.g. enter the day and time they want to receive the notification.

The key point to notice here is that the authentication for the Summarize API is hardcoded as a static authentication - i.e. the Solution Instance is programmatically calling the endpoint on behalf of the End User.

When we look back in the Solution's main workflow, we can see that:

  • The Salesforce and Slack steps are standard service connector steps which will be tied to the End User's auth, which they configure in the Config Wizard, as usual

  • The 'Call summarize API' step makes use of the APIm endpoint and its auth is hardcoded in the Solution Editor as shown above

Internal Embedded APIm use cases
Copy

For some solutions it may be feasible to make use of static auths for APIm endpoints to get information specific to particular users.

In this case it may be that the static auth is for e.g. the same Salesforce account that all your internal Embedded end users are in. Therefore you could use config data to dynamically pass identifying (non-sensitive) information to the APIm endpoint.

Using APIm to update and report on Solution Instances
Copy

You can also use Tray's GraphQL client to interact with Tray's Embedded APIs to make changes to various aspects of SIs:

  • Reporting on existing Solution Instances

  • Deleting disabled Solution Instances

  • Deleting unused auths

  • Recreating auths

  • Changing config slot values

Using API management you could enable your support team to send a simple request to make changes without having to log into Tray, or needing access to the Embedded master token.

Notes on Embedded incompatibility with the API operation trigger
Copy

API projects in an Embedded workspace should be standalone APIm projects, and not part of an Embedded Solution.

If an API Operation Trigger is used in a project that has a solution, you will be blocked from publishing that solution until the API Operation workflow is gone (or the trigger is changed).