curl --request POST \
--url https://api.getprimo.com/saas-selection-intents/{intentId}/execute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"apps": [
{
"saasId": "<string>",
"groups": [
{
"name": "<string>",
"id": "<string>"
}
],
"roles": [
{
"name": "<string>",
"id": "<string>"
}
],
"licenses": [
{
"name": "<string>",
"id": "<string>"
}
],
"organizationUnits": [
{
"name": "<string>",
"id": "<string>"
}
],
"credentialsRecipient": {
"email": "jsmith@example.com"
}
}
],
"scheduleDate": "2023-11-07T05:31:56Z",
"personalEmail": "jsmith@example.com"
}
'import requests
url = "https://api.getprimo.com/saas-selection-intents/{intentId}/execute"
payload = {
"apps": [
{
"saasId": "<string>",
"groups": [
{
"name": "<string>",
"id": "<string>"
}
],
"roles": [
{
"name": "<string>",
"id": "<string>"
}
],
"licenses": [
{
"name": "<string>",
"id": "<string>"
}
],
"organizationUnits": [
{
"name": "<string>",
"id": "<string>"
}
],
"credentialsRecipient": { "email": "jsmith@example.com" }
}
],
"scheduleDate": "2023-11-07T05:31:56Z",
"personalEmail": "jsmith@example.com"
}
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({
apps: [
{
saasId: '<string>',
groups: [{name: '<string>', id: '<string>'}],
roles: [{name: '<string>', id: '<string>'}],
licenses: [{name: '<string>', id: '<string>'}],
organizationUnits: [{name: '<string>', id: '<string>'}],
credentialsRecipient: {email: 'jsmith@example.com'}
}
],
scheduleDate: '2023-11-07T05:31:56Z',
personalEmail: 'jsmith@example.com'
})
};
fetch('https://api.getprimo.com/saas-selection-intents/{intentId}/execute', 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.getprimo.com/saas-selection-intents/{intentId}/execute",
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([
'apps' => [
[
'saasId' => '<string>',
'groups' => [
[
'name' => '<string>',
'id' => '<string>'
]
],
'roles' => [
[
'name' => '<string>',
'id' => '<string>'
]
],
'licenses' => [
[
'name' => '<string>',
'id' => '<string>'
]
],
'organizationUnits' => [
[
'name' => '<string>',
'id' => '<string>'
]
],
'credentialsRecipient' => [
'email' => 'jsmith@example.com'
]
]
],
'scheduleDate' => '2023-11-07T05:31:56Z',
'personalEmail' => 'jsmith@example.com'
]),
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.getprimo.com/saas-selection-intents/{intentId}/execute"
payload := strings.NewReader("{\n \"apps\": [\n {\n \"saasId\": \"<string>\",\n \"groups\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"roles\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"licenses\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"organizationUnits\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"credentialsRecipient\": {\n \"email\": \"jsmith@example.com\"\n }\n }\n ],\n \"scheduleDate\": \"2023-11-07T05:31:56Z\",\n \"personalEmail\": \"jsmith@example.com\"\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.getprimo.com/saas-selection-intents/{intentId}/execute")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"apps\": [\n {\n \"saasId\": \"<string>\",\n \"groups\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"roles\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"licenses\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"organizationUnits\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"credentialsRecipient\": {\n \"email\": \"jsmith@example.com\"\n }\n }\n ],\n \"scheduleDate\": \"2023-11-07T05:31:56Z\",\n \"personalEmail\": \"jsmith@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getprimo.com/saas-selection-intents/{intentId}/execute")
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 \"apps\": [\n {\n \"saasId\": \"<string>\",\n \"groups\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"roles\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"licenses\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"organizationUnits\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"credentialsRecipient\": {\n \"email\": \"jsmith@example.com\"\n }\n }\n ],\n \"scheduleDate\": \"2023-11-07T05:31:56Z\",\n \"personalEmail\": \"jsmith@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"outcome": "EXECUTED",
"intent": {
"id": "<string>",
"taskId": "<string>",
"ticketId": "<string>",
"employeeId": "<string>",
"proposedApps": [
{
"saasId": "<string>",
"groups": [
{
"id": "<string>",
"name": "<string>"
}
],
"roles": [
{
"id": "<string>",
"name": "<string>"
}
],
"licenses": [
{
"id": "<string>",
"name": "<string>"
}
],
"organizationUnits": [
{
"id": "<string>",
"name": "<string>"
}
],
"credentialsRecipient": {
"type": "ADMIN",
"email": "<string>"
}
}
],
"executedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Execute a SaaS selection intent
Validate the SaaS selection of an onboarding: opens one SAAS_PROVISIONING task per app in apps under the onboarding ticket, started now or SCHEDULED until scheduleDate, then completes the “Configure SaaS provisioning” task (type SAAS_SELECTION). This is the only way to complete a SAAS_SELECTION task: updateTaskStatus refuses it with TaskLockedByTypeError naming this operation. Start apps from proposedApps of getSaasSelectionIntent, taking each saasId from there or from getSaas: a saasId that is not a SaaS of the company, an app the onboarding ticket already has an account task for, the email provider and an app that creates its accounts at first login get no task, without a refusal; an empty apps opens none. To add one app to an onboarding without this task, use createSaasProvisioningIntent. Safe to retry: a selection validated earlier answers outcome: ALREADY_EXECUTED and opens nothing again. A personalEmail another employee already holds is not saved. Refused with INVALID_SAAS_SELECTION (a saasId that is not an id, or a recipient without an email), TICKET_CLOSED (the task was cancelled), EXECUTION_IN_PROGRESS, INTENT_NOT_FOUND.
curl --request POST \
--url https://api.getprimo.com/saas-selection-intents/{intentId}/execute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"apps": [
{
"saasId": "<string>",
"groups": [
{
"name": "<string>",
"id": "<string>"
}
],
"roles": [
{
"name": "<string>",
"id": "<string>"
}
],
"licenses": [
{
"name": "<string>",
"id": "<string>"
}
],
"organizationUnits": [
{
"name": "<string>",
"id": "<string>"
}
],
"credentialsRecipient": {
"email": "jsmith@example.com"
}
}
],
"scheduleDate": "2023-11-07T05:31:56Z",
"personalEmail": "jsmith@example.com"
}
'import requests
url = "https://api.getprimo.com/saas-selection-intents/{intentId}/execute"
payload = {
"apps": [
{
"saasId": "<string>",
"groups": [
{
"name": "<string>",
"id": "<string>"
}
],
"roles": [
{
"name": "<string>",
"id": "<string>"
}
],
"licenses": [
{
"name": "<string>",
"id": "<string>"
}
],
"organizationUnits": [
{
"name": "<string>",
"id": "<string>"
}
],
"credentialsRecipient": { "email": "jsmith@example.com" }
}
],
"scheduleDate": "2023-11-07T05:31:56Z",
"personalEmail": "jsmith@example.com"
}
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({
apps: [
{
saasId: '<string>',
groups: [{name: '<string>', id: '<string>'}],
roles: [{name: '<string>', id: '<string>'}],
licenses: [{name: '<string>', id: '<string>'}],
organizationUnits: [{name: '<string>', id: '<string>'}],
credentialsRecipient: {email: 'jsmith@example.com'}
}
],
scheduleDate: '2023-11-07T05:31:56Z',
personalEmail: 'jsmith@example.com'
})
};
fetch('https://api.getprimo.com/saas-selection-intents/{intentId}/execute', 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.getprimo.com/saas-selection-intents/{intentId}/execute",
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([
'apps' => [
[
'saasId' => '<string>',
'groups' => [
[
'name' => '<string>',
'id' => '<string>'
]
],
'roles' => [
[
'name' => '<string>',
'id' => '<string>'
]
],
'licenses' => [
[
'name' => '<string>',
'id' => '<string>'
]
],
'organizationUnits' => [
[
'name' => '<string>',
'id' => '<string>'
]
],
'credentialsRecipient' => [
'email' => 'jsmith@example.com'
]
]
],
'scheduleDate' => '2023-11-07T05:31:56Z',
'personalEmail' => 'jsmith@example.com'
]),
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.getprimo.com/saas-selection-intents/{intentId}/execute"
payload := strings.NewReader("{\n \"apps\": [\n {\n \"saasId\": \"<string>\",\n \"groups\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"roles\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"licenses\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"organizationUnits\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"credentialsRecipient\": {\n \"email\": \"jsmith@example.com\"\n }\n }\n ],\n \"scheduleDate\": \"2023-11-07T05:31:56Z\",\n \"personalEmail\": \"jsmith@example.com\"\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.getprimo.com/saas-selection-intents/{intentId}/execute")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"apps\": [\n {\n \"saasId\": \"<string>\",\n \"groups\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"roles\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"licenses\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"organizationUnits\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"credentialsRecipient\": {\n \"email\": \"jsmith@example.com\"\n }\n }\n ],\n \"scheduleDate\": \"2023-11-07T05:31:56Z\",\n \"personalEmail\": \"jsmith@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getprimo.com/saas-selection-intents/{intentId}/execute")
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 \"apps\": [\n {\n \"saasId\": \"<string>\",\n \"groups\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"roles\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"licenses\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"organizationUnits\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"credentialsRecipient\": {\n \"email\": \"jsmith@example.com\"\n }\n }\n ],\n \"scheduleDate\": \"2023-11-07T05:31:56Z\",\n \"personalEmail\": \"jsmith@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"outcome": "EXECUTED",
"intent": {
"id": "<string>",
"taskId": "<string>",
"ticketId": "<string>",
"employeeId": "<string>",
"proposedApps": [
{
"saasId": "<string>",
"groups": [
{
"id": "<string>",
"name": "<string>"
}
],
"roles": [
{
"id": "<string>",
"name": "<string>"
}
],
"licenses": [
{
"id": "<string>",
"name": "<string>"
}
],
"organizationUnits": [
{
"id": "<string>",
"name": "<string>"
}
],
"credentialsRecipient": {
"type": "ADMIN",
"email": "<string>"
}
}
],
"executedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Authorizations
Use your Primo API key in the Authorization header as Bearer <API_KEY>.
Path Parameters
Body
The applications to open an account task for — start from proposedApps of getSaasSelectionIntent, then drop, add or adjust. An empty list opens none and completes the task.
Show child attributes
Show child attributes
Creates each account task SCHEDULED until this date when it is in the future; without it they start now.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$The employee's personal address, saved on the employee before the account tasks open.
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$