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.

  • Path: Fully-qualified path as follows:
    <configurationGroup>:<configurationItemName>
  • Value: User-provided value for the configuration item

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":"&lt;parent&gt;&lt;child-1&gt;text1&lt;/child-1&gt;&lt;/parent&gt;"
}
]
}

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":"&lt;EncryptedData &gt;&lt;CipherData&gt;&lt;CipherValue&gt;k6+5Pos0evyBx85ZX7/bIQ==&lt;/CipherValue&gt;&lt;/CipherData&gt;&lt;/EncryptedData&gt;"
}
]
}

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":"&lt;parentxmlns=\"http://www.w3.org/2001/04/xmlenc#\" Type=\"http://www.w3.org/2001/04/xmlenc#Content\"
&gt;&lt;child-1&gt;text1&lt;/child-1&gt;&lt;/parent&gt;"

}
]
}

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

Related topics

HTTP-request-and-response-headers

Format-of-API-examples

Activate-module

Deactivate-module

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*