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. Returns not found for unknown templates.

curl -X GET "https://api.descope.com/v1/mgmt/connector/template"
{  "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    }  ]}
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[]}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?: ConnectorTemplateFieldOption[]/** * 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 ConnectorTemplateFieldOption {/** * The value to set. */value?: string/** * The option's display name. */name?: string/** * What the option means. */description?: string}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}[]}
Was this helpful?