spaces/{space-id}

このリソースを使用して、スペースのユーザーまたはユーザー・グループの権限を変更します。

メソッドの要約

HTTP メソッド パス 説明
PUT /スペース {spaces-id} スペースのユーザーまたはユーザー・グループの許可を変更します。

PUT /spaces/{space-id}

説明
スペースに対するユーザーまたはユーザー・グループの権限を追加、編集、または削除するには、このメソッドを使用します。
リソース情報
要件 説明
応答フォーマット JSON
認証が必要 はい
OAuth 2 クライアント資格情報のサポート はい (成果物オーサリング・カテゴリーを含むユーザー・サービス ID を使用)
指定時間内の数の制限 IBM Blueworks Live は、特定の期間内にこの API を呼び出すことができる頻度を決定するレート制限を適用します。 許可されるレートは、1 時間当たり 200 要求です。

レート制限は、アカウント全体に適用されます。 異なる認証方式が使用された場合でも、すべてのユーザーにわたってアカウント全体の単一レートが適用されます。

アカウントの API のレート制限を超えると、次の要求は拒否され、状況コード 429 と応答ヘッダー Retry-Afterが表示されます。これは、次の要求を実行できる秒数を示します。

パラメーター
名前 Location 説明 必須 タイプ
space-id パス スペースの ID です。 はい ストリング
operation 照会 操作のタイプ。 操作には、 Add, Update, Deleteが含まれます。 はい ストリング
Content-type ヘッダー 値は application/json でなければなりません。 要求本文に内容がある場合に必要 ストリング
X-On-Behalf-Of ヘッダー ユーザー・コンテキスト。 値は、アカウントに含まれるユーザー名でなければなりません。 ユーザーは、アカウントおよび指定されたスペース (存在する場合) でアクションを実行するための許可を持っている必要があります。 サービス ID OAuth 資格情報が使用される場合は必須です。 ユーザー・サービス ID OAuth 資格情報を使用する場合は不要です。 ストリング
要求 JSON 本体

要求本体は、以下のプロパティーを含む JSON オブジェクトです。

名前 Location 説明 必須 タイプ
inheritParentSpace JSON 本体 スペースがその親の権限を継承するかどうかを指定します。 いいえ ブール値
users JSON 配列 ユーザーのリストを含む JSON オブジェクト。 はい ストリング
participantId JSON 本体 ユーザーまたはユーザー・グループの ID。
ヒント: 要求の participantId の値を取得するには、 UserList API (バージョン: 20110917) および ManageGroup API (バージョン: 2.0) を使用します。

詳しくは UserList そして ManageGroup.

あり ( participantType が指定されていない場合)。

participantId または participantType のいずれかが必須です。

ストリング
participantType JSON 本体 可能な値は、 all-editorsall-contributorsall-community all-viewersall-adminsです。 あり ( participantId が指定されていない場合)。

participantId または participantType のいずれかが必須です。

ストリング
permissions JSON 本体 ユーザーの権限を指定する JSON オブジェクト。 許可には、 blueprintProcessesautomateProcessescomposeDecisionsauthorPolicies、および manageAndEditが含まれます。 はい
注: ライセンス・タイプに適した権限のみが必要です。
オブジェクト
応答
注: 以下の AddUpdateDelete の操作例は、すべてのスペースに適用できる。 サブスペースが親スペースからパーミッションを継承している場合は、操作を呼び出す前に、まずスペースのパーミッション継承を無効にする必要があります。
例1 入力 Add
  • ユーザーをスペースに追加する:

    まず UserList APIでユーザーIDを取得する。

    curl -i --request PUT --url https://your_server_url/bwl/spaces/{space-id}?operation=add --header 'authorization:
    Bearer access_token' --header 'content-type: application/json'
    --data '{"users": [{"participantId": "5f500e1280001", "permissions": {"blueprintProcesses": false, "automateProcesses":
    true, "composeDecisions": false, "authorPolicies": true, "manageAndEdit": false}}]}'
  • スペースにデフォルトのユーザーグループ(all-editors, all-contributors, all-community, all-viewers, all-admins)を追加する:
    curl -i --request PUT --url https://your_server_url/bwl/spaces/{space-id}?operation=add --header 'authorization:
    Bearer access_token' --header 'content-type: application/json'
    --data '{"users": [{"participantType": "all-contributors", "permissions": {"automateProcesses": true, "manageAndEdit":
    false}}]}'
  • スペースにカスタムユーザーグループを追加する:

    まず ManageGroup APIでユーザーIDを取得する。

    curl -i --request PUT --url https://your_server_url/bwl/spaces/{space-id}?operation=add --header 'authorization:
    Bearer access_token' --header 'content-type: application/json'
    --data '{"users" : [{"participantId": "5f500e1280001", "permissions": {"blueprintProcesses": true,
    "automateProcesses": true, "composeDecisions": false, "authorPolicies": true, "manageAndEdit": false}}]}'
