Custom OAuth profiles

このページは機械翻訳により提供されています。翻訳内容と英語版に相違がある場合は、英語版が優先されます。

以下のエンドポイントを使用して、Custom OAuth profilesをプログラムで管理します。

レート制限

Custom OAuth profileリソースには、次のレート制限があります:

タイプリソース制限
すべてすべてのCustom OAuth profilesエンドポイント1分あたり60リクエスト

クイックリファレンス

タイプリソース説明
GET/api/custom_oauth_profilesCustom OAuth profilesを一覧表示します。
GET/api/custom_oauth_profiles/:idIDでCustom OAuth profileを取得します。
POST/api/custom_oauth_profilesCustom OAuth profileを作成します。
PUT/api/custom_oauth_profiles/:idCustom OAuth profileを更新します。
DELETE/api/custom_oauth_profiles/:idCustom OAuth profileを削除します。

Custom OAuth profilesを一覧表示

Custom OAuth profilesを一覧表示します。 クライアントシークレットとトークンがレスポンスで返されることはありません。

GET /api/custom_oauth_profiles

クエリパラメーター

名前タイプ説明
pageintegerページ番号。 デフォルトは1です。
per_pageintegerページサイズ。 デフォルトは100(最大は100)です。

サンプルリクエスト

shell
curl  -X GET 'https://www.workato.com/api/custom_oauth_profiles' \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json' \

レスポンス

json
{
  "result": [
      {
        "id": 321,
        "user_id": 123,
        "name": "Acme HubSpot OAuth app",
        "provider": "hubspot",
        "data": {
          "client_id": "example_client_id"
        },
        "shared_accounts_count": 1,
        "oem_customers_count": 5,
        "created_at": "2023-01-15T11:50:32.986-07:00",
        "updated_at": "2023-01-15T11:50:32.986-07:00"
      }
    ]
}

IDでCustom OAuth profileを取得

IDでCustom OAuth profileを取得します。 クライアントシークレットとトークンがレスポンスで返されることはありません。

GET /api/custom_oauth_profiles/:id

パスパラメーター

名前タイプ説明
idinteger
required
取得するCustom OAuth profileのID

サンプルリクエスト

shell
curl  -X GET 'https://www.workato.com/api/custom_oauth_profiles/321' \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json' \

レスポンス

json
{
  "result": {
    "id": 321,
    "user_id": 123,
    "name": "Acme HubSpot OAuth app",
    "provider": "hubspot",
    "data": {
      "client_id": "example_client_id"
    },
    "shared_accounts_count": 1,
    "oem_customers_count": 5,
    "created_at": "2023-01-15T11:50:32.986-07:00",
    "updated_at": "2023-01-15T11:50:32.986-07:00"
  }
}

Custom OAuth profileを作成

Custom OAuth profileを作成します。

POST /api/custom_oauth_profiles

ペイロード

名前タイプ説明
namestring
必須
OAuth profileの名前。
providerstring
必須
このCustom OAuth profileに関連付けられているアプリの名前。
data.client_idstring
必須
Custom OAuth AppのクライアントID
data.client_secretstring
必須
Custom OAuth Appのクライアントシークレット
data.tokenstring
任意
Slackアプリの場合のみ必須です。 Custom OAuth Appのトークン

サンプルリクエスト

shell
curl  -X POST https://www.workato.com/api/custom_oauth_profiles \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json' \
      -d '{
            "name": "My new OAuth profile",
            "provider": "hubspot"
            "data": {
              "client_id": "new_client_id",
              "client_secret": "new_client_secret"
            }
          }'

レスポンス

json
{
  "result": {
    "id": 322,
    "user_id": 123,
    "name": "My new OAuth profile",
    "provider": "hubspot",
    "data": {
      "client_id": "example_client_id"
    },
    "shared_accounts_count": 0,
    "oem_customers_count": 0,
    "created_at": "2023-01-15T11:50:32.986-07:00",
    "updated_at": "2023-01-15T11:50:32.986-07:00"
  }
}

Custom OAuth profileを更新

Custom OAuth profileを更新します。

PUT /api/custom_oauth_profiles/:id

パスパラメーター

名前タイプ説明
idinteger
required
更新するCustom OAuth profileのID

ペイロード

名前タイプ説明
namestring
必須
OAuth profileの名前。
providerstring
必須
このCustom OAuth profileに関連付けられているアプリの名前。
data.client_idstring
必須
Custom OAuth AppのクライアントID
data.client_secretstring
必須
Custom OAuth Appのクライアントシークレット
data.tokenstring
任意
Slackアプリの場合のみ必須です。 Custom OAuth Appのトークン

サンプルリクエスト

shell
curl  -X PUT https://www.workato.com/api/custom_oauth_profiles/322 \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json' \
      -d '{
            "name": "My updated OAuth profile",
            "provider": "hubspot"
            "data": {
              "client_id": "updated_client_id",
              "client_secret": "updated_client_secret"
            }
          }'

レスポンス

json
{
  "result": {
    "id": 322,
    "user_id": 123,
    "name": "My updated OAuth profile",
    "provider": "hubspot",
    "data": {
      "client_id": "updated_client_id"
    },
    "shared_accounts_count": 0,
    "oem_customers_count": 0,
    "created_at": "2023-01-15T11:50:32.986-07:00",
    "updated_at": "2023-01-15T11:50:32.986-07:00"
  }
}

Custom OAuth profileを削除

Custom OAuth profileを削除します。

DELETE /api/custom_oauth_profiles/:id

パスパラメーター

名前タイプ説明
idinteger削除するCustom OAuth profileのID

サンプルリクエスト

shell
curl  -X DELETE https://www.workato.com/api/custom_oauth_profiles/322 \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json' \

レスポンス

json
{
  "result": {
    "success": true
  }
}

Last updated: