Skip to main content

サブスクリプションエンドポイント

サブスクリプションエンドポイントとパラメーター

オブジェクト関係の詳細については、オブジェクト関係 のセクションを参照してください。

サブスクリプションの詳細については、ヘルプページのサブスクリプション (Studios)を参照してください。

新規サブスクリプションの作成

新しいサブスクリプションを作成するには、POST {baseURL}/v3/subscriptionsエンドポイントを使用します。

注記

このエンドポイントは、Server管理者専用です。

パラメーター

contract(本文): 新しいサブスクリプションを作成するには、contractパラメーターが必要です。次のパラメーターを指定します。

  • name (文字列): 必須です。新しいサブスクリプションの名前を入力します。

  • othersCanExecute(ブール型)必須です。作成するサブスクリプションで共有スケジュールを有効にするかどうかを指定します。

  • credentialId(文字列): 必須です。このパラメーターは、ユーザーに既定で割り当てられた資格情報のユニークなIDを指します。指定しない場合、既定値は""になります。

curl -X 'POST' \
  'http://localhost/webapi/v3/subscriptions' \
  -H 'accept: application/json' \
  -H 'authorization: Bearer BearerTokenGoesHere' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "New Studio",
  "canShareSchedule": true,
  "credentialId": ""
}'
  • 200: OK

  • 201: Created

    {
      "name": "string",
      "apiKey": "string",
      "apiSecret": "string",
      "active": true,
      "expirationDate": "string",
      "expDate": "2024-09-19T13:13:44.245Z",
      "dateUpdated": "2024-09-19T13:13:44.245Z",
      "apiEnabled": true,
      "canShareSchedules": true,
      "credentialId": "string",
      "credentials": [
        {
          "credentialId": "string",
          "id": "string"
        }
      ],
      "dataConnections": [
        {
          "dataConnectionId": "string",
          "id": "string"
        }
      ],
      "id": "string"
    }
  • 400: BadRequest

  • 401: Unauthorized

  • 404: NotFound

すべてのサブスクリプションを取得

すべてのサブスクリプションに関する情報を取得するには、GET {baseURL}/v3/subscriptionsエンドポイントを使用します。サブスクリプションを検索するためのフィルターとしてさまざまなパラメーターを使用します。

注記

このエンドポイントは、Server管理者専用です。

パラメーター

  • name (文字列): オプションです。特定のサブスクリプションを検索するには、このサブスクリプション名を入力します。

  • canShareSchedules(ブール型): オプションです。検索するサブスクリプションで共有スケジュールを有効にするかどうかを選択します。

  • defaultWorkflowCredentialId (文字列): オプションです。検索するサブスクリプションの既定のワークフロー資格情報IDを入力します。

  • userCountGreaterThanEquals(Int32): 検索するサブスクリプションに含まれるユーザー数を指定します(指定した数以上)。

  • workflowCountGreaterThanEquals(Int32): 検索するサブスクリプションに含まれるワークフローの数を指定する(指定した数以上)。

  • workflowCountLessThanEquals (Int32): 検索するサブスクリプションに含まれるワークフローの数を指定します(指定した数以下)。

curl -X 'GET' \
  'http://localhost/webapi/v3/subscriptions?userCountGreaterThanEquals=1&workflowCountGreaterThanEquals=3' \
  -H 'accept: application/json' \
  -H 'authorization: Bearer BearerTokenGoesHere'
  • 200: OK

    [
      {
        "userCount": 0,
        "workflowCount": 0,
        "id": "string",
        "name": "string",
        "credentialId": "string",
        "canShareSchedules": true
      }
    ]
  • 401: Unauthorized

特定のサブスクリプションを検索

特定のサブスクリプションを検索するには、GET {baseURL}/v3/subscriptions/{subscriptionId}エンドポイントを使用します。

注記

このエンドポイントは、Server管理者専用です。

パラメーター

subscriptionsId (文字列): 必須です。サブスクリプションIDを入力して、このサブスクリプションに関する情報を取得します。

