PingOne Platform APIs

Step 2: Get a list of integrations

GET {{apiPath}}/environments/{{envID}}/integrations?expand=latestVersion&filter=(name co "PingID")

Now that you have the environment ID, you need to retrieve a list of integrations associated with that environment. Each integration can have several versions, so you may need to further filter your results to return a more manageable list.

For the purpose of this example, we will assume that you cannot remember the name of the integration kit, but your certain "PingID" was part of it. You want to download the latest version of the integration kit, so you also want to set the expand attribute to latestVersion. Your endpoint becomes {{apiPath}}/environments/{{envID}}/integrations?expand=latestVersion&filter=(name co "PingID"), where {{envID}} equals 020ed26b-ae15-4783-8fb3-gd65816dc391 (from step 1). The filter attribute limits the response to those integrations that contain case-insensitive value of "pingid".

The example response to the right (or below) contains the information we want. For the purpose of this exercise, we will assume the first integration is the one we want. Looking at the object, we can see that our integration ID is c290da08-0151-45f6-a651-0efg0805ca34 and the version ID is a9c8a539-191e-4015-ab52-c1943d2142a1.

Headers

Authorization      Bearer {{accessToken}}

Example Request

  • cURL

  • C#

  • Go

  • HTTP

  • Java

  • jQuery

  • NodeJS

  • Python

  • PHP

  • Ruby

  • Swift

curl --location --globoff '{{apiPath}}/environments/{{envID}}/integrations?expand=latestVersion&filter=(name%20co%20%22PingID%22)' \
--header 'Authorization: Bearer {{accessToken}}'
var options = new RestClientOptions("{{apiPath}}/environments/{{envID}}/integrations?expand=latestVersion&filter=(name co \"PingID\")")
{
  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}}/integrations?expand=latestVersion&filter=(name%20co%20%22PingID%22)"
  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}}/integrations?expand=latestVersion&filter=(name co "PingID") 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}}/integrations?expand=latestVersion&filter=(name co \"PingID\")")
  .method("GET", body)
  .addHeader("Authorization", "Bearer {{accessToken}}")
  .build();
