GET | List all devices
  • 2 minutes to read
  • Dark
    Light
  • PDF

GET | List all devices

  • Dark
    Light
  • PDF

Article summary

Access information of the devices associated with your authorization in PAM Core.

Requirements

Request

GET /api/pam/device

Example request

GET {{url}}/api/pam/device

Response

HTTP/1.1 200 OK 
{
    "code": 200,
    "response": {
        "status": 200,
        "message": "2 devices found",
        "error": false,
        "error_code": 0,
        "detail": "",
        "mensagem": "2 devices found",
        "erro": false,
        "cod_erro": 0
    },
    "devices": [
        {
            "id": "1",
            "hostname": "mydevicehostname",
            "ip": "172.10.20.30",
            "model": "Windows Server 2012",
            "type": "Server",
            "vendor": "Microsoft",
            "site": "LAX"
	        "tags": "tag001"
        },
        {
            "id": "6",
            "hostname": "myseconddevice",
            "ip": "41.41.208.182",
            "model": "CentOS 7",
            "type": "Server",
            "vendor": "CentOS",
            "site": "AWS"
	        "tags": ""
        }
    ]
}

Response body fields

devices - array de objetos - Dados dos dispositivos


    → id - int - Unique identification code of the device.


    →hostname - string - Hostname of the device.


    →ip - string - IP address of the device.


    →model - string - Device model.


    →type - string - Device type.


    →vendor - string - Device vendor.


    →site - string - Device location.


    →tags - string - Keywords associated with the device.

Errors

404 - Not Found

Message: "Resource sub not found"

Possible cause: the URL or the requested resource isn’t correct.

Solution: check the URL and make sure the parameter is correct.


500 - Internal Server Error

Message: "Unexpected error."

Possible cause: the error is in the senhasegura server.

Solution: contact the support team for more information.


Message: "You are not authorized to access this resource."

Possible cause: you don’t have the authorization to access this resource.

Solution: ask the administrator to check your permission to access the PAM Core resources in A2A.


Client authentication failed

Message: "Client authentication failed."

Possible cause: failure in your application authentication with the senhasegura server.

Solution: check the authentication parameters such as Access Token URL, Client ID e Client secret and request a new access token.


Invalid signature

Message: "Invalid signature"

Possible cause: failure in recognizing the URL of the client application.

Solution: check the URL of the client application and resent the request.


No route matched with those values

Message: "No route matched with those values."

Possible cause: the authorization header is missing in the API request.

Solution: request a new access token.


Request timed out

Message: "Request timed out."

Possible cause: the request time has expired.

Solution: check the connectivity between the source of the request and the senhasegura server.


Was this article helpful?