Skip to main content
Skip table of contents

Deploy a marketplace

There are two types of Marketplace. An Account Marketplace has a built-in API account that all users use to access the Marketplace. A User Marketplace needs you to create separate user profiles for each user in your Cyclr account.

You need an Integrations button in your application’s interface to allow your users to view a marketplace and install templates.

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

  2. Direct the user to the URL in their web browser.

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 console. The API User has access to the account, but can’t sign in to the Cyclr interface.

Deploy 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 numbers.

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.

Deploy Marketplace response

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

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.

Deploy a user Marketplace

To deploy a user Marketplace, you make a similar request to the the Cyclr REST API’s POST /v1.0/users/marketplace endpoint.

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.

Example 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.