Updates an agent
put
/oaa-policy/agent/v1/{agentgid}
Request
Path Parameters
-
agentgid(required): string
Identifier of the agent.
Supported Media Types
- application/xml
- application/json
Root Schema : schema
Type:
objectDetails of the agent
Show Source
-
agentgid: string
Unique identifier of the agent.
-
agentName(required): string
Unique name of the agent
-
clientId: string
Client id of the agent used to identify agents
-
clientSecret: string
Client secret used for the authenticating client
-
clientType(required): string
Client type. Possible value for this field is OAM, Radius or API.
-
createTime: string
(date-time)
"Date time string in the format rfc3339 sec 5.6. https://tools.ietf.org/html/rfc3339#section-5.6"
-
description: string
Description of the agent
-
privateKey: string
String representation of the private key of the agent which can be used to encrypt/decrypt the request parameters.
-
privateKeyFile: string
File name of the private key.
-
privateKeyPassword: string
Base64 encoded password of the private key.
-
updateTime: string
(date-time)
"Date time string in the format rfc3339 sec 5.6. https://tools.ietf.org/html/rfc3339#section-5.6"
Root Schema : schema
Type:
objectDetails of the agent
Show Source
-
agentgid: string
Unique identifier of the agent.
-
agentName(required): string
Unique name of the agent
-
clientId: string
Client id of the agent used to identify agents
-
clientSecret: string
Client secret used for the authenticating client
-
clientType(required): string
Client type. Possible value for this field is OAM, Radius or API.
-
createTime: string
(date-time)
"Date time string in the format rfc3339 sec 5.6. https://tools.ietf.org/html/rfc3339#section-5.6"
-
description: string
Description of the agent
-
privateKey: string
String representation of the private key of the agent which can be used to encrypt/decrypt the request parameters.
-
privateKeyFile: string
File name of the private key.
-
privateKeyPassword: string
Base64 encoded password of the private key.
-
updateTime: string
(date-time)
"Date time string in the format rfc3339 sec 5.6. https://tools.ietf.org/html/rfc3339#section-5.6"
Response
Supported Media Types
- application/xml
- application/json
200 Response
Update agent is successful
Root Schema : AgentResponse
Type:
Show Source
object-
agent: object
schema
Details of the agent
-
agentgid: string
Global identifier of the agent which can be used in the subsequent request.
-
message: string
Message related to the status of the request
-
status: string
Status of the request
Nested Schema : schema
Type:
objectDetails of the agent
Show Source
-
agentgid: string
Unique identifier of the agent.
-
agentName(required): string
Unique name of the agent
-
clientId: string
Client id of the agent used to identify agents
-
clientSecret: string
Client secret used for the authenticating client
-
clientType(required): string
Client type. Possible value for this field is OAM, Radius or API.
-
createTime: string
(date-time)
"Date time string in the format rfc3339 sec 5.6. https://tools.ietf.org/html/rfc3339#section-5.6"
-
description: string
Description of the agent
-
privateKey: string
String representation of the private key of the agent which can be used to encrypt/decrypt the request parameters.
-
privateKeyFile: string
File name of the private key.
-
privateKeyPassword: string
Base64 encoded password of the private key.
-
updateTime: string
(date-time)
"Date time string in the format rfc3339 sec 5.6. https://tools.ietf.org/html/rfc3339#section-5.6"
401 Response
Unauthorized
405 Response
Invalid input
Root Schema : AgentResponse
Type:
Show Source
object-
agent: object
schema
Details of the agent
-
agentgid: string
Global identifier of the agent which can be used in the subsequent request.
-
message: string
Message related to the status of the request
-
status: string
Status of the request
Nested Schema : schema
Type:
objectDetails of the agent
Show Source
-
agentgid: string
Unique identifier of the agent.
-
agentName(required): string
Unique name of the agent
-
clientId: string
Client id of the agent used to identify agents
-
clientSecret: string
Client secret used for the authenticating client
-
clientType(required): string
Client type. Possible value for this field is OAM, Radius or API.
-
createTime: string
(date-time)
"Date time string in the format rfc3339 sec 5.6. https://tools.ietf.org/html/rfc3339#section-5.6"
-
description: string
Description of the agent
-
privateKey: string
String representation of the private key of the agent which can be used to encrypt/decrypt the request parameters.
-
privateKeyFile: string
File name of the private key.
-
privateKeyPassword: string
Base64 encoded password of the private key.
-
updateTime: string
(date-time)
"Date time string in the format rfc3339 sec 5.6. https://tools.ietf.org/html/rfc3339#section-5.6"
500 Response
Internal server error
503 Response
Service Unavailable
Examples
The following example shows a sample request and response for updating an agent.
cURL Command to Update an Agent in JSON Format
curl --location --request PUT '<PolicyUrl>/oaa-policy/agent/v1/dede64d3-1d6a-42e9-89e1-714e88f8967c' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \
--data '{
"agentName": "APIAgent",
"description": "API Agent Update"
}'Sample Response in JSON Format
{
"status": "200",
"message": "Update Successful.",
"agentgid": "dede64d3-1d6a-42e9-89e1-714e88f8967c",
"agent": {
"agentName": "APIAgent",
"description": "API Agent Update",
"clientId": "c1e08e6a-b555-47e1-84a5-36edd06fbf57",
"clientSecret": "b2484989-5f42-4ad8-b0ab-7bbaa06ee786",
"clientType": "api",
"agentgid": "dede64d3-1d6a-42e9-89e1-714e88f8967c",
"createTime": {
"parseFailed": false,
"dateTime": "2021-04-01T09:06:13.668Z",
"rawParam": "2021-04-01T09:06:13.668Z"
},
"updateTime": {
"parseFailed": false,
"dateTime": "2021-04-01T09:18:36.142Z",
"rawParam": "2021-04-01T09:18:36.142Z"
}
}
}cURL Command to Update an Agent in XML Format
curl --location --request PUT '<PolicyUrl>/oaa-policy/agent/v1/dede64d3-1d6a-42e9-89e1-714e88f8967c' \
--header 'Content-Type: application/xml' \
--header 'Accept: application/xml' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \
--data '<?xml version="1.0" encoding="UTF-8" ?>
<Agent>
<agentName>APIAgent</agentName>
<description>API Agent Update</description>
</Agent>
'Sample Response in XML Format
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AgentResponse>
<status>200</status>
<message>Update Successful.</message>
<agentgid>dede64d3-1d6a-42e9-89e1-714e88f8967c</agentgid>
<agent>
<agentName>APIAgent</agentName>
<description>API Agent Update</description>
<clientId>c1e08e6a-b555-47e1-84a5-36edd06fbf57</clientId>
<clientSecret>b2484989-5f42-4ad8-b0ab-7bbaa06ee786</clientSecret>
<clientType>api</clientType>
<agentgid>dede64d3-1d6a-42e9-89e1-714e88f8967c</agentgid>
<createTime>
<parseFailed>false</parseFailed>
<dateTime>2021-04-01T09:06:13.668Z</dateTime>
<rawParam>2021-04-01T09:06:13.668Z</rawParam>
</createTime>
<updateTime>
<parseFailed>false</parseFailed>
<dateTime>2021-04-01T09:18:36.142Z</dateTime>
<rawParam>2021-04-01T09:18:36.142Z</rawParam>
</updateTime>
</agent>
</AgentResponse>