PingAuthorize API Reference

Read Trust Framework Definition Children (Type and Full Name)

GET {{apiPath}}/trust-framework/{{definitionType}}/{{fullName}}?branch={{branchId}}&snapshot={{snapshotId}}

The GET /trust-framework/{{definitionType}}/{{fullName}} operation returns all immediate children of a definition identified by its type and full name in the request URL. The request must provide either a branch ID or a snapshot ID in the request URL.

Prerequisites

Query parameters
Query parameter Description

branch

Branch ID or name

snapshot

Snapshot ID

Headers

x-user-id      {{userId}}

Example Request

  • cURL

  • C#

  • Go

  • HTTP

  • Java

  • jQuery

  • NodeJS

  • Python

  • PHP

  • Ruby

  • Swift

curl --location --globoff '{{apiPath}}/trust-framework/{{definitionType}}/{{fullName}}?branch={{branchId}}&snapshot={{snapshotId}}' \
--header 'x-user-id: {{userId}}'
var options = new RestClientOptions("{{apiPath}}/trust-framework/{{definitionType}}/{{fullName}}?branch={{branchId}}&snapshot={{snapshotId}}")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Get);
request.AddHeader("x-user-id", "{{userId}}");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main

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

func main() {

  url := "{{apiPath}}/trust-framework/{{definitionType}}/{{fullName}}?branch={{branchId}}&snapshot={{snapshotId}}"
  method := "GET"

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

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("x-user-id", "{{userId}}")

  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 /trust-framework/{{definitionType}}/{{fullName}}?branch={{branchId}}&snapshot={{snapshotId}} HTTP/1.1
Host: {{apiPath}}
x-user-id: {{userId}}
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("{{apiPath}}/trust-framework/{{definitionType}}/{{fullName}}?branch={{branchId}}&snapshot={{snapshotId}}")
  .method("GET", body)
  .addHeader("x-user-id", "{{userId}}")
  .build();
Response response = client.newCall(request).execute();
var settings = {
  "url": "{{apiPath}}/trust-framework/{{definitionType}}/{{fullName}}?branch={{branchId}}&snapshot={{snapshotId}}",
  "method": "GET",
  "timeout": 0,
  "headers": {
    "x-user-id": "{{userId}}"
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
var request = require('request');
var options = {
  'method': 'GET',
  'url': '{{apiPath}}/trust-framework/{{definitionType}}/{{fullName}}?branch={{branchId}}&snapshot={{snapshotId}}',
  'headers': {
    'x-user-id': '{{userId}}'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
import requests

url = "{{apiPath}}/trust-framework/{{definitionType}}/{{fullName}}?branch={{branchId}}&snapshot={{snapshotId}}"

payload = {}
headers = {
  'x-user-id': '{{userId}}'
}

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}}/trust-framework/{{definitionType}}/{{fullName}}?branch={{branchId}}&snapshot={{snapshotId}}');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'x-user-id' => '{{userId}}'
));
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}}/trust-framework/{{definitionType}}/{{fullName}}?branch={{branchId}}&snapshot={{snapshotId}}")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["x-user-id"] = "{{userId}}"

response = http.request(request)
puts response.read_body
var request = URLRequest(url: URL(string: "{{apiPath}}/trust-framework/{{definitionType}}/{{fullName}}?branch={{branchId}}&snapshot={{snapshotId}}")!,timeoutInterval: Double.infinity)
request.addValue("{{userId}}", forHTTPHeaderField: "x-user-id")

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

{
    "objectType": "DomainDefinition",
    "id": "5c0028e4-4453-4843-958a-0d5e8f156ef4",
    "version": "cee9371c-71d9-4897-b5e0-45c35728c1b3",
    "type": "DOMAIN",
    "name": "Child Definition",
    "fullName": "Test Definition.Child Definition",
    "description": "",
    "parentId": "cfdd5d26-cb90-4504-8b01-1e0f92670932",
    "numberOfChildren": 0,
    "permissions": {
        "inherit": true,
        "rolePermissions": []
    },
    "properties": []
}