Update a Client Application
/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
- multipart/form-data
 
- 
                    id: string
                    
                    
Globally unique identifier (GUID) of the client application.
 
- 
                        file: file
                        
                        
File(json payload) to upload.
Use
Content-Type: application/jsonto describe this information as a JSON object. - 
                        metadata: string
                        
                        
You can use this parameter to update isEnabled flag value of an existing client application.
UseContent-Type: application/jsonto describe this information as a JSON object.For example:
{"isEnabled": "true"
} 
Response
- application/json
 - application/xml
 
200 Response
The request was fulfilled.
object- 
            createdTime(optional): 
            string
            Date the client application was created.
 - 
            errorCode(optional): 
            string
            An error code of zero (0) indicates no errors.
 - 
            id(optional): 
            string
            Globally unique identifier (GUID) of the client application.
 - 
            isEnabled(optional): 
            string
            Flag to indicate if the client application is enabled/disabled.
 - 
            links(optional): 
            array  links
            
            Links for the client application.
 - 
            modifiedTime(optional): 
            string
            Date the client application was last modified.
 - 
            name(optional): 
            string
            Client application name.
 
array- 
            Array of: 
                object  ClientApplicationLinkDetails
            
            Links for the client application.
 
object- 
            href(optional): 
            string
            The URL corresponding to the link type.
 - 
            rel(optional): 
            string
            The type of link, this will be
selfandcanonical 
{
    "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
Examples
The following example update the 'metadata' - 'isEnabled' attribute and the 'file' of the specified client application.
PUT .../config/clientApplications/427090D588695B4B4C59D868E83E27B9
Request Header
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
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
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
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"
}