Gets an agent

get

/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 information
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 to retrieve an agent.

cURL Command to Retrieve an Agent in JSON Format

curl --location --request GET '<PolicyUrl>/oaa-policy/agent/v1/dede64d3-1d6a-42e9-89e1-714e88f8967c' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>'

Sample Response in JSON Format

{
    "status": "200",
    "message": "Successful",
    "agentgid": "dede64d3-1d6a-42e9-89e1-714e88f8967c",
    "agent": {
        "agentName": "APIAgent",
        "description": "Agent for REST API",
        "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:06:13.668Z",
            "rawParam": "2021-04-01T09:06:13.668Z"
        }
    }
}

cURL Command to Retrieve an Agent in XML Format

curl --location --request GET '<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>)>'

Sample Response in XML Format

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <AgentResponse>
     <status>200</status>
     <message>Successful</message>
     <agentgid>dede64d3-1d6a-42e9-89e1-714e88f8967c</agentgid>
     <agent>
         <agentName>APIAgent</agentName>
         <description>Agent for REST API</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:06:13.668Z</dateTime>
             <rawParam>2021-04-01T09:06:13.668Z</rawParam>
         </updateTime>
     </agent>
 </AgentResponse>
Back to Top