Skip to main content

DCMEエンドポイント

DCMEエンドポイントとパラメーター

DCMEエンドポイントは、 ユーザー向けDCMEエンドポイント 管理者向けDCMEエンドポイント の2つのグループに分けられます。すべてのDCMEエンドポイントについて、TLSをServer上で設定する必要があります。

オブジェクト関係に関する詳細とAPIでの使用方法については、 オブジェクト関係 のセクションを参照してください。

データ接続の詳細については、 DCM - Server および データ接続マネージャー: Server UI のヘルプページを参照してください。DCM - Serverデータ接続マネージャー: Server UI

What Is a DCM Connection?

“DCM Connection” is composed from its own parameters and two types of subobjects: DataSource (there is always just one) and Credentials (in common scenarios there are zero, one or two credentials but in rare cases there could be even more, the number is connector-specific). Each Credential has a different credRole inside the Connection. DCM API works on Connections as whole objects including DataSource and Credentials.

ユーザー向けDCMEエンドポイント

これらのエンドポイントは、APIアクセスを持つユーザーが使用できます。

注記

  • All API endpoints return individual user data (each user can only see and manage their own connections).

  • All examples are in PowerShell.

DCM接続レコードを取得する

DCM接続レコードを取得するには、 GET {baseURL}/v3/dcm/connections/{id} エンドポイントを使用します。このエンドポイントは、関連するデータソースや資格情報、共有情報など、DCM接続に関するすべての情報を返します。

パラメーター

id (string): Required. Enter the ID of the DCM Connection on which you want to obtain information.

curl --location --request GET 'https://localhost/webapi/v3/dcm/connections/d8cc5fca-86cc-4e7e-93a3-d500cca9a3f3' `
  --header 'Authorization: Bearer BearerTokenGoesHere'

ワークフローで参照されているDCM接続を取得する

ワークフローで参照されているDCM接続レコードを取得するには、 GET {baseURL}/v3/dcm/connections/lookup エンドポイントを使用しますこのエンドポイントは、関連するデータソースや資格情報、共有情報など、DCM接続に関するすべての情報を返します。

注記

このエンドポイントで使用される接続IDは、他のDCMエンドポイントで使用されるIDとは異なります。IDはさまざまなDCMオブジェクトを参照するために使用されますが、接続IDは特定のユーザーのDCM接続を参照するためにのみ、ワークフローで使用されます。

パラメーター

connectionId (string): Required. Enter the DCM ConnectionID on which you want to obtain information.

curl --location --request GET 'https://localhost/webapi/v3/dcm/connections/lookup?connectionId=d8cc5fca-86cc-4e7e-93a3-d500cca9a3f3' `
  --header 'Authorization: Bearer BearerTokenGoesHere'

指定したユーザーおよびグループとDCM接続を共有する

指定したユーザーまたはグループとServerの実行のためのDCM接続を共有するには、 PUT {baseURL}/v3/dcm/connections/{id}/sharing/execution エンドポイントを使用します。

注記

これはPUTエンドポイントであるため、既存のリストにユーザーやユーザーグループを追加するのではなく、既存の共有を上書きします。提供するユーザーとグループのリストを空にすることはできません。既存の共有を削除するには、DELETEエンドポイントを使用します。

パラメーター

  • id (文字列): 必須です。他のユーザーまたはグループと共有するDCM接続IDを入力します。

  • sharingContract (本文): 必須です。実行の共有を更新するには、sharingContractパラメーターが必要になります。両方の配列が必要で、空のままにできる配列はどちらか1つだけです。

    • userIds (文字列配列): 接続を共有するすべてのユーザーIDのリストを入力します。共有するユーザーがいない場合(ユーザーグループのみ)は、配列を空のままにします。

    • userGroupIds (文字列配列): 接続を共有するすべてのユーザーグループIDのリストを入力します。共有するユーザーグループがない場合(ユーザーのみ)は、配列を空のままにします。

curl --location --request PUT 'https://localhost/webapi/v3/dcm/connections/d8cc5fca-86cc-4e7e-93a3-d500cca9a3f3/sharing/execution' `
  --header 'Authorization: Bearer BearerTokenGoesHere' `
  --header 'Content-Type: application/json' `
  --data '{
    "userIds": [
      "61d57bea3c15317e1a48205b",
      "61d564361d6d5da7ad461a32"
    ],
    "userGroupIds": [
      "d5da7ad4"
    ]
  }'

DCM接続の共有を解除する

DCM接続の共有を解除するには、 DELETE {baseURL}/v3/dcm/connections/{id}/sharing/execution エンドポイントを使用します。

パラメーター

id (string): Required. Enter the DCM Connection ID you want to unshare from all users and groups.

curl --location --request DELETE 'https://localhost/webapi/v3/dcm/connections/d8cc5fca-86cc-4e7e-93a3-d500cca9a3f3/sharing/execution' `
  --header 'Authorization: Bearer BearerTokenGoesHere'

