Box Developerドキュメント

Box Developerドキュメントの新しいベータ版サイトがまもなくリリースされる予定です。最新の開発者向けガイド、APIリファレンス、AI搭載の検索により、Boxを使用した迅速な開発をサポートします。更新情報については今しばらくお待ちください。

最新バージョン

サービス利用規約を更新

put
https://api.box.com/2.0
/terms_of_services/:terms_of_service_id

このエンドポイントはバージョン2024.0です。引き続き使用するために 変更は必要ありません。詳細については、 **Box APIのバージョン管理**を参照してください。

特定のサービス利用規約を更新します。

リクエスト

bearer [ACCESS_TOKEN]
application/json

パスパラメータ

stringパス内必須
324234

サービス利用規約のID。

リクエスト本文

string本文内必須
"enabled"

このサービス利用規約がアクティブであるかどうか。

次の値のいずれか1つ: enabled,disabled

string本文内必須
"By collaborating on this file you are accepting..."

ユーザーに対して表示されるサービス利用規約のテキスト。

statusdisabledに設定されている場合は、テキストを空に設定できます。

レスポンス

更新されたサービス利用規約オブジェクトを返します。

予期しないクライアントエラー。

put
サービス利用規約を更新
このドキュメント内で一部のAPIを試せるようになりました。
ログイン

リクエストの例

Box SDKのバージョン戦略の詳細については、 **こちら**を確認してください。


cURL
curl -i -X PUT "https://api.box.com/2.0/terms_of_services/324234" \
     -H "authorization: Bearer <ACCESS_TOKEN>" \
     -H "content-type: application/json" \
     -d '{
       "status": "enabled",
       "text": "By collaborating on this file you are accepting..."
     }'
Node/TypeScript v10
await client.termsOfServices.updateTermsOfServiceById(tos.id, {
  status: 'disabled' as UpdateTermsOfServiceByIdRequestBodyStatusField,
  text: 'TOS',
} satisfies UpdateTermsOfServiceByIdRequestBody);
Python v10
client.terms_of_services.update_terms_of_service_by_id(
    tos.id, UpdateTermsOfServiceByIdStatus.DISABLED, "TOS"
)
.NET v10
await client.TermsOfServices.UpdateTermsOfServiceByIdAsync(termsOfServiceId: tos.Id, requestBody: new UpdateTermsOfServiceByIdRequestBody(status: UpdateTermsOfServiceByIdRequestBodyStatusField.Disabled, text: "TOS"));
Swift v10
try await client.termsOfServices.updateTermsOfServiceById(termsOfServiceId: tos.id, requestBody: UpdateTermsOfServiceByIdRequestBody(status: UpdateTermsOfServiceByIdRequestBodyStatusField.disabled, text: "TOS"))
Java v10
client.getTermsOfServices().updateTermsOfServiceById(tos.getId(), new UpdateTermsOfServiceByIdRequestBody(UpdateTermsOfServiceByIdRequestBodyStatusField.DISABLED, "TOS"))
.NET v6
await client.TermsOfServices.UpdateTermsOfServiceByIdAsync(termsOfServiceId: tos.Id, requestBody: new UpdateTermsOfServiceByIdRequestBody(status: UpdateTermsOfServiceByIdRequestBodyStatusField.Disabled, text: "TOS"));
Node v4
await client.termsOfServices.updateTermsOfServiceById(tos.id, {
  status: 'disabled' as UpdateTermsOfServiceByIdRequestBodyStatusField,
  text: 'TOS',
} satisfies UpdateTermsOfServiceByIdRequestBody);

レスポンスの例

{
  "id": "11446498",
  "type": "terms_of_service",
  "created_at": "2012-12-12T10:53:43-08:00",
  "enterprise": {
    "id": "11446498",
    "type": "enterprise",
    "name": "Acme Inc."
  },
  "modified_at": "2012-12-12T10:53:43-08:00",
  "status": "enabled",
  "text": "By using this service, you agree to ...",
  "tos_type": "managed"
}