Read All Credential Type Versions
GET {{apiPath}}/environments/{{envID}}/credentialTypes/{{credentialTypeID}}/versions
Use the GET {{apiPath}}/environments/{{envID}}/credentialTypes/{{credentialTypeID}}/versions operation to return all of the versions of a specified type of credentials available for issuance. A credential type corresponds to a card type presented by the compatible wallet app.
The request accepts a SCIM filter expression for the version property (equates to version.number in the Credential Types data model) to retrieve a subset of all versions. Comparison is numeric. The filter supports the SCIM attribute operator: eq (equal). Other attribute operators and logical operators are not supported.
The first example response is from a request that had no filter. The second example response is from a request that had the filter in the top row of the Example filters table.
Example Request
-
cURL
-
C#
-
Go
-
HTTP
-
Java
-
jQuery
-
NodeJS
-
Python
-
PHP
-
Ruby
-
Swift
curl --location --globoff '{{apiPath}}/environments/{{envID}}/credentialTypes/{{credentialTypeID}}/versions' \
--header 'Authorization: Bearer {{accessToken}}'
var options = new RestClientOptions("{{apiPath}}/environments/{{envID}}/credentialTypes/{{credentialTypeID}}/versions")
{
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}}/credentialTypes/{{credentialTypeID}}/versions"
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}}/credentialTypes/{{credentialTypeID}}/versions 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}}/credentialTypes/{{credentialTypeID}}/versions")
.method("GET", body)
.addHeader("Authorization", "Bearer {{accessToken}}")
.build();
Response response = client.newCall(request).execute();
var settings = {
"url": "{{apiPath}}/environments/{{envID}}/credentialTypes/{{credentialTypeID}}/versions",
"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}}/credentialTypes/{{credentialTypeID}}/versions',
'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}}/credentialTypes/{{credentialTypeID}}/versions"
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}}/credentialTypes/{{credentialTypeID}}/versions');
$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}}/credentialTypes/{{credentialTypeID}}/versions")
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}}/credentialTypes/{{credentialTypeID}}/versions")!,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/credentialTypes/10acdfe3-f0e9-42f3-b64b-fc2bed22fe7b/versions"
}
},
"_embedded": {
"versions": [
{
"_links": {
"self": {
"href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/credentialTypes/10acdfe3-f0e9-42f3-b64b-fc2bed22fe7b/versions/ea3f5903-75ca-4280-91e8-a53811d7a282"
}
},
"environment": {
"id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
},
"credentialType": {
"id": "10acdfe3-f0e9-42f3-b64b-fc2bed22fe7b"
},
"version": 1,
"snapshot": {
"id": "10acdfe3-f0e9-42f3-b64b-fc2bed22fe7b",
"createdAt": "2025-05-12T19:44:02.569594941Z",
"updatedAt": "2025-05-12T19:44:02.569594941Z",
"environment": {
"id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
},
"issuer": {
"id": "913c21bb-0570-426b-97c4-e4d56e8861a5"
},
"management": {
"mode": "AUTOMATED"
},
"title": "Wallet Developers",
"description": "PingOne Credentials",
"cardType": "Driver License",
"uri": "https://api.pingone.com/v1/distributedid/credentialTypes/10acdfe3-f0e9-42f3-b64b-fc2bed22fe7b",
"version": {
"number": 1,
"uri": "https://api.pingone.com/v1/distributedid/credentialTypes/10acdfe3-f0e9-42f3-b64b-fc2bed22fe7b/v1",
"id": "ea3f5903-75ca-4280-91e8-a53811d7a282"
},
"onDelete": {
"revokeIssuedCredentials": true
},
"expiration": {
"type": "HARD",
"after": {
"duration": 1826,
"timeUnit": "DAYS"
}
}
},
"id": "ea3f5903-75ca-4280-91e8-a53811d7a282",
"createdAt": "2025-05-12T19:44:02.569Z"
}
]
},
"size": 1
}
Example Response
200 OK
{
"_links": {
"self": {
"href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/credentialTypes/2affa99d-c69e-42cf-b0f3-5c8a6f923043/versions"
}
},
"_embedded": {
"versions": [
{
"_links": {
"self": {
"href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/credentialTypes/2affa99d-c69e-42cf-b0f3-5c8a6f923043/versions/6ab13f62-d452-4772-891e-641d3edb3aa6"
}
},
"environment": {
"id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
},
"credentialType": {
"id": "2affa99d-c69e-42cf-b0f3-5c8a6f923043"
},
"version": 2,
"snapshot": {
"environment": {
"id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
},
"issuer": {
"id": "824c722c-254a-4b2d-9b50-17e2abdf5f8a"
},
"title": "Wallet Developers",
"description": "PingOne Credentials",
"cardType": "Driver License",
"uri": "https://api.pingone.com/v1/distributedid/credentialTypes/2affa99d-c69e-42cf-b0f3-5c8a6f923043",
"version": {
"number": 2,
"uri": "https://api.pingone.com/v1/distributedid/credentialTypes/2affa99d-c69e-42cf-b0f3-5c8a6f923043/v2",
"id": "ea3f5903-75ca-4280-91e8-a53811d7a282"
},
"id": "2affa99d-c69e-42cf-b0f3-5c8a6f923043",
"createdAt": "2023-06-01T18:17:36.386Z",
"updatedAt": "2023-07-13T12:52:22.133Z"
},
"id": "6ab13f62-d452-4772-891e-641d3edb3aa6",
"createdAt": "2023-07-13T12:52:22.133Z"
}
]
},
"size": 1
}