Read One Promotion
GET {{apiPath}}/environments/{{envID}}/promotions/{{promotionID}}
Use the GET {{apiPath}}/environments/{{envID}}/promotions/{{promotionID}} request to return the details for the specified promotion. Included in the response is the automatically generated promotion plan for the promotion. The promotion plan returned is a collection of promotion operations, though without the payload for each operation. The promotion plan either remains to be executed, or has already been executed if the promotion is completed.
Refer to Read Promotion Steps to get the promotion plan operations including the payload for each operation.
Example Request
-
cURL
-
C#
-
Go
-
HTTP
-
Java
-
jQuery
-
NodeJS
-
Python
-
PHP
-
Ruby
-
Swift
curl --location --globoff '{{apiPath}}/environments/{{envID}}/promotions/{{promotionID}}' \
--header 'Authorization: Bearer {{accessToken}}'
var options = new RestClientOptions("{{apiPath}}/environments/{{envID}}/promotions/{{promotionID}}")
{
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}}/promotions/{{promotionID}}"
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}}/promotions/{{promotionID}} 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}}/promotions/{{promotionID}}")
.method("GET", body)
.addHeader("Authorization", "Bearer {{accessToken}}")
.build();
Response response = client.newCall(request).execute();
var settings = {
"url": "{{apiPath}}/environments/{{envID}}/promotions/{{promotionID}}",
"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}}/promotions/{{promotionID}}',
'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}}/promotions/{{promotionID}}"
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}}/promotions/{{promotionID}}');
$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}}/promotions/{{promotionID}}")
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}}/promotions/{{promotionID}}")!,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/promotions/461a33b0-f041-44b0-92ff-e59402c1c2ac"
},
"environment": {
"href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
},
"targetEnvironment": {
"href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
},
"sourceSnapshot": {
"href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/snapshots/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/versions/04776ecf-9f38-40e5-a833-514f0c86fb23"
},
"targetSnapshot": {
"href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/snapshots/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/versions/a9009a41-80f0-497b-a194-338deded5d1c"
},
"promotionSteps": {
"href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/promotions/461a33b0-f041-44b0-92ff-e59402c1c2ac/promotionSteps"
}
},
"id": "461a33b0-f041-44b0-92ff-e59402c1c2ac",
"createdAt": "2025-07-04T15:51:36.883Z",
"updatedAt": "2025-07-04T15:51:36.883Z",
"sourceEnvironmentId": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6",
"targetEnvironmentId": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6",
"sourceSnapshotId": "04776ecf-9f38-40e5-a833-514f0c86fb23",
"targetSnapshotId": "a9009a41-80f0-497b-a194-338deded5d1c",
"status": "READY",
"selectedResources": [
"26a126c2-054f-4f18-b077-8226c0c4bf3e"
],
"excludedResources": [
"363ef235-f6fe-4bc7-ae3d-63217482f57f"
],
"resourceMapping": {
"5ab94557-59c3-4afc-bbf6-046444bd04b8": "f0c75a0b-859e-433d-9edc-07a7c847e185",
"26a126c2-054f-4f18-b077-8226c0c4bf3e": "27091971-0a42-4f67-95d1-d617fc2a16e5",
"2c3b1245-2c38-4174-97fa-069d88a543b1": "c7c92d16-e07b-4ddb-8d17-073fea3a219c"
},
"promotionPlan": {
"steps": [
{
"action": "POST",
"resourceUrl": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/passwordPolicies/",
"sourceResource": {
"name": "Same Day Policy",
"id": "cd502ee4-176a-438a-a947-a4d8cffb0fdb"
}
},
{
"action": "PUT",
"resourceUrl": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/themes/f0c75a0b-859e-433d-9edc-07a7c847e185",
"sourceResource": {
"name": "themes:5ab94557-59c3-4afc-bbf6-046444bd04b8",
"id": "5ab94557-59c3-4afc-bbf6-046444bd04b8"
},
"targetResource": {
"name": "themes:f0c75a0b-859e-433d-9edc-07a7c847e185",
"id": "f0c75a0b-859e-433d-9edc-07a7c847e185"
}
},
{
"action": "PUT",
"resourceUrl": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/populations/27091971-0a42-4f67-95d1-d617fc2a16e5",
"sourceResource": {
"name": "NA Eng Austin",
"id": "26a126c2-054f-4f18-b077-8226c0c4bf3e"
},
"targetResource": {
"name": "NA Eng Austin",
"id": "27091971-0a42-4f67-95d1-d617fc2a16e5"
}
}
]
},
"description": "Test promotion of population"
}