5.18.4 Add, update, delete the secrets
- Description
-
Execute add, update, and delete of the secret that you want JP1/IM agent control base to manage.
You can register up to 1,000 secrets.
- Execution permissions
-
JP1_Console_Admin
- API version
-
v1
- Format
-
- Request line
POST /application/component/apiVersion/agents/secrets/change httpVersion
- Request header
-
Follow the request header in 5.2.3 Request format.
- Request message body
-
Message body of the request can be sent in JSON formats.
-
Execute only add or refresh (Delete is not executed)
Write the secret that you want to add in "add".
[ "agenthost":"integrated-agent-host-name", "managerhost":"manager-host-name", "add": { "secrets": [ { "key": "key1", "secret": "plaintext-secret-1" }, { "key": "key2", "secret": "plaintext-secret-2" }, { "key": "key3", "secret": "plaintext-secret-3" } ] } }-
If you want to execute only deletion (do not execute a add or refresh)
Write the secret that you want to delete in "delete".
[ "agenthost":"integrated-agent-host-name", "managerhost":"manager-host-name", "delete": { "secrets": [ { "key": "key1", }, { "key": "key2", }, { "key": "key3", } ] } }-
To execute add or updating and deletion
Write add or the secret you want to renew on add and put the secret you want to delete on "delete".
If you specify the same key for "add" and "delete", "add" applies.
[ "agenthost":"integrated-agent-host-name", "managerhost":"manager-host-name", "add": { "secrets": [ { "key": "key1", "secret": "plaintext-secret-1" }, { "key": "key2", "secret": "plaintext-secret-2" }, { "key": "key3", "secret": "plaintext-secret-" } ] }, "delete": { "secrets": [ { "key": "key1", }, { "key": "key2", }, { "key": "key3", } ] } } -
- Response message body
-
None
- Parameters
-
Here are the parameters that you specify for message body of the request:
Parameter name
Data type
Optional
Description
agenthost
string
No
Specify the host name of integrated agent in the range of 1 to 255.
managerhost
string
No
Specify the manager host name in the range of 1 to 255.
add
object
Yes
Specify the secret to add or refresh. If you do not have a secret to add or refresh, omit it.
secrets
object[]
No
Specify the secret to add or refresh.
key
string
No
Specify the secret key for the key name.
The number of characters that can be specified is 1 to 1024, and the number of characters that can be specified is ASCII (0x20 to 0x7e). Otherwise, it is error.
secret
string
No
Specify a secret.
The number of characters that can be specified is 1 to 1024, and the number of characters that can be specified is ASCII (0x20 to 0x7e). Otherwise, it is error.
delete
object
Yes
Specify the secret to delete. If there is no secret to delete, omit it.
secrets
object[]
No
Specify the secret to delete.
key
string
No
Specify the secret key for the key name.
The number of characters that can be specified is 1 to 1024, and the number of characters that can be specified is ASCII (0x20 to 0x7e). Otherwise, it is error.
- Status codes
-
The following table describes the status codes that are returned as a response to the request:
Status code
Message
Description
200
--
API operation was successful.
400
KAJY68209-E
Request parameter is invalid.
400
KAJY68205-E
-
Integrated agent host name specified in the request or the configuration managed by the manager host name does not exist in JP1/IM - Manager
-
Logged in as does not have read/manipulate permissions for integrated agent specified in the request
403
KAJY01000-E
The permissions of the user used for authentication is insufficient.
500
KAJY00007-E
System error has occurred (out of disk, out of memory, etc.).
500
KAJY02039-E
An internal error occurred (such as an invalid API parameter or environmental error).
500
KAJY68203-E
Cannot connect to Intelligent Integrated Management Base of the manager for the specified integrated agent.
500
KAJY68207-E
JP1/IM agent base operation encountered an Error.
500
KAJY68211-E
Intelligent Integrated Management Base operation encountered an error.
500
KAJY68212-E
Cannot connect to JP1/IM agent base.
500
KAJY68501-E
Unable to connect to the manager's unified agent host management DB.
-
- Error message output
-
API response, including the content of the error message, is returned to the caller when an Execute of Error occurs. The caller displays Message at the caller, using the information of the received response.
- Return values
-
None
- Examples
-
- Request:
POST http://immhost01:20703/im/api/v1/agents/secrets/change
Manager host name: immhost01
{ "agenthost": "hostA", "managerhost": "hostB", "add": { "secrets": [ { "key": "key1", "secret": "secret1" }, { "key": "key2", "secret": "secret2" } ] } }- Response:
-
Omitted