クライアント・アプリケーションの更新
/documents/api/1.2/config/clientApplications/{id}
既存のカスタム・アクション・クライアント・アプリケーションの次のフィールドのいずれかまたは両方を更新 : metadataのfileおよびisEnabled属性。
この操作を実行するには、管理者である必要があります。
リクエストはマルチパートHTTPリクエストで、1つのパートが属性isEnabledを持つJSONオブジェクト(metadata)、もう1つのパートがファイル自体のコンテンツ(file)です。
リクエスト
- multipart/form-data
- id: string
クライアント・アプリケーションのグローバル一意識別子(GUID)。
- file: file
アップロードするFile(json payload)。
Content-Type: application/jsonを使用して、この情報をJSONオブジェクトとして示します。 - metadata: string
このパラメータを使用して、既存のクライアント・アプリケーションのisEnabledフラグ値を更新できます。
Content-Type: application/jsonを使用して、この情報をJSONオブジェクトとして示します。たとえば:
{"isEnabled": "true"
}
レスポンス
- application/json
- application/xml
200レスポンス
リクエストが処理されました。
object- createdTime(optional): string
クライアント・アプリケーションが作成された日付。
- errorCode(optional): string
エラー・コードがゼロ(0)の場合は、エラーなしです
- id(optional): string
クライアント・アプリケーションのグローバル一意識別子(GUID)。
- isEnabled(optional): string
クライアント・アプリケーションが有効/無効かどうかを示すフラグ。
- links(optional): array links
クライアント・アプリケーションのリンク。
- modifiedTime(optional): string
クライアント・アプリケーションが最後に変更された日付。
- name(optional): string
クライアント・アプリケーション名。
array- Array of: object ClientApplicationLinkDetails
クライアント・アプリケーションのリンク。
object- href(optional): string
リンク・タイプに対応するURL。
- rel(optional): string
リンクのタイプ。これは
selfおよびcanonicalです
{
"createdTime":"2023-05-03T11:26:27Z",
"errorCode":"0",
"id":"7579B0A49C7A34960929793458C1B355",
"isEnabled":"true",
"modifiedTime":"2023-05-03T15:22:14Z",
"name":"testapp01"
}
404レスポンス
アプリケーションIDが見つかりません
例
次の例では、メタデータを更新 - 指定したクライアント・アプリケーションの'isEnabled'属性および'file'。
PUT .../config/clientApplications/427090D588695B4B4C59D868E83E27B9
リクエスト・ヘッダー
Content-Type: multipart/form-data; boundary=---1234567890
リクエスト本文
-----1234567890
Content-Disposition: form-data; name="metadata"
Content-Type: application/json
{
"isEnabled":"true"
}
-----1234567890
Content-Disposition: form-data; name="file"; filename="clientconfig.json"
Content-Type: application/json
<File Content>
-----1234567890--.
HTTPステータス・コード
HTTP_STATUS = 200
JSONレスポンス
{
"createdTime": "2023-05-08T12:37:28Z",
"errorCode": "0",
"id": "427090D588695B4B4C59D868E83E27B9",
"isEnabled": "true",
"modifiedTime": "2023-05-09T10:16:58Z",
"name": "testapp"
}
例2
次の例では、メタデータを更新 - 指定されたクライアント・アプリケーションの'isEnabled'属性。
PUT .../config/clientApplications/427090D588695B4B4C59D868E83E27B9
リクエスト・ヘッダー
Content-Type: multipart/form-data; boundary=---1234567890
リクエスト本文
-----1234567890
Content-Disposition: form-data; name="metadata"
Content-Type: application/json
{
"isEnabled":"false"
}
-----1234567890
HTTPステータス・コード
HTTP_STATUS = 200
JSONレスポンス
{
"createdTime": "2023-05-08T12:37:28Z",
"errorCode": "0",
"id": "427090D588695B4B4C59D868E83E27B9",
"isEnabled": "false",
"modifiedTime": "2023-05-11T07:51:57Z",
"name": "testapp"
}
例3
次の例では、指定されたクライアント・アプリケーションのファイルを更新します。
PUT .../config/clientApplications/427090D588695B4B4C59D868E83E27B9
リクエスト・ヘッダー
Content-Type: multipart/form-data; boundary=---1234567890
リクエスト本文
-----1234567890 Content-Disposition: form-data; name="file"; filename="clientconfig.json" Content-Type: application/json <File Content> -----1234567890--
HTTPステータス・コード
HTTP_STATUS = 200
JSONレスポンス
{
"createdTime": "2023-05-08T12:37:28Z",
"errorCode": "0",
"id": "427090D588695B4B4C59D868E83E27B9",
"isEnabled": "false",
"modifiedTime": "2023-05-11T07:51:57Z",
"name": "testapp"
}
例4
次の例では、指定したクライアント・アプリケーションIDが存在しないため、エラーが返されます。
PUT .../config/clientApplications/123456D588695A1A1C59D868E83E27B9
リクエスト・ヘッダー
Content-Type: multipart/form-data; boundary=---1234567890
リクエスト本文
-----1234567890
Content-Disposition: form-data; name="metadata"
Content-Type: application/json
{
"isEnabled":"true"
}
-----1234567890
Content-Disposition: form-data; name="file"; filename="clientconfig.json"
Content-Type: application/json
<File Content>
-----1234567890--
HTTPステータス・コード
HTTP_STATUS = 404
JSONレスポンス
{
"errorCode": "-16",
"errorKey": "!csAFJSONAppDoesNotExist,123456D588695A1A1C59D868E83E27B9",
"errorMessage": "Application '123456D588695A1A1C59D868E83E27B9' of type JSON does not exist.",
"isEnabled": "1",
"title": "Application '123456D588695A1A1C59D868E83E27B9' of type JSON does not exist.",
"type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}