Read Promotion Steps
GET {{apiPath}}/environments/{{envID}}/promotions/{{promotionID}}/promotionSteps
Use the GET {{apiPath}}/environments/{{envID}}/promotions/{{promotionID}}/promotionSteps request to return the operations used for a promotion plan, including the payload for each operation. Refer to Read One Promotion to get information about the promotion.
The process of promoting a resource or resources from a source environment to a target environment involves calling PingOne APIs to perform the operations in the target environment. These are the promotion steps returned.
Pagination is supported for response using the limit and cursor query parameters.
Query parameters
| Parameter | Description |
|---|---|
|
Indicates the number of steps to be returned per page. |
|
Indicates the first item to retrieve. |
Example Request
-
cURL
-
C#
-
Go
-
HTTP
-
Java
-
jQuery
-
NodeJS
-
Python
-
PHP
-
Ruby
-
Swift
curl --location --globoff '{{apiPath}}/environments/{{envID}}/promotions/{{promotionID}}/promotionSteps' \
--header 'Authorization: Bearer {{accessToken}}'
var options = new RestClientOptions("{{apiPath}}/environments/{{envID}}/promotions/{{promotionID}}/promotionSteps")
{
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}}/promotionSteps"
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}}/promotionSteps 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}}/promotionSteps")
.method("GET", body)
.addHeader("Authorization", "Bearer {{accessToken}}")
.build();
Response response = client.newCall(request).execute();
var settings = {
"url": "{{apiPath}}/environments/{{envID}}/promotions/{{promotionID}}/promotionSteps",
"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}}/promotionSteps',
'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}}/promotionSteps"
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}}/promotionSteps');
$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}}/promotionSteps")
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}}/promotionSteps")!,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/promotionSteps?limit=25"
}
},
"_embedded": {
"promotionSteps": [
{
"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"
},
"payload": {
"id": "cd502ee4-176a-438a-a947-a4d8cffb0fdb",
"environment": {
"id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
},
"name": "Same Day Policy",
"description": "A policy that must be updated within one day.",
"excludesProfileData": true,
"notSimilarToCurrent": true,
"excludesCommonlyUsed": true,
"minComplexity": 7,
"maxAgeDays": 182,
"history": {
"count": 8,
"retentionDays": 365
},
"lockout": {
"failureCount": 3,
"durationSeconds": 900
},
"populationCount": 8,
"default": false
},
"totalDistance": 100
},
{
"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"
},
"payload": {
"environment": {
"id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
},
"id": "f0c75a0b-859e-433d-9edc-07a7c847e185",
"template": "default",
"default": true,
"configuration": {
"logoType": "IMAGE",
"logo": {
"href": "https://d3uinntk0mqu3p.cloudfront.net/branding/market/a3d073bc-3108-49ad-b96c-404bea59a1d0.png",
"id": "00000000-0000-0000-0000-000000000000"
},
"backgroundType": "DEFAULT",
"bodyTextColor": "#686f77",
"cardColor": "#ffffff",
"headingTextColor": "#686f77",
"linkTextColor": "#2996cc",
"buttonColor": "#2996cc",
"buttonTextColor": "#ffffff",
"name": "Ping Default",
"backgroundOutlineColor": "#2996cc",
"foregroundMainColor": "#2996cc",
"foregroundHighlightColor": "#2996cc"
},
"modified": "2025-07-03T16:40:16.242Z"
},
"totalDistance": 9.45578231292517
},
{
"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"
},
"payload": {
"id": "27091971-0a42-4f67-95d1-d617fc2a16e5",
"environment": {
"id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
},
"name": "NA Eng Austin",
"description": "NA Engineering",
"userCount": 2,
"passwordPolicy": {
"id": "cd502ee4-176a-438a-a947-a4d8cffb0fdb"
},
"preferredLanguage": "en",
"theme": {
"id": "f0c75a0b-859e-433d-9edc-07a7c847e185"
},
"default": false
},
"totalDistance": 25
}
]
},
"count": 3,
"size": 3
}