DCM接続を作成または更新する

DCM接続を作成または更新するには、 POST {baseURL}/v3/dcm/connections エンドポイントを使用します。

単一のエンドポイントが作成と更新の両方の機能を備えており、その区別はオブジェクトIDがリクエストに含まれているかどうかでされます。新しい接続を作成する際の、既存のデータソースまたは資格情報の再利用は、現在サポートされていません。

パラメーター

  • id (string): Optional. Enter a connection ID if you wish to update an existing connection. Skip if you wish to create a new connection.

  • name (string): Required. Enter the name of your connection.

    注記

    There are multiple “names” inside a DCM Connection:

    • Connection.name: The name of the Connection itself. Admins interact with this name via the API.

    • Connection.dataSource.object.name: Data Source name visible on the Data Sources tab in the UI.

    • Connection.credentials.<credRole>.object.name: Credential names visible on the Credentials tab in the UI.

    For more details, see the What is a DCM Connection? section.

  • schemaName (string): Required. This is the identifier for a DCM schema, which is used to render and validate the associated parameters in the DCM UI. Each connector defines its own set of supported DCM schemas. The selected connection schema also specifies which DataSource and Credential schemas must be used for the DataSource and Credential sections of the connection. For more details, see What is a DCM Connection? and How is a Connector Related to a DCM Connection?

  • allowInSdks (boolean): Optional. Makes the Connection accessible to python SDK tools.

  • parameters (object): Required. This property holds configuration details specific to the schema and technology you are connecting to.

    注記

    There are several different parameters objects in a DCM connection structure, each used in a different context:

    • Connection.parameters: for the overall connection (not yet visible in UI, coming soon)

    • Connection.dataSource.object.parameters: for the Data Source part of the connection

    • Connection.credentials.<credRole>.object.parameters: for each Credential role

    • Connection.credentials.<credRole>.object.secrets.<secretType>.parameters: for credential secrets, per secret type

    Each parameters object has its own structure and required fields, which depend on the technology and schemaName defined in that part of the connection. They are independent and can (and often do) contain different fields.

    The parameters property is required but may be provided as empty objects ({}) if no parameters are needed for a given schema.

    Tip:

    To determine the correct fields for any parameters object:

    1. Create a DCM Connection in the Alteryx Server UI for your target technology.

    2. Query the Connection via API: GET /v3/dcm/connections/{id}

    3. Review the structure and fields returned for each parameters object in the response.

    This is the most reliable way to discover the required and available fields for your specific data source or credential.

    Because parameters fields are data source and credential specific, a comprehensive example for every technology isn’t practical in this documentation. Please use the above workflow to get up-to-date, source-specific examples.

  • dataSource (object): Required. The data source used for the connection, describing the data source instance host and additional parameters, as seen in DCM UI.

    • object (object): Required.

      • id (string): Enter a data source ID if you wish to update an existing connection. Skip if you wish to create a new connection. Using an existing data source when creating new connections is currently unavailable.

      • name (string): Required. Enter a name for the data source.

      • schemaName (string): Required. Enter the schema name of the selected data source. For a detailed description, refer to the Connection.schemaName property.

      • parameters (object): Required. Parameters for the DataSource part of the connection. See Connection.parameters property for more details. Provide empty object {} if no parameters are needed.

  • credentials (object): Required. Key value pairs of <credRole>: object. <credRole>s are defined by the selected DCM schema. The object has just one property named “object" which then contains all the Credential properties. Some connections may not require any credentials, while others may have multiple nested Credential objects.

    From the examples below, you can see that the SQLServer (MSSQL) Username-Password authentication uses main <credRole>. Reshift connection with Identity Pool authentication and Snowflake with OAuth authentication use oauthApplication and oauthTokens <credRoles> for their credentials.

    For more details, see What is a DCM Connection? and How is a Connector related to DCM Connection?

    • object (object): Defines properties of Credential parts of the Connection.

      • id (string): Enter a credential ID if you wish to update an existing connection. Skip if you wish to create a new connection. Using an existing credential when creating new connections is currently unavailable.

      • name (string): Required. Enter the name of your credential.

      • schemaName (string): Required. Enter the schema name of the selected credential.

      • parameters (object): Required. Parameters for the Credential parts of the connection. See Connection.parameters property for more details. Provide empty object {} if no parameters are needed.

