Update module configuration
Updates the specified module configuration, including version, revision, and configuration items.
This topic includes the following sections:
Request
HTTP method: POST
Request URL: https://<hostname>:<port>/baocdp/rest/module/config
Header: See HTTP request and response headers for header information, such as required authentication token.
Request body properties
Property | Type | Required | Description | Values | Default value |
---|---|---|---|---|---|
name | String | Yes | Module name You can retrieve a list of modules using Get all modules. | User-provided value | NA |
version | String | Yes | Module version | User-provided value | NA |
revision | String | Yes | Module revision | User-provided value | NA |
configItems | Array | Yes | Module configuration items For each item provide a path and value.
For more information about module configuration, see Editing active modules. | User-provided value | NA |
Example request JSON
The following example represents a request to update a module configuration for a configuration item with a value type defined as String.
{
"name":"Module-Name",
"version":"20.16.02.00",
"revision":"1",
"configItems":[{
"path":"ConnectionProperties:AdapterName",
"value":"HTTPAdapter"
}
]
}
The following example represents a request to update a module configuration for a configuration item with a value type defined as XML.
{
"name":"Module-Name",
"version":"20.16.02.00",
"revision":"1",
"configItems":[{
"path":"ConnectionProperties:XMLData",
"value":"<parent><child-1>text1</child-1></parent>"
}
]
}
The following example represents a request to update a module configuration for a configuration item with a value type defined as Secure.
Create the secure data using the encryption utilities included with the BAO installer's maintenance tool.
{
"name":"Module-Name",
"version":"20.16.02.00",
"revision":"1",
"configItems":[{
"path":"ConnectionProperties:XMLData",
"value":"<EncryptedData ><CipherData><CipherValue>k6+5Pos0evyBx85ZX7/bIQ==</CipherValue></CipherData></EncryptedData>"
}
]
}
To send a request to update a module configuration with the configuration item value data including quotes, you need to escape the quotation character with a backslash (\) character.
{
"name":"Module-Name",
"version":"20.16.02.00",
"revision":"1",
"configItems":[{
"path":"ConnectionProperties:DataWithQuotes",
"value":"This is \" data with quotes(\") "
}
]
}
For example,
{
"name":"Module-Name",
"version":"20.16.02.00",
"revision":"1",
"configItems":[{
"path":"ConnectionProperties:XMLData",
"value":"<parentxmlns=\"http://www.w3.org/2001/04/xmlenc#\" Type=\"http://www.w3.org/2001/04/xmlenc#Content\"
><child-1>text1</child-1></parent>"
}
]
}
Response
If successful, this method updates the specified module's configuration.
Response body properties
Property | Description |
---|---|
status | Status of the request |
message | Message associated with the request status |
Example response JSON
{
"status": "Success",
"message": "Requested module configuration/s successfully updated."
}
Status codes and messages
For more details about HTTP response codes, see HTTP response codes.
HTTP code | Message | Description |
---|---|---|
200 | OK | Request succeeded |
400 | Bad request An error occurred while configuring the module. | |
401 | Unauthorized | |
405 | Method not allowed |
Comments
Log in or register to comment.