Update a Client Application

put

/documents/api/1.2/config/clientApplications/{id}

Update either or both of the following fields of an existing custom actions client application : file and isEnabled attribute of metadata.

You must be an administrator to perform this operation.

The request is a multipart HTTP request where one part is a JSON object (metadata) with the attribute isEnabled and the other part is the content of the file itself (file).

Request

Supported Media Types
Path Parameters
  • Globally unique identifier (GUID) of the client application.

Form Parameters
  • File(json payload) to upload.

    Use Content-Type: application/json to describe this information as a JSON object.

  • You can use this parameter to update isEnabled flag value of an existing client application.

    Use Content-Type: application/json to describe this information as a JSON object.

    For example:

    {

    "isEnabled": "true"

    }
Back to Top

Response

Supported Media Types

200 Response

The request was fulfilled.

Body ()
Root Schema : ClientApplicationResponse
Type: object
Metadata about a specific client application
Show Source
Nested Schema : ClientApplicationLinkDetails
Type: object
Links for the client application.
Show Source
Example Response (application/json)
{
    "createdTime":"2023-05-03T11:26:27Z",
    "errorCode":"0",
    "id":"7579B0A49C7A34960929793458C1B355",
    "isEnabled":"true",
    "modifiedTime":"2023-05-03T15:22:14Z",
    "name":"testapp01"
}

404 Response

Application ID is not found

Back to Top

Examples

The following example update the 'metadata' - 'isEnabled' attribute and the 'file' of the specified client application.

PUT .../config/clientApplications/427090D588695B4B4C59D868E83E27B9

Request Header

The request is a multipart request with a specified boundary delimiter of the following general form:
Content-Type: multipart/form-data; boundary=---1234567890

Request Body

-----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 Status Code

HTTP_STATUS = 200

JSON Response

{
  "createdTime": "2023-05-08T12:37:28Z",
  "errorCode": "0",
  "id": "427090D588695B4B4C59D868E83E27B9",
  "isEnabled": "true",
  "modifiedTime": "2023-05-09T10:16:58Z",
  "name": "testapp"
}

Example 2

The following example update the 'metadata' - 'isEnabled' attribute of the specified client application.

PUT .../config/clientApplications/427090D588695B4B4C59D868E83E27B9

Request Header

The request is a multipart request with a specified boundary delimiter of the following general form:
Content-Type: multipart/form-data; boundary=---1234567890

Request Body

-----1234567890
Content-Disposition: form-data; name="metadata"
Content-Type: application/json
{ 
    "isEnabled":"false" 
}
-----1234567890

HTTP Status Code

HTTP_STATUS = 200

JSON Response

{
  "createdTime": "2023-05-08T12:37:28Z",
  "errorCode": "0",
  "id": "427090D588695B4B4C59D868E83E27B9",
  "isEnabled": "false",
  "modifiedTime": "2023-05-11T07:51:57Z",
  "name": "testapp"
}

Example 3

The following example update the 'file' of the specified client application.

PUT .../config/clientApplications/427090D588695B4B4C59D868E83E27B9

Request Header

The request is a multipart request with a specified boundary delimiter of the following general form:
Content-Type: multipart/form-data; boundary=---1234567890

Request Body

-----1234567890
Content-Disposition: form-data; name="file"; filename="clientconfig.json"
Content-Type: application/json
 
<File Content>
-----1234567890--

HTTP Status Code

HTTP_STATUS = 200

JSON Response

{
  "createdTime": "2023-05-08T12:37:28Z",
  "errorCode": "0",
  "id": "427090D588695B4B4C59D868E83E27B9",
  "isEnabled": "false",
  "modifiedTime": "2023-05-11T07:51:57Z",
  "name": "testapp"
}

Example 4

The following example returns an error, because the specified client application ID does not exist.

PUT .../config/clientApplications/123456D588695A1A1C59D868E83E27B9

Request Header

The request is a multipart request with a specified boundary delimiter of the following general form:
Content-Type: multipart/form-data; boundary=---1234567890

Request Body

-----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 Status Code

HTTP_STATUS = 404

JSON Response

{
  "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"
}
Back to Top