Create a SQL Server DCM Connection Using UserName-Password Credentials

curl --location --request POST 'https://localhost/webapi/v3/dcm/connections' `
  --header 'Authorization: Bearer BearerTokenGoesHere' `
  --header 'Content-Type: application/json' `
  --data '{
    "name": "MSSQL DEV Admin",
    "schemaName": "database-odbc-dsn-mssql",
    "parameters": {},
    "dataSource": {
      "object": {
        "name": "SQL Server DEV",
        "schemaName": "database-odbc-dsn-mssql",
        "parameters": {
          "dsn": "sql server"
        }
      }
    },
    "credentials": {
      "main": {
        "object": {
          "name": "SQL Server Admin Credentials",
          "schemaName": "username_password",
          "parameters": {},
          "userName": "admin",
          "secrets": {
            "password": {
              "value": {
                "text": "password"
              },
              "parameters": {}
            }
          }
        }
      }
    }
  }'

Create an ODBC DCM Connection to Redshift Using OAuth Authentication with AWS IAM / Cognito

curl --location --request POST 'https://localhost/webapi/v3/dcm/connections' `
  --header 'Authorization: Bearer BearerTokenGoesHere' `
  --header 'Content-Type: application/json' `
  --data '{
    "name": "Connection Name",
    "schemaName": "database-odbc-redshift-simba-oauth-iam-identitypool",
    "allowInSdks": false,
    "parameters": {},
    "dataSource": {
        "object": {
            "name": "DataSource Name",
            "schemaName": "database-odbc-redshift-simba",
            "drvName": "Simba Amazon Redshift ODBC Driver",
            "host": "##### (my-database-host.redshift.amazonaws.com)",
            "parameters": {
                "allowSelfSignedServerCert": false,
                "checkCertRevocation": false,
                "database": "#####",
                "minTLS": 2,
                "port": 5439,
                "sslMmode": "require",
                "useSystemTrustStore": false
            }
        }
    },
    "credentials": {
        "oauthApplication": {
            "object": {
                "name": "Application Credential Name",
                "schemaName": "database-redshift-aws-oauth-iam-identitypool-application",
                "userName": "##### (Client Secret)",
                "parameters": {
                    "accountId": "#####",
                    "authorityURL": "##### (https://my-authorization-host.amazoncognito.com)",
                    "awsRegion": "##### (us-west-2)",
                    "dbUser": "#####",
                    "identityPoolId": "#####",
                    "redirectURI": "##### (http://localhost:5634)",
                    "userPoolId": "#####"
                },
                "secrets": {
                }
            }
        },
        "oauthTokens": {
            "object": {
                "name": "Tokens Credential Name",
                "schemaName": "aws-oauth-iam-identitypool-tokens",
                "parameters": {},
                "secrets": {
                }
            }
        }
    }
}'

Create a Snowflake DCM Connection with OAuth 2.0 Client Credentials

curl --location --request POST 'https://localhost/webapi/v3/dcm/connections' `
  --header 'Authorization: Bearer BearerTokenGoesHere' `
  --header 'Content-Type: application/json' `
  --data '{
    "name": "Connection Name",
    "schemaName": "database-odbc-snowflake-simba-oauth-generic-configurable",
    "allowInSdks": false,
    "parameters": {},
    "dataSource": {
        "object": {
            "name": "DataSource Name",
            "schemaName": "database-odbc-snowflake-simba",
            "drvName": "Simba Snowflake ODBC Driver",
            "host": "##### (my-domain.snowflakecomputing.com)",
            "parameters": {
                "database": "#####",
                "schema": "#####",
                "warehouse": "#####"
            }
        }
    },
    "credentials": {
        "oauthApplication": {
            "object": {
                "name": "Application Credential Name",
                "schemaName": "generic-configurable-oauth-application",
                "userName": "##### (Client Id)",
                "parameters": {
                    "clientAuthentication": "body",
                    "grantType": "clientCredentials",
                    "tokenURL": "#####"
                },
                "secrets": {
                    "clientSecret": {
                        "expiresOn": null,
                        "parameters": {},
                        "value": {
                            "text": "##### (Client Secret)"
                        }
                    }
                }
            }
        },
        "oauthTokens": {
            "object": {
                "name": "Tokens Credential Name",
                "schemaName": "generic-configurable-oauth-tokens",
                "userName": null,
                "parameters": {
                    "scope": "#####"
                },
                "secrets": {}
            }
        }
    }
}'

DCM接続を削除する

DCM接続を削除するには、 DELETE {baseURL}/v3/dcm/connections/{id} エンドポイントを使用します。他の接続で使用されていない限り、データソースと資格情報も削除されます。

パラメーター

id (string): Required. Enter the DCM Connection ID you want to delete.

curl --location --request DELETE 'https://localhost/webapi/v3/dcm/connections/d8cc5fca-86cc-4e7e-93a3-d500cca9a3f3' `
  --header 'Authorization: Bearer BearerTokenGoesHere'

