curl --request POST \
--url https://api.flowforma.com/v1/environmentRequests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"Title": "New Sandbox for Finance",
"EnvironmentType": "Sandbox",
"SecurityTemplateID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"Rationale": "Pilot environment for the finance team"
}
'import requests
url = "https://api.flowforma.com/v1/environmentRequests"
payload = {
"Title": "New Sandbox for Finance",
"EnvironmentType": "Sandbox",
"SecurityTemplateID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"Rationale": "Pilot environment for the finance team"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
Title: 'New Sandbox for Finance',
EnvironmentType: 'Sandbox',
SecurityTemplateID: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
Rationale: 'Pilot environment for the finance team'
})
};
fetch('https://api.flowforma.com/v1/environmentRequests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flowforma.com/v1/environmentRequests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Title' => 'New Sandbox for Finance',
'EnvironmentType' => 'Sandbox',
'SecurityTemplateID' => '3fa85f64-5717-4562-b3fc-2c963f66afa6',
'Rationale' => 'Pilot environment for the finance team'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flowforma.com/v1/environmentRequests"
payload := strings.NewReader("{\n \"Title\": \"New Sandbox for Finance\",\n \"EnvironmentType\": \"Sandbox\",\n \"SecurityTemplateID\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"Rationale\": \"Pilot environment for the finance team\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flowforma.com/v1/environmentRequests")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"Title\": \"New Sandbox for Finance\",\n \"EnvironmentType\": \"Sandbox\",\n \"SecurityTemplateID\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"Rationale\": \"Pilot environment for the finance team\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flowforma.com/v1/environmentRequests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"Title\": \"New Sandbox for Finance\",\n \"EnvironmentType\": \"Sandbox\",\n \"SecurityTemplateID\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"Rationale\": \"Pilot environment for the finance team\"\n}"
response = http.request(request)
puts response.read_body{
"RequestID": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Title": "<string>",
"EnvironmentType": "Sandbox",
"RequestStatus": "AwaitingApproval",
"SecurityTemplateID": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"AdminUsersStr": "<string>",
"GenericUsersStr": "<string>",
"PrintViewersStr": "<string>",
"SiteCollection": "<string>",
"Site": "<string>",
"NewSiteUrl": "<string>",
"URL": "<string>",
"AppInstanceID": "<string>",
"Rationale": "<string>",
"Author": "<string>",
"Created": "2023-11-07T05:31:56Z"
}{
"code": "400",
"message": "Page does not exist."
}{
"code": "400",
"message": "Page does not exist."
}{
"code": "400",
"message": "Page does not exist."
}Create an environment request
Creates a new environment request. You must supply either a SecurityTemplateID or both AdminUsersStr and GenericUsersStr. The request is created with status AwaitingApproval. Title is limited to 50 characters.
curl --request POST \
--url https://api.flowforma.com/v1/environmentRequests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"Title": "New Sandbox for Finance",
"EnvironmentType": "Sandbox",
"SecurityTemplateID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"Rationale": "Pilot environment for the finance team"
}
'import requests
url = "https://api.flowforma.com/v1/environmentRequests"
payload = {
"Title": "New Sandbox for Finance",
"EnvironmentType": "Sandbox",
"SecurityTemplateID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"Rationale": "Pilot environment for the finance team"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
Title: 'New Sandbox for Finance',
EnvironmentType: 'Sandbox',
SecurityTemplateID: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
Rationale: 'Pilot environment for the finance team'
})
};
fetch('https://api.flowforma.com/v1/environmentRequests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flowforma.com/v1/environmentRequests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Title' => 'New Sandbox for Finance',
'EnvironmentType' => 'Sandbox',
'SecurityTemplateID' => '3fa85f64-5717-4562-b3fc-2c963f66afa6',
'Rationale' => 'Pilot environment for the finance team'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flowforma.com/v1/environmentRequests"
payload := strings.NewReader("{\n \"Title\": \"New Sandbox for Finance\",\n \"EnvironmentType\": \"Sandbox\",\n \"SecurityTemplateID\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"Rationale\": \"Pilot environment for the finance team\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flowforma.com/v1/environmentRequests")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"Title\": \"New Sandbox for Finance\",\n \"EnvironmentType\": \"Sandbox\",\n \"SecurityTemplateID\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"Rationale\": \"Pilot environment for the finance team\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flowforma.com/v1/environmentRequests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"Title\": \"New Sandbox for Finance\",\n \"EnvironmentType\": \"Sandbox\",\n \"SecurityTemplateID\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"Rationale\": \"Pilot environment for the finance team\"\n}"
response = http.request(request)
puts response.read_body{
"RequestID": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Title": "<string>",
"EnvironmentType": "Sandbox",
"RequestStatus": "AwaitingApproval",
"SecurityTemplateID": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"AdminUsersStr": "<string>",
"GenericUsersStr": "<string>",
"PrintViewersStr": "<string>",
"SiteCollection": "<string>",
"Site": "<string>",
"NewSiteUrl": "<string>",
"URL": "<string>",
"AppInstanceID": "<string>",
"Rationale": "<string>",
"Author": "<string>",
"Created": "2023-11-07T05:31:56Z"
}{
"code": "400",
"message": "Page does not exist."
}{
"code": "400",
"message": "Page does not exist."
}{
"code": "400",
"message": "Page does not exist."
}Authorizations
Azure AD app-only access token. Obtain it from GET /v1/oauthToken and send it as the Authorization: Bearer {token} header.
Body
Supply either a SecurityTemplateID or both AdminUsersStr and GenericUsersStr.
Request title (max 50 characters).
Environment type.
Sandbox, UAT, Production, NA ID of an existing security template.
Semicolon-separated admin users. Required if no security template is supplied.
Semicolon-separated generic users. Required if no security template is supplied.
Semicolon-separated print viewers.
Reason for the request (max 50 characters).
Response
Successful operation
Environment type.
Sandbox, UAT, Production, NA Request lifecycle status.
AwaitingApproval, Accepted, NotAccepted, Processing, Completed, Failed 
