Skip to main content
Skip table of contents

Deploy a marketplace

There are two ways to deploy Cyclr’s Marketplaces. Which you choose depends on whether you intend to give your customers direct access to Cyclr or not:

  • If you don’t plan to give your customers direct access to Cyclr - to see Cycles, build their own integrations, etc - then Account Deployment is the way to go.

  • If you do, then it may be useful for your customers to see which of their colleagues has started or stopped a Cycle, for instance. In this case you can choose User Deployment.

Account Marketplace Deployment

A single and generic “API User” is used when installing Templates creating Cycles.

You create a button within your own web application’s interface that allows your users to view a Marketplace and install Integration Packages.

When that button is clicked you would:

  1. Make the following request from your application server to the Cyclr API’s /v1.0/accounts/{id}/marketplace endpoint to obtain a Marketplace URL.

  2. Direct the user to the URL in their web browser, perhaps within an iframe.

For more information about this endpoint, see the Interactive API reference page.

Note: If you deploy a Marketplace, you can see an API User in your Cyclr Partner Console under Accounts > Account Management. The API User has access to the Account, but can’t sign in to the Cyclr interface.

“Account” Marketplace Request

CODE
curl -X POST
-H "Authorization: Bearer {access_token}"
-H "Content-Type: application/json"
-H "Accept: application/json"

-d '{
	"MarketplaceId": {MarketplaceId},
	"AccountName": "{CyclrAccountName}",
	"ConnectorAuthentications": [
		{
			"Name": "{ExampleConnector}",
			"Version": "{VersionNumber}",
			"AuthenticationId": "{AuthenticationId}",
			"AuthValue": "{AuthenticationValue}",
			"Properties": [
				{
					"Name": "{Url}",
					"Value": "{http://customDomain.appName.com}"
				}
			]
		}
	]
}
' "https://{CyclrAPIDomain}/v1.0/accounts/{CYCLR_ACCOUNT_API_ID}/marketplace

Note: Pass all ConnectorAuthentications property values as strings, even if they’re numeric.

Request Parameters

Request parameter

Type

Description

{access_token}

string

Enter your Access Token to authenticate the Cyclr API.

{CyclrAPIDomain}

string

Specify your API domain according to the location of your Cyclr console. If your Cyclr instance is self-hosted, this value is your own domain.

CYCLR_ACCOUNT_API_ID

string

API ID of the account to use. If an account with this API ID doesn’t exist, Cyclr creates a new account using this value.

MarketplaceID

integer

Identify the marketplace to show.

InlineOAuth

Boolean, optional

Set to true to open all redirect pages inline with the webpage. If you run Marketplace in a HTML iframe, set this parameter to false to open OAuth redirect pages as a popup.

AccountName

string, optional

Name the account if you create a new account.

AccountDescription

string, optional

Provide a description of the account.

ConnectorAuthentications

array, optional

Use connector authentication to avoid the need for your users to authenticate against your platform.

Name

string

Name the instance of your connector in the account.

Version

string

Specify the version of the partner connector that you install. For example, 1.0.

AuthenticationId

string

Identify the connector authentication method you want to use.

AuthValue

string

If your platform needs a username and password, provide a base64 encoded version of "username:password". You can also use an OAuth token, or provided API keys as plain text.

Properties

Array, optional

Provide properties that some partner connectors need to successfully install.

CompleteParameter

string, optional

A custom value be included in the Marketplace webhook callback.

“Account” Marketplace Response

JSON
{
    "MarketplaceUrl": "{MarketplaceUrl}",
    "AccountId": "{AccountId}",
    "Token": "{UrlToken}",
    "ExpiresAtUtc": "{DateTimeValue}"    
}

Response Parameters

Response Field

Description

AccountId

Provides the ID of either the new account, or the account that you specified in the request.

ExpiresAtUtc

Displays when the Token and MarketplaceUrl expires.

MarketplaceUrl

Provides the URL you can send your user to. This URL expires five minutes Cyclr generates it or when the user accesses it.

Token

Provides the Marketplace URL token.

User Marketplace Deployment

To deploy a “User Marketplace”, you make a similar request to the Account Deployment, but to the Cyclr API’s POST /v1.0/users/marketplace endpoint and also provide the Username of the “User” accessing the Marketplace.

Console Users and Users are not the same:

  • Console Users - exist within the Cyclr Partner Console and should only be created for your colleagues.

  • Users - exist within Accounts > User Management. They only have access to one or more Accounts and cannot access the Partner Console.

For more information about the endpoint, see the Interactive API Reference page.

There are 3 additional properties to use in this Request:

Request Parameter

Type

Description

AccountId

string

The Cyclr Account API ID of the Account to use.

If it doesn’t already exist, a new Account will be created.

Username

string

Identifies the user.

If the user doesn’t already exist, a new User will be created with these details.

Password

string

Password of the user.

“User” Marketplace Request

CODE
curl -X POST
-H "Authorization: Bearer {access_token}"
-H "Content-Type: application/json"
-H "Accept: application/json"

-d '{
	"MarketplaceId": {MarketplaceId},
	"AccountId": "{CYCLR_ACCOUNT_API_ID}",
    "Username": "ExampleUser",
    "Password": "P4$$w0rd",
	"ConnectorAuthentications": [
		{
			"Name": "{ExampleConnector}",
			"Version": "{VersionNumber}",
			"AuthenticationId": "{AuthenticationId}",
			"AuthValue": "{AuthenticationValue}",
			"Properties": [
				{
					"Name": "{Url}",
					"Value": "{http://customDomain.appName.com}"
				}
			]
		}
	]
}
' "https://{CyclrAPIDomain}/v1.0/users/marketplace
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.