管理者向けDCMEエンドポイント

APIアクセスを持つ管理者が使用できるエンドポイントです。

注記

  • All admin API endpoints return all data available on the Server across all users, regardless of ownership.

  • All examples are in PowerShell.

DCM接続レコードを取得する

DCM接続レコードを取得するには、 GET {baseURL}/v3/dcm/admin/connections/{objectId} エンドポイントを使用します。

パラメーター

objectId (string): Required. Enter the DCM Connection ID you want to get information about.

curl --location --request GET 'https://localhost/webapi/v3/dcm/admin/connections/d8cc5fca-86cc-4e7e-93a3-d500cca9a3f3' `
  --header 'Authorization: Bearer BearerTokenGoesHere'

DCM接続レコードのリストを取得する

Serverに存在するすべてのDCM接続レコードのリストを取得するには、 GET {baseURL}/v3/dcm/admin/connections エンドポイントを使用します。

パラメーター

両方のパラメーターは、組み合わせ可能なフィルターです。 connectionId visibleBy を一緒に使用すると、指定された接続IDを持つ接続が返され、指定されたユーザーが表示できます。

  • connectionId (文字列): オプションです。ワークフローから参照される接続IDで接続をフィルタリングします。接続がコラボレーションのために共有されている場合は、1つの接続IDに対して複数の接続を返すことができます。

  • visibleBy (文字列): オプションです。ユーザーIDを入力します。存在する場合、結果は、指定したユーザーが使用できるすべての接続と同じ結果にフィルタリングされます。

curl --location --request GET 'https://localhost/webapi/v3/dcm/admin/connections?connectionId=d8cc5fca-86cc-4e7e-93a3-d500cca9a3f3&visibleBy=bc7cb7b47c33' `
  --header 'Authorization: Bearer BearerTokenGoesHere'

ユーザーの代わりにDCM接続を作成または更新する

ユーザーの代わりにDCM接続レコードを作成または更新するには、 POST {baseURL}/v3/dcm/admin/connections エンドポイントを使用します。

Properties

Use the same properties as described in the Create or Update Connection section. The only additional property required for this endpoint is ownerId.

ownerId (string): Required.

  • When creating a Connection, enter the ID of the user on behalf of which the connection shall be created.

  • When updating a Connection, you must also enter the ownerId even if you don't want to change it. For more information how to get an ownerID, go to Get Connection or List Connections.

curl --location --request POST 'https://localhost/webapi/v3/dcm/connections' `
  --header 'Authorization: Bearer BearerTokenGoesHere' `
  --header 'Content-Type: application/json' `
  --data '{
    "upsertConnectionContract": {
      "name": "MSSQL DEV Admin",
      "ownerId": "1b4bc56d489d9543a",
      "schemaName": "database-odbc-dsn-mssql",
      "parameters": {},
      "dataSource": {
        "object": {
          "name": "SQL Server DEV",
          "schemaName": "database-odbc-dsn-mssql",
          "parameters": {
            "dsn": "sql server"
          }
        }
      },
      "credentials": {
        "main": {
          "object": {
            "name": "SQL Server Admin Credentials",
            "schemaName": "username_password",
            "parameters": {},
            "userName": "admin",
            "secrets": {
              "password": {
                "value": {
                  "text": "password"
                },
                "parameters": {}
              }
            }
          }
        }
      }
    }
  }'

実行のために共有されているDCM接続の共有を解除する

共有タイプが「実行のために共有」として定義されているDCM接続の共有を解除するには、 DELETE {baseURL}/v3/dcm/admin/connections/{objectId}/sharing/execution エンドポイントを使用します。

パラメーター

objectId (string): Required. Enter the DCM Connection ID to be unshared for execution.

curl --location --request DELETE 'https://localhost/webapi/v3/dcm/admin/connections/d8cc5fca-86cc-4e7e-93a3-d500cca9a3f3/sharing/execution' `
  --header 'Authorization: Bearer BearerTokenGoesHere'

