Read All Modules
GET {{apiPath}}/v1/environments/{{envId}}/authorizationModules
The GET {{apiPath}}/v1/environments/{{envId}}/authorizationModules operation returns all authorization modules associated with the environment.
Query parameters
| Query parameter | Description | Value |
|---|---|---|
|
Filters results by module property. |
Supported comparators are |
|
Specifies the pagination cursor. |
Default: |
|
Specifies the maximum number of modules returned. |
Default: |
Example Request
-
cURL
-
C#
-
Go
-
HTTP
-
Java
-
jQuery
-
NodeJS
-
Python
-
PHP
-
Ruby
-
Swift
curl --location --globoff '{{apiPath}}/v1/environments/{{envId}}/authorizationModules' \
--header 'Authorization: Bearer {{accessToken}}'
var options = new RestClientOptions("{{apiPath}}/v1/environments/{{envId}}/authorizationModules")
{
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}}/v1/environments/{{envId}}/authorizationModules"
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 /v1/environments/{{envId}}/authorizationModules 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}}/v1/environments/{{envId}}/authorizationModules")
.method("GET", body)
.addHeader("Authorization", "Bearer {{accessToken}}")
.build();
Response response = client.newCall(request).execute();
var settings = {
"url": "{{apiPath}}/v1/environments/{{envId}}/authorizationModules",
"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}}/v1/environments/{{envId}}/authorizationModules',
'headers': {
'Authorization': 'Bearer {{accessToken}}'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{apiPath}}/v1/environments/{{envId}}/authorizationModules"
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}}/v1/environments/{{envId}}/authorizationModules');
$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}}/v1/environments/{{envId}}/authorizationModules")
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}}/v1/environments/{{envId}}/authorizationModules")!,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": {
"self": {
"href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/authorizationModules?limit=25"
}
},
"_embedded": {
"authorizationModules": [
{
"_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/authorizationModules/00000000-0000-0000-0000-000000000000"
}
},
"name": "Default",
"description": "Default module created by system",
"id": "00000000-0000-0000-0000-000000000000",
"type": "System"
},
{
"_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/authorizationModules/e8184987-8b04-413d-aaac-5665b27893dd"
}
},
"name": "API Access Management Module",
"description": "New module",
"id": "e8184987-8b04-413d-aaac-5665b27893dd",
"type": "Custom"
},
{
"_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/authorizationModules/92769508-17a4-4105-b51c-d6e2d9854b64"
}
},
"name": "API Service \"New service\"",
"description": "Contains policies relevant to the API Service.",
"id": "92769508-17a4-4105-b51c-d6e2d9854b64",
"type": "API Access Management"
},
{
"_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/authorizationModules/c98c9861-1b4c-41b6-9293-e49cfe60009a"
}
},
"name": "API Service \"New service\"",
"description": "Contains policies relevant to the API Service.",
"id": "c98c9861-1b4c-41b6-9293-e49cfe60009a",
"type": "API Access Management"
},
{
"_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/authorizationModules/df649e2d-4565-4359-9196-d0a784592542"
}
},
"name": "API Service \"New service\"",
"description": "Contains policies relevant to the API Service.",
"id": "df649e2d-4565-4359-9196-d0a784592542",
"type": "API Access Management"
},
{
"_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/authorizationModules/11129219-2df4-4520-8d98-9b8f8d326a64"
}
},
"name": "API Service \"New test service\"",
"description": "Contains policies relevant to the API Service.",
"id": "11129219-2df4-4520-8d98-9b8f8d326a64",
"type": "API Access Management"
},
{
"_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/authorizationModules/95539989-e28a-4ea6-8a0f-5ebae88a3bbb"
}
},
"name": "API Service \"New test service\"",
"description": "Contains policies relevant to the API Service.",
"id": "95539989-e28a-4ea6-8a0f-5ebae88a3bbb",
"type": "API Access Management"
},
{
"_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/authorizationModules/96dfbba4-97db-4b93-88b2-b233a820172d"
}
},
"name": "API Service \"New test service\"",
"description": "Contains policies relevant to the API Service.",
"id": "96dfbba4-97db-4b93-88b2-b233a820172d",
"type": "API Access Management"
},
{
"_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/authorizationModules/fef34f8c-c62b-42e1-9b30-4a3308903c53"
}
},
"name": "AccountsPayable",
"id": "fef34f8c-c62b-42e1-9b30-4a3308903c53",
"type": "Custom"
}
]
},
"count": 9,
"size": 9
}