Response response = client.newCall(request).execute();
var settings = {
  "url": "{{apiPath}}/environments/{{envID}}/integrations?expand=latestVersion&filter=(name co \"PingID\")",
  "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}}/integrations?expand=latestVersion&filter=(name co "PingID")',
  '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}}/integrations?expand=latestVersion&filter=(name co \"PingID\")"

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}}/integrations?expand=latestVersion&filter=(name co "PingID")');
$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}}/integrations?expand=latestVersion&filter=(name co \"PingID\")")

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}}/integrations?expand=latestVersion&filter=(name%20co%20%22PingID%22)")!,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://example.com/v1/environments/020ed26b-ae15-5283-8fb3-gd65816dc766/integrations"
        }
    },
    "_embedded": {
        "integrations": [
            {
                "_links": {
                    "self": {
                        "href": "https://example.com/v1/environments/020ed26b-ae15-5283-8fb3-gd65816dc766/integrations/c290da08-0151-45f6-a651-0efg0805ca34"
                    },
                    "environment": {
                        "href": "https://example.com/v1/environments/020ed26b-ae15-5283-8fb3-gd65816dc766"
                    },
                    "versions": {
                        "href": "https://example.com/v1/environments/020ed26b-ae15-5283-8fb3-gd65816dc766/integrations/c290da08-0151-45f6-a651-0efg0805ca34/versions"
                    }
                },
                "_embedded": {
                    "versions": [
                        {
                            "id": "a9c8a539-191e-4015-ab52-c1943d2142a1",
                            "name": "PingID Integration Kits",
                            "description": "Integrate PingID as an authentication solution with PingFederate either as a federation solution or as an identity bridge.",
                            "integration": {
                                "id": "c290da08-0151-45f6-a651-0efg0805ca34"
                            },
                            "type": "PRODUCT_INTEGRATION_KIT",
                            "number": "2.11",
                            "releasedOn": "2020-11-30",
                            "integratedWith": {
                                "name": "PINGFEDERATE"
                            },
                            "documentationUrl": "https://docs.pingidentity.com/bundle/pingid/page/kor1564020462373.html"
                        }
                    ]
                },
                "id": "c290da08-0151-45f6-a651-0efg0805ca34",
                "name": "PingFederate PingID Integration Kit",
                "thirdParty": {
                    "companyName": "Ping Identity"
                },
                "publisher": "Ping Identity",
                "tags": [
                    "PROVISIONING",
                    "MFA"
                ],
                "pingProductNames": [
                    "PINGFEDERATE"
                ],
                "marketingLandingPageUrl": "https://support.pingidentity.com/s/marketplace-integration/a7i1W000000CfnAQAS/pingid-for-pingfederate",
                "createdAt": "2021-01-22T00:52:32.812Z"
            },
            {
                "_links": {
                    "self": {
                        "href": "https://example.com/v1/environments/020ed26b-ae15-5283-8fb3-gd65816dc766/integrations/4d6c4b24-3a30-41fd-b80e-cc6c6004cbd9"
                    },
                    "environment": {
                        "href": "https://example.com/v1/environments/020ed26b-ae15-5283-8fb3-gd65816dc766"
                    },
                    "versions": {
                        "href": "https://example.com/v1/environments/020ed26b-ae15-5283-8fb3-gd65816dc766/integrations/4d6c4b24-3a30-41fd-b80e-cc6c6004cbd9/versions"
                    }
                },
                "_embedded": {
                    "versions": []
                },
                "id": "4d6c4b24-3a30-41fd-b80e-cc6c6004cbd9",
                "name": "PingFederate PingID Connector",
                "thirdParty": {
                    "companyName": "Ping Identity"
                },
                "publisher": "Ping Identity",
                "tags": [
                    "PROVISIONING"
                ],
                "pingProductNames": [
                    "PINGFEDERATE"
                ],
                "marketingLandingPageUrl": "https://support.pingidentity.com/s/marketplace-integration/a7i1W0000004IDHQA2/pingid-connector",
                "createdAt": "2021-01-22T00:53:09.491Z"
            },
            {
                "_links": {
                    "self": {
                        "href": "https://example.com/v1/environments/020ed26b-ae15-5283-8fb3-gd65816dc766/integrations/d2b1e7e9-7fc8-4a4a-de61-da23d7825404"
                    },
                    "environment": {
                        "href": "https://example.com/v1/environments/020ed26b-ae15-5283-8fb3-gd65816dc766"
                    },
                    "versions": {
                        "href": "https://example.com/v1/environments/020ed26b-ae15-5283-8fb3-gd65816dc766/integrations/d2b1e7e9-7fc8-4a4a-de61-da23d7825404/versions"
                    }
                },
                "_embedded": {
                    "versions": []
                },
                "id": "d2b1e7e9-7fc8-4a4a-de61-da23d7825404",
                "name": "PingFederate PingID SDK Connector",
                "thirdParty": {
                    "companyName": "Ping Identity"
                },
                "publisher": "Ping Identity",
                "tags": [
                    "PROVISIONING",
                    "MFA"
                ],
                "pingProductNames": [
                    "PINGFEDERATE"
                ],
                "marketingLandingPageUrl": "https://support.pingidentity.com/s/marketplace-integration/a7i1W000000Cfn5QAC/pingid-sdk-integration-kit",
                "createdAt": "2021-01-22T00:53:10.335Z"
            },
            {
                "_links": {
                    "self": {
                        "href": "https://example.com/v1/environments/020ed26b-ae15-5283-8fb3-gd65816dc766/integrations/663ab657-3920-40df-9fb8-b6ccd12c5726"
                    },
                    "environment": {
                        "href": "https://example.com/v1/environments/020ed26b-ae15-5283-8fb3-gd65816dc766"
                    },
                    "versions": {
                        "href": "https://example.com/v1/environments/020ed26b-ae15-5283-8fb3-gd65816dc766/integrations/663ab657-3920-40df-9fb8-b6ccd12c5726/versions"
                    }
                },
                "_embedded": {
                    "versions": [
                        {
                            "id": "6b816117-6989-4928-b270-4a0e7d6a43cb",
                            "name": "PingID SDK Integration Kits",
                            "description": "PingID SDK is a mobile SDK for support of PingID multifactor authentication for customer use cases, on organizations' own mobile applications.",
                            "integration": {
                                "id": "663ab657-3920-40df-9fb8-b6ccd12c5726"
                            },
                            "type": "PRODUCT_INTEGRATION_KIT",
                            "number": "1.1",
                            "releasedOn": "2021-01-11",
                            "integratedWith": {
                                "name": "PINGFEDERATE",
                                "minVersion": "9.0"
                            },
                            "documentationUrl": "https://docs.pingidentity.com/bundle/integrations/page/zyw1565632179137.html"
                        }
                    ]
                },
                "id": "663ab657-3920-40df-9fb8-b6ccd12c5726",
                "name": "PingFederate PingID SDK Integration Kit",
                "thirdParty": {
                    "companyName": "Ping Identity"
                },
                "publisher": "Ping Identity",
                "tags": [
                    "PROVISIONING",
                    "MFA"
                ],
                "pingProductNames": [
                    "PINGFEDERATE"
                ],
                "marketingLandingPageUrl": "https://support.pingidentity.com/s/marketplace-integration/a7i1W000000Cfn5QAC/pingid-sdk-integration-kit",
                "createdAt": "2021-01-22T00:52:33.713Z"
            }
        ]
    },
    "size": 4
}