コラボレーションのために共有されているDCM接続の共有を解除する

共有タイプが「コラボレーションのために共有」として定義されているDCM接続の共有を解除するには、 DELETE {baseURL}/v3/dcm/admin/connections/{objectId}/sharing/collaboration エンドポイントを使用します。

パラメーター

objectId (string): Required. Enter the DCM Connection ID to be unshared for collaboration.

curl --location --request DELETE 'https://localhost/webapi/v3/dcm/admin/connections/d8cc5fca-86cc-4e7e-93a3-d500cca9a3f3/sharing/collaboration' `
  --header 'Authorization: Bearer BearerTokenGoesHere'

DCM接続を削除する

DCM接続レコードを削除するには、 DELETE {baseURL}/v3/dcm/admin/connections/{objectId} エンドポイントを使用します。他の接続で使用されていない限り、データソースと資格情報も削除されます。

パラメーター

objectId (string): Required. Enter the DCM Connection ID you want to delete.

curl --location --request DELETE 'https://localhost/webapi/v3/dcm/admin/connections/d8cc5fca-86cc-4e7e-93a3-d500cca9a3f3' `
  --header 'Authorization: Bearer BearerTokenGoesHere'

Get All Connection Handling Rules

To get all Connection handling rules, use the GET {baseURL}/v3/dcm/admin/connectionhandlingrules endpoint.

Go to DCM Connection Handling for more information.

Properties

No properties.

curl --location --request GET 'https://localhost/webapi/v3/dcm/admin/connectionhandlingrules' `
  --header 'Authorization: Bearer BearerTokenGoesHere'

Get Connection Handling Rule

To get a specific DCM Connection handling rule, use the GET {baseURL}/v3/dcm/admin/connectionhandlingrules/{id} endpoint.

Properties

id (string): Required. Specify the ID of the DCM connection handling rule to return.

curl --location --request GET 'https://localhost/webapi/v3/dcm/admin/connectionhandlingrules/{id}' `
  --header 'Authorization: Bearer BearerTokenGoesHere'

Add or Update Connection Handling Rule

To add a new Connection handling rule or update an existing one, use the POST {baseURL}/v3/dcm/admin/connectionhandlingrules endpoint.

Properties

DCM接続処理ルールの作成または更新には、以下のパラメーターを入力します。

  • rule (本文): 必須です。作成または更新するDCM接続処理ルール。

    • id (文字列): オプションです。DCM接続処理ルールのID。既存の接続処理ルールを更新する場合は、DCM接続処理ルールIDを入力します。新しい接続処理ルールを作成する場合はスキップします。

    • sourceConnectionId (文字列): ワークフローの実行時に置換する接続IDを参照するソース接続IDを入力します。その接続がServer上に存在する必要はありません(参照するワークフローは変わらず実行できます)。既存の別のルールでは、ソース接続としてもターゲット接続としても使用できません。

    • sourceConnectionTitle (文字列): ソース接続のカスタム名または説明を入力します。

    • targetConnectionId (文字列): ターゲット接続IDを入力します。Server上に存在するDCM接続を参照する必要があります。

    • targetConnectionTitle (文字列): ターゲット接続のカスタム名または説明を入力します。

curl --location 'https://localhost.com/webapi/v3/dcm/admin/connectionhandlingrules' `
--header 'Content-Type: application/json' `
--header 'Authorization: Bearer BearerTokenGoesHere' `
--data '{
    "sourceConnectionTitle": "MSSQL DEV",
    "sourceConnectionId": "c.cid.d8cc5fca-86cc-4e7e-93a3-d500cca9a3f3",
    "targetConnectionId": "c.cid.cbf55382-f90b-4304-a1cd-37c5cff697e0"
}'

Delete Connection Handling Rule

To delete an existing Connection handling rule, use the DELETE {baseURL}/v3/dcm/admin/connectionhandlingrules/{id} endpoint.

Properties

id (string): Required. Specify the DCM connection handling rule ID you want to delete.

curl --location --request DELETE 'https://localhost/webapi/v3/dcm/admin/connectionhandlingrules/{id}' `
  --header 'Authorization: Bearer BearerTokenGoesHere'

オブジェクト関係

DCM接続を作成する場合、作成したオブジェクトを次のように使用することができます。

作成されたオブジェクト:

  • " id " (例えば、"id": "c128cc5fca-86cc-4e7e-93a3-d500cca9a3f3")

  • connectionId ” (例えば、"id": "c0332423423-86cc-4e7e-93a3-d500cca9a3f3")

次のように使用できます。

Admin (管理者):