例2 入力 Update
  • ユーザー権限を更新する:
    • ユーザー:
      curl -i --request PUT --url https://your_server_url/bwl/spaces/{space-id}?operation=update --header
      'authorization: Bearer access_token' --header 'content-type:
      application/json' --data '{"users" : [{"participantId": "5f500e1280001", "permissions": {"blueprintProcesses": true,
      "automateProcesses": true, "composeDecisions": false, "authorPolicies": true, "manageAndEdit": false}}]}'
    • デフォルトのユーザーグループ:
      curl -i --request PUT --url https://your_server_url/bwl/spaces/{space-id}?operation=update --header
      'authorization: Bearer access_token' --header 'content-type:
      application/json' --data '{"users" : ["participantType": "all-editors", "permissions": {"blueprintProcesses": true,
      "automateProcesses": true, "composeDecisions": false, "authorPolicies": true, "manageAndEdit": false}}]}'
    • カスタムユーザーグループ:
      curl -i --request PUT --url https://your_server_url/bwl/spaces/{space-id}?operation=update --header
      'authorization: Bearer access_token' --header 'content-type:
      application/json' --data '{"users" : [{"participantId": "5f500e1280001", "permissions": {"blueprintProcesses": true,
      "automateProcesses": true, "composeDecisions": false, "authorPolicies": true, "manageAndEdit": false}}]}'
  • サブスペースに対して「親からスペースパーミッションを継承する」を無効にする:

    curl -i --request PUT --url https://your_server_url/bwl/spaces/{space-id}?operation=update --header
    'authorization: Bearer access_token' --header 'content-type:
    application/json' --data '{"inheritParentSpace": false}'
    注: 親スペースからパーミッションを継承するサブスペースで、 AddUpdateDelete の操作を呼び出したい場合は、まずこのコマンドを使用する。
例3 入力 Delete
  • スペースからユーザーを削除する:
    curl -i --request PUT --url https://your_server_url/bwl/spaces/{space-id}?operation=delete --header
    'authorization: Bearer access_token' --header 'content-type: 
    application/json' --data '{"users": [{"participantId": "5f500e1280001"}]}'
  • スペースからデフォルトのユーザーグループ(all-editors、all-contributors、all-community、all-viewers、all-admins)を削除します:
    curl -i --request PUT --url https://your_server_url/bwl/spaces/{space-id}?operation=delete --header 
    'authorization: Bearer access_token' --header 'content-type: 
    application/json' --data '{"users": [{"participantType": "all-contributors"}]}'
  • スペースからカスタムユーザーグループを削除します:
    curl -i --request PUT --url https://your_server_url/bwl/spaces/{space-id}?operation=delete --header 
    'authorization: Bearer access_token' --header 'content-type: 
    application/json' --data '{"users" : [{"participantId": "5f500e1280001"}]}'
出力例

要求が成功すると、 “200 OK” "Updated Space permissions" メッセージが返されます。

応答ヘッダー
ヘッダー名 説明
Retry-After 次の要求を行うことができる時間 (秒単位)
応答メッセージ
HTTP コード 理由
200

要求は正常に完了しました。

400

要求の処理中にエラーが発生しました。 必須パラメーターが欠落していたか、無効な値が含まれていました。

401
このユーザーは認証に合格しませんでした。 この応答は以下の理由で表示される可能性があります。
  • 無効なユーザー名またはパスワードが入力された。
  • このユーザーは複数のアカウントに属しており、要求の中にアカウントが指定されませんでした。
403

このユーザーには、このアカウント内のスペースの権限を変更する権限がありません

404

スペース ID が存在しません。

429

要求が、このアカウントの API のレート制限を超えました。

詳細は OpenAPI 仕様を参照。