API ReferenceManagementConnector Management
GET
/v1/mgmt/connector/template

Authorization

Descope Project ID and Management Key
AuthorizationBearer <token>

Project ID:Management Key as bearer token.

In: header

Query Parameters

id*string

The template id, such as http.

Get one connector template by id, using a valid management key, with its configuration fields: each field's name, type, whether it is required, its default value, its allowed values, the field it depends on, and its documentation. Build the configuration for CreateConnector from these fields; the server checks it against them. Secret values come from the user: don't invent them unless the user asks for a placeholder. An httpAuth value is an object with method and that method's settings: none; bearerToken with bearerToken; apiKey with apiKey: {key, token}; basic with basic: {username, password}; oauth2ClientCredentials with oauth2ClientCredentials: {clientId, clientSecret, authUrl, authStyle}, all required, where authStyle is body or header with no default, plus optional scopes as one space-separated string. A secret-object value is a list of {key, value, secret} entries; secret defaults to false, and a secret entry is read back as PLACEHOLDER_VALUE with secret: true. Leave out fields of type cloudformation-link, a console-only link, and readonly-string, which Descope generates on create and cannot be changed; give the generated value from the returned connector to the user, such as an AWS external ID to put in the IAM role's trust policy. It also returns what a flow's connector task needs: the template's commands, each with its name (the task's command), its parameters (the keys of the task's args rows), and its error ids, plus hasOutput (whether the console offers the task's resultPath; the runtime stores the response whenever resultPath is set). Returns not found for unknown templates.

curl -X GET "https://api.descope.com/v1/mgmt/connector/template?id=string"
{  "id": "string",  "name": "string",  "description": "string",  "categories": [    "string"  ],  "types": [    "string"  ],  "requiredLicense": "string",  "fields": [    {      "name": "string",      "displayName": "string",      "description": "string",      "type": "string",      "required": true,      "defaultValue": null,      "options": [        {          "value": "string",          "name": "string",          "description": "string"        }      ],      "dependsOn": {        "name": "string",        "values": [          null        ]      },      "format": "string",      "secret": true    }  ],  "commands": [    {      "name": "string",      "description": "string",      "parameters": [        {          "name": "string",          "description": "string",          "type": "string",          "required": true,          "options": [            {              "value": "string",              "name": "string",              "description": "string"            }          ],          "hidden": true,          "defaultValue": "string"        }      ],      "errors": [        {          "id": "string",          "label": "string"        }      ],      "tags": [        "string"      ],      "defaultAsync": true    }  ],  "hasOutput": true}
export interface Response {/** * The template id, which is the `type` of the connectors created from it, such as `http`. */id?: string/** * The template's display name, such as `HTTP`. */name?: string/** * What the connector does. */description?: string/** * Categories for browsing templates, such as `Observability`. */categories?: string[]/** * Where connectors made from this template can be used: `flows`, `messaging` or `audit`. */types?: string[]/** * The company license this template needs, or empty when it needs none. */requiredLicense?: string/** * The configuration fields, in display order. Only returned by GetConnectorTemplate. */fields?: ConnectorTemplateField[]/** * The commands a connector task can run (its `command` argument), in display order, without the ones the *  console hides. Only returned by GetConnectorTemplate. */commands?: ConnectorTemplateCommand[]/** * Whether the console offers the task's `resultPath`. The runtime writes the response at *  `connectors.<resultPath>` whenever `resultPath` is set. Only returned by GetConnectorTemplate. */hasOutput?: boolean}export interface ConnectorTemplateField {/** * The field's key in the connector's `configuration`. */name?: string/** * The field's display name. */displayName?: string/** * What the field is for and how to get its value. */description?: string/** * The value's type: `string`, `number` and `boolean` are plain values; `secret`, `secret-file` and `secret-json-file` *  are secret strings; `secret-object` is a list of `{key, value, secret}` entries, where the values of entries with *  `secret: true` are stored encrypted and returned as `PLACEHOLDER_VALUE`; `httpAuth` is an authentication object *  with `method` and that method's settings, see GetConnectorTemplate, whose secret values (API key token, basic *  password, bearer token, OAuth client secret) are likewise returned as `PLACEHOLDER_VALUE` and kept when sent back; *  `readonly-string` is generated by Descope on create, returned in the connector's `configuration`, and *  may only be sent back unchanged; `cloudformation-link` is a console link to an AWS CloudFormation stack, not a *  value, and is never sent; other types such as `auditFilters` are objects specific to the template. */type?: string/** * Whether a value is required when the field applies, see `dependsOn`. A missing field with a `defaultValue` is *  filled in. */required?: boolean/** * The value filled in when the field is missing on create or update, if any. */defaultValue?: {[k: string]: unknown}/** * The allowed values, when the field has a fixed set of them. */options?: {/** * The value to set. */value?: string/** * The option's display name. */name?: string/** * What the option means. */description?: string}[]/** * When set, the field applies only when another field has one of the given values. */dependsOn?: ConnectorTemplateFieldDependsOn/** * A format the value must have, such as `email` or `url`, or empty. */format?: string/** * Whether the field holds secrets, which are stored encrypted and returned as `PLACEHOLDER_VALUE`: the whole value *  for `secret`, `secret-file` and `secret-json-file`, and the values of entries with `secret: true` for *  `secret-object`. Fields of type `httpAuth` also hold secrets inside their value, see `type`. */secret?: boolean}export interface ConnectorTemplateFieldDependsOn {/** * The name of the field this field depends on. */name?: string/** * The values of that field for which this field applies. */values?: {[k: string]: unknown}[]}export interface ConnectorTemplateCommand {/** * The command's name, the connector task's `command` argument. */name?: string/** * What the command does. */description?: string/** * The command's parameters. */parameters?: ConnectorTemplateCommandParameter[]/** * The error ids the command declares. The task can also fail with the connector action's own errors. */errors?: ConnectorTemplateCommandError[]/** * The command's tags, such as `with-email`. */tags?: string[]/** * Set the connector task's `async` argument to this value, unless there's a reason to differ. */defaultAsync?: boolean}export interface ConnectorTemplateCommandParameter {/** * The parameter's name, the `key` of its row in the task's `args`. */name?: string/** * What the parameter is for. */description?: string/** * The value's type. */type?: string/** * Whether the console requires a value. The runtime doesn't check it. */required?: boolean/** * The values the parameter accepts, when it is a choice. */options?: ConnectorTemplateFieldOption[]/** * Whether the runtime sets the value itself, from the context key of the same name, over any value in `args`. */hidden?: boolean/** * A suggested value for this parameter's row in the task's `args`. It may be an example to replace. */defaultValue?: string}export interface ConnectorTemplateFieldOption {/** * The value to set. */value?: string/** * The option's display name. */name?: string/** * What the option means. */description?: string}export interface ConnectorTemplateCommandError {/** * The error id. */id?: string/** * The error's display name. */label?: string}
Was this helpful?