curl --request PUT \
--url https://api.lumos.com/v1/apps/{app_uuid}/approval-workflow \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflow_id": "5e6f7081-9203-1234-ef01-345678901234"
}
'import requests
url = "https://api.lumos.com/v1/apps/{app_uuid}/approval-workflow"
payload = { "workflow_id": "5e6f7081-9203-1234-ef01-345678901234" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({workflow_id: '5e6f7081-9203-1234-ef01-345678901234'})
};
fetch('https://api.lumos.com/v1/apps/{app_uuid}/approval-workflow', 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.lumos.com/v1/apps/{app_uuid}/approval-workflow",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'workflow_id' => '5e6f7081-9203-1234-ef01-345678901234'
]),
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.lumos.com/v1/apps/{app_uuid}/approval-workflow"
payload := strings.NewReader("{\n \"workflow_id\": \"5e6f7081-9203-1234-ef01-345678901234\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.lumos.com/v1/apps/{app_uuid}/approval-workflow")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflow_id\": \"5e6f7081-9203-1234-ef01-345678901234\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lumos.com/v1/apps/{app_uuid}/approval-workflow")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflow_id\": \"5e6f7081-9203-1234-ef01-345678901234\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"type": "approval",
"steps": [
{
"step": "<string>",
"inputs": {},
"name": "<string>"
}
],
"name": "<string>",
"description": "<string>",
"app_id": "<string>"
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}Set App Approval Workflow
Bind an approval workflow to this app, replacing whatever was bound before.
The workflow must already exist and belong to your organization, or the request returns 404. A workflow that is not an access-request approval workflow returns 422 workflow.type_mismatch. It also has to be a usable template: its assignees must resolve inside your organization, or the request returns 400.
A workflow that belongs to another app, or is bound to another app or entitlement, returns 409 workflow.bind_conflict, as does one deleted while the request ran. A refused request changes nothing.
curl --request PUT \
--url https://api.lumos.com/v1/apps/{app_uuid}/approval-workflow \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflow_id": "5e6f7081-9203-1234-ef01-345678901234"
}
'import requests
url = "https://api.lumos.com/v1/apps/{app_uuid}/approval-workflow"
payload = { "workflow_id": "5e6f7081-9203-1234-ef01-345678901234" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({workflow_id: '5e6f7081-9203-1234-ef01-345678901234'})
};
fetch('https://api.lumos.com/v1/apps/{app_uuid}/approval-workflow', 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.lumos.com/v1/apps/{app_uuid}/approval-workflow",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'workflow_id' => '5e6f7081-9203-1234-ef01-345678901234'
]),
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.lumos.com/v1/apps/{app_uuid}/approval-workflow"
payload := strings.NewReader("{\n \"workflow_id\": \"5e6f7081-9203-1234-ef01-345678901234\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.lumos.com/v1/apps/{app_uuid}/approval-workflow")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflow_id\": \"5e6f7081-9203-1234-ef01-345678901234\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lumos.com/v1/apps/{app_uuid}/approval-workflow")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflow_id\": \"5e6f7081-9203-1234-ef01-345678901234\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"type": "approval",
"steps": [
{
"step": "<string>",
"inputs": {},
"name": "<string>"
}
],
"name": "<string>",
"description": "<string>",
"app_id": "<string>"
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"detail": "<string>",
"type": "validation",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The app's ID, which GET /v1/apps returns as id.
Body
Request body to bind a workflow to an app or entitlement.
UUID of the workflow to associate.
Response
Successful Response
Response shape for a Workflow.
A UUID identifying this Workflow.
The kind of workflow.
approval, approval-chain, entitlement-provisioning, entitlement-deprovisioning, account-provisioning, account-deprovisioning The ordered steps of the workflow.
Show child attributes
Show child attributes
A name for this Workflow.
A description of this Workflow.
UUID of the app this Workflow belongs to, if associated.
Was this page helpful?