PingOne Platform APIs

Read All Decision Endpoints

 

GET {{apiPath}}/environments/{{envID}}/decisionEndpoints

The GET {{apiPath}}/environments/{{envID}}/decisionEndpoints operation returns all policy decision endpoint resources associated with the environment.

This request supports the limit parameter (for example, ?limit=1).

Query parameters
Query parameter Description

limit

Sets the number of records returned per page.

sw (starts with)

Supports the name property.

eq (equal to)

Supports the id, organization.id, license.id properties.

and (logical AND)

Connects multiple filters on any supported property.

Headers

Authorization      Bearer {{accessToken}}

Example Request

  • cURL

  • C#

  • Go

  • HTTP

  • Java

  • jQuery

  • NodeJS

  • Python

  • PHP

  • Ruby

  • Swift

curl --location --globoff '{{apiPath}}/environments/{{envID}}/decisionEndpoints' \
--header 'Authorization: Bearer {{accessToken}}'
var options = new RestClientOptions("{{apiPath}}/environments/{{envID}}/decisionEndpoints")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Get);
request.AddHeader("Authorization", "Bearer {{accessToken}}");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "{{apiPath}}/environments/{{envID}}/decisionEndpoints"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Bearer {{accessToken}}")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
GET /environments/{{envID}}/decisionEndpoints HTTP/1.1
Host: {{apiPath}}
Authorization: Bearer {{accessToken}}
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("{{apiPath}}/environments/{{envID}}/decisionEndpoints")
  .method("GET", body)
  .addHeader("Authorization", "Bearer {{accessToken}}")
  .build();
Response response = client.newCall(request).execute();
var settings = {
  "url": "{{apiPath}}/environments/{{envID}}/decisionEndpoints",
  "method": "GET",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer {{accessToken}}"
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
var request = require('request');
var options = {
  'method': 'GET',
  'url': '{{apiPath}}/environments/{{envID}}/decisionEndpoints',
  'headers': {
    'Authorization': 'Bearer {{accessToken}}'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
import requests

url = "{{apiPath}}/environments/{{envID}}/decisionEndpoints"

payload = {}
headers = {
  'Authorization': 'Bearer {{accessToken}}'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{{apiPath}}/environments/{{envID}}/decisionEndpoints');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer {{accessToken}}'
));
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
require "uri"
require "net/http"

url = URI("{{apiPath}}/environments/{{envID}}/decisionEndpoints")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer {{accessToken}}"

response = http.request(request)
puts response.read_body
var request = URLRequest(url: URL(string: "{{apiPath}}/environments/{{envID}}/decisionEndpoints")!,timeoutInterval: Double.infinity)
request.addValue("Bearer {{accessToken}}", forHTTPHeaderField: "Authorization")

request.httpMethod = "GET"

let task = URLSession.shared.dataTask(with: request) { data, response, error in
  guard let data = data else {
    print(String(describing: error))
    return
  }
  print(String(data: data, encoding: .utf8)!)
}

task.resume()

Example Response

200 OK

{
    "_links": {
        "environment": {
            "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
        },
        "self": {
            "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/decisionEndpoints"
        }
    },
    "_embedded": {
        "decisionEndpoints": [
            {
                "_links": {
                    "environment": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                    },
                    "self": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/decisionEndpoints/87554d55-a7cf-4073-ba74-b6e6b367d98e"
                    }
                },
                "id": "87554d55-a7cf-4073-ba74-b6e6b367d98e",
                "name": "DEV",
                "description": "A bootstrapped endpoint to be used for policy development. Decisions made by this endpoint will reflect the latest changes to the environment's policies.",
                "recordRecentRequests": false,
                "owned": false,
                "environment": {
                    "id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                }
            },
            {
                "_links": {
                    "environment": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                    },
                    "self": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/decisionEndpoints/bbd86efa-e3cc-4558-bdbe-85d9514a6b10"
                    },
                    "authorizationVersion": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/authorizationVersions/9ae648d0-3fad-11ef-ab22-a9b5b03c30b7"
                    }
                },
                "id": "bbd86efa-e3cc-4558-bdbe-85d9514a6b10",
                "name": "TEST",
                "description": "A bootstrapped endpoint to be used in a test environment. Decisions made by this endpoint will reflect the initial state of the environment's policies unless changed. ",
                "authorizationVersion": {
                    "id": "9ae648d0-3fad-11ef-ab22-a9b5b03c30b7"
                },
                "recordRecentRequests": true,
                "owned": false,
                "environment": {
                    "id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                }
            },
            {
                "_links": {
                    "environment": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                    },
                    "self": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/decisionEndpoints/e582d56e-b63b-4a1c-ba9e-f898d3b177ba"
                    },
                    "authorizationVersion": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/authorizationVersions/c35ed0b0-49f9-11ef-9fd6-815aa389a860"
                    }
                },
                "id": "e582d56e-b63b-4a1c-ba9e-f898d3b177ba",
                "name": "Meme Game",
                "description": "This endpoint is managed by PingOne for the API service 'Meme Game'.",
                "policy": {
                    "id": "11cdd17f-ceee-4d3b-8bca-27118019da7a"
                },
                "authorizationVersion": {
                    "id": "c35ed0b0-49f9-11ef-9fd6-815aa389a860"
                },
                "alternateId": "aam.ae1d0e9e-418c-4149-b0e9-d44548cfa59c",
                "recordRecentRequests": true,
                "owned": true,
                "environment": {
                    "id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                }
            },
            {
                "_links": {
                    "environment": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                    },
                    "self": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/decisionEndpoints/ef9dbfbe-32d1-418a-87b5-b244efed8046"
                    },
                    "authorizationVersion": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/authorizationVersions/46d07490-0ee9-11ef-b2dd-f3e6b9c5ed9a"
                    }
                },
                "id": "ef9dbfbe-32d1-418a-87b5-b244efed8046",
                "name": "PROD",
                "description": "A bootstrapped endpoint to be used in a production environment. Decisions made by this endpoint will reflect the initial state of the environment's policies unless changed. ",
                "authorizationVersion": {
                    "id": "46d07490-0ee9-11ef-b2dd-f3e6b9c5ed9a"
                },
                "recordRecentRequests": false,
                "owned": false,
                "environment": {
                    "id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                }
            }
        ]
    },
    "count": 4,
    "size": 4
}