Custom OAuth profiles
以下のエンドポイントを使用して、Custom OAuth profilesをプログラムで管理します。
レート制限
Custom OAuth profileリソースには、次のレート制限があります:
| タイプ | リソース | 制限 |
|---|---|---|
| すべて | すべてのCustom OAuth profilesエンドポイント | 1分あたり60リクエスト |
クイックリファレンス
| タイプ | リソース | 説明 |
|---|---|---|
| GET | /api/custom_oauth_profiles | Custom OAuth profilesを一覧表示します。 |
| GET | /api/custom_oauth_profiles/:id | IDでCustom OAuth profileを取得します。 |
| POST | /api/custom_oauth_profiles | Custom OAuth profileを作成します。 |
| PUT | /api/custom_oauth_profiles/:id | Custom OAuth profileを更新します。 |
| DELETE | /api/custom_oauth_profiles/:id | Custom OAuth profileを削除します。 |
Custom OAuth profilesを一覧表示
Custom OAuth profilesを一覧表示します。 クライアントシークレットとトークンがレスポンスで返されることはありません。
GET /api/custom_oauth_profilesクエリパラメーター
| 名前 | タイプ | 説明 |
|---|---|---|
| page | integer | ページ番号。 デフォルトは1です。 |
| per_page | integer | ページサイズ。 デフォルトは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パスパラメーター
| 名前 | タイプ | 説明 |
|---|---|---|
| id | integer 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ペイロード
| 名前 | タイプ | 説明 |
|---|---|---|
| name | string 必須 | OAuth profileの名前。 |
| provider | string 必須 | このCustom OAuth profileに関連付けられているアプリの名前。 |
| data.client_id | string 必須 | Custom OAuth AppのクライアントID |
| data.client_secret | string 必須 | Custom OAuth Appのクライアントシークレット |
| data.token | string 任意 | 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パスパラメーター
| 名前 | タイプ | 説明 |
|---|---|---|
| id | integer required | 更新するCustom OAuth profileのID |
ペイロード
| 名前 | タイプ | 説明 |
|---|---|---|
| name | string 必須 | OAuth profileの名前。 |
| provider | string 必須 | このCustom OAuth profileに関連付けられているアプリの名前。 |
| data.client_id | string 必須 | Custom OAuth AppのクライアントID |
| data.client_secret | string 必須 | Custom OAuth Appのクライアントシークレット |
| data.token | string 任意 | 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パスパラメーター
| 名前 | タイプ | 説明 |
|---|---|---|
| id | integer | 削除する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: