Deletes an agent

delete

/oaa-policy/agent/v1/{agentgid}

Request

Path Parameters

There's no request body for this operation.

Back to Top

Response

Supported Media Types

200 Response

Agent is deleted from the store.
Body ()
Root Schema : AgentResponse
Type: object
Show Source
Nested Schema : schema
Type: object
Details of the agent
Show Source

401 Response

Unauthorized

405 Response

Invalid input
Body ()
Root Schema : AgentResponse
Type: object
Show Source
Nested Schema : schema
Type: object
Details of the agent
Show Source

500 Response

Internal server error

503 Response

Service Unavailable
Back to Top

Examples

The following example shows a sample request and response for deleting an agent.

cURL Command to Delete an Agent in JSON Format

curl --location --request DELETE '<PolicyUrl>/oaa-policy/agent/v1/ed022f31-c5f5-4665-8a19-159655f514ae' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>'

Sample Response in JSON Format

{
    "status": "200",
    "message": "Agent deleted",
    "agentgid": "ed022f31-c5f5-4665-8a19-159655f514ae",
    "agent": {
        "agentName": "APIAgent2",
        "description": "Agent for REST API",
        "clientId": "0a47d442-9dc0-4841-b734-8e15e1634ee4",
        "clientSecret": "273a8d9c-29ad-4956-bc8d-69ffcfbf1d73",
        "clientType": "api",
        "agentgid": "ed022f31-c5f5-4665-8a19-159655f514ae",
        "createTime": {
            "parseFailed": false,
            "dateTime": "2021-04-01T09:19:23.28Z",
            "rawParam": "2021-04-01T09:19:23.28Z"
        },
        "updateTime": {
            "parseFailed": false,
            "dateTime": "2021-04-01T09:19:23.28Z",
            "rawParam": "2021-04-01T09:19:23.28Z"
        }
    }
}

cURL Command to Delete an Agent in XML Format

curl --location --request DELETE '<PolicyUrl>/oaa-policy/agent/v1/ed022f31-c5f5-4665-8a19-159655f514ae' \
--header 'Content-Type: application/xml' \
--header 'Accept: application/xml' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>'

Sample Response in XML Format

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <AgentResponse>
     <status>200</status>
     <message>Agent deleted</message>
     <agentgid>ed022f31-c5f5-4665-8a19-159655f514ae</agentgid>
     <agent>
         <agentName>APIAgent2</agentName>
         <description>Agent for REST API</description>
         <clientId>0a47d442-9dc0-4841-b734-8e15e1634ee4</clientId>
         <clientSecret>273a8d9c-29ad-4956-bc8d-69ffcfbf1d73</clientSecret>
         <clientType>api</clientType>
         <agentgid>ed022f31-c5f5-4665-8a19-159655f514ae</agentgid>
         <createTime>
             <parseFailed>false</parseFailed>
             <dateTime>2021-04-01T09:19:23.28Z</dateTime>
             <rawParam>2021-04-01T09:19:23.28Z</rawParam>
         </createTime>
         <updateTime>
             <parseFailed>false</parseFailed>
             <dateTime>2021-04-01T09:19:23.28Z</dateTime>
             <rawParam>2021-04-01T09:19:23.28Z</rawParam>
         </updateTime>
     </AgentResponse>
Back to Top