curl -X 'GET' \
  'http://localhost/webapi/v3/subscriptions/66ebd0896e52ae73b495106f' \
  -H 'accept: application/json' \
  -H 'authorization: Bearer BearerTokenGoesHere'
  • 200: OK

      "users": [
        {
          "id": "string",
          "name": "string"
        }
      ],
      "workflows": [
        {
          "id": "string",
          "name": "string"
        }
      ],
      "id": "string",
      "name": "string",
      "credentialId": "string",
      "canShareSchedules": true
    }
  • 401: Unauthorized

  • 404: NotFound

既存のサブスクリプションを更新

既存のサブスクリプションを更新するには、PUT {baseURL}/v3/subscription/{subscriptionId}エンドポイントを使用します。

注記

このエンドポイントは、Server管理者専用です。

パラメーター

  • subscriptionId (文字列): 必須です。サブスクリプションIDを入力して、このサブスクリプションを更新します。

  • Subscription (本文): 必須です。サブスクリプションを更新するには、updateContractパラメーターが必要です。次の項目を指定します。

    • name (文字列): 必須です。サブスクリプションの新しい名前を入力します。

    • credentialId(文字列): 必須です。このパラメーターは、ユーザーに既定で割り当てられた資格情報のユニークなIDを指します。指定しない場合、既定値は""になります。

    • canShareSchedules (ブール型): 必須です。更新するサブスクリプションで共有スケジュールを有効にするかどうかを指定します。

curl -X 'PUT' \
  'http://localhost/webapi/v3/subscriptions/66ebd0896e52ae73b495106f' \
  -H 'accept: application/json' \
  -H 'authorization: Bearer BearerTokenGoesHere' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Doe'\''s Studio",
  "credentialId": "",
  "canShareSchedules": false
}'
  • 200: OK

    {
      "id": "string",
      "name": "string",
      "credentialId": "string",
      "canShareSchedules": true
    }
  • 400: BadRequest

  • 401: Unauthorized

  • 404: NotFound

サブスクリプションの削除

特定のサブスクリプションをシステムから削除するには、DELETE {baseURL}/v3/subscriptionsエンドポイントを使用します。

注記

このエンドポイントは、Server管理者専用です。

パラメーター

subscriptionId (文字列): 必須です。削除するサブスクリプションIDを入力します。

curl -X 'DELETE' \
  'http://localhost/webapi/v3/subscriptions?subscriptionId=66ec22e86e52ae73b49510a1' \
  -H 'accept: application/json' \
  -H 'authorization: Bearer BearerTokenGoesHere'
  • 200: OK

  • 400: BadRequest

  • 401: Unauthorized

  • 404: NotFound

ユーザーのサブスクリプションを変更

あるサブスクリプションのユーザー(複数可)を別のサブスクリプションに移すには、PUT {baseURL}/v3/subscriptions/{subscriptionId}/usersエンドポイントを使用します。

注記

このエンドポイントは、Server管理者専用です。

パラメーター

  • subscriptionId (文字列): 必須です。そのユーザーの移動先となる既存のサブスクリプションIDを入力します。

  • contract (本文):

    • userIds (文字列): 指定したsubscriptionIdの下に移動するユーザーIDを入力します。

curl -X 'PUT' \
  'http://localhost/webapi/v3/subscriptions/66ffbb75125b93320a8bb5c7/users' \
  -H 'accept: application/json' \
  -H 'authorization: Bearer BearerTokenGoesHere' \
  -H 'Content-Type: application/json' \
  -d '{
  "userIds": [
    "66ffbb4b125b93320a8bb5bd"
  ]
}'
  • 200: OK

  • 400: BadRequest

  • 401: Unauthorized

  • 404: NotFound

オブジェクト関係

サブスクリプションを作成するときには、作成したオブジェクトを以下のように使用できます。

作成したオブジェクト: subscriptionId (例: "subscriptionId": "619158e57e607d0011ac3009")

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

Postmanリクエストの例

GET {baseURL}/v3/subscriptions/{subscriptionId}

Postman_subscriptions_get2.png

GET {baseURL}/v3/subscriptions

Postman_subscriptions_get.png

Postmanリクエストの詳細については、「Postmanの使用方法」ヘルプページを参照してください。