Api session event editor stakeholder select stakeholder: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
Created page with "API Event to Select Stakeholder with preferred ID, when not available fallback to next best. {|class=wikitable !Name !Importance !Type !Description !Values |- |0 |REQUIRED |(Integer number) |Preferred Stakeholder ID or empty | |- |1 |REQUIRED |(String) |Client Token (from Join Session event) | |} ===Response Codes=== {|class=wikitable !Response Code: !Description |- |200 |Integer (Selected Stakeholder ID) |- |300-600 |Codes Overview |} ===Example POST=== Example..."
 
No edit summary
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
API Event to Select [[Stakeholder]] with preferred ID, when not available fallback to next best.
API Endpoint: api/session/event/editorstakeholder/select_stakeholder/
 
Description: Select [[Stakeholder]] using the preferred ID; if unavailable, fall back to the next best option.
 
{|class=wikitable
{|class=wikitable
!Name
!Index
!Importance
!Importance
!Type
!Type
Line 7: Line 10:
!Values
!Values
|-
|-
|0
| 0
|REQUIRED
| REQUIRED
|(Integer number)
| (Integer number)
|Preferred [[Stakeholder]] ID or empty
| Preferred [[Stakeholder]] ID or empty
|
|  
|-
|-
|1
| 1
|REQUIRED
| REQUIRED
|(String)
| (String)
|Client Token (from Join Session event)
| Client Token (from Join [[Session]] event)
|
|  
|}
|}
===Response Codes===
===Response Codes===
Line 24: Line 27:
!Description
!Description
|-
|-
|200
| 200
|Integer (Selected Stakeholder ID)
| Integer (Selected Stakeholder ID)
|-
|-
|300-600
| 300-600
|Codes Overview
| Codes Overview
|}
|}
===Example POST===
===Example POST===
Example POST: https://engine.tygron.com/api/session/event/editorstakeholder/select_stakeholder/?f=HTML&token=API_TOKEN
Curl example POST
 
<syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/event/editorstakeholder/select_stakeholder/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, "Client Token" ]'
with content:  
</syntaxhighlight>
<pre>[ 85, "Client Token" ]
JavaScript example POST
</pre>
<syntaxhighlight lang="text" copy>var options = {
{{article end|seealso=*[[api session event editor stakeholder]]}}
 method: "POST",
 headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
 body: '[ 1, "Client Token" ]'
};
fetch("https://engine.tygron.com/api/session/event/editorstakeholder/select_stakeholder/", options)
 .then(response => response.text())
 .then(result => console.log(result))
 .catch(error => console.log('error', error));
</syntaxhighlight>
{{article end|seealso=*[[Api session event editor stakeholder]]
*[[Api session items stakeholders]]
}}


[[Category:API]]
[[Category:API]]

Latest revision as of 10:00, 13 July 2026

API Endpoint: api/session/event/editorstakeholder/select_stakeholder/

Description: Select Stakeholder using the preferred ID; if unavailable, fall back to the next best option.

Index Importance Type Description Values
0 REQUIRED (Integer number) Preferred Stakeholder ID or empty
1 REQUIRED (String) Client Token (from Join Session event)

Response Codes

Response Code: Description
200 Integer (Selected Stakeholder ID)
300-600 Codes Overview

Example POST

Curl example POST

curl 'https://engine.tygron.com/api/session/event/editorstakeholder/select_stakeholder/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, "Client Token" ]'

JavaScript example POST

var options = {
 method: "POST",
 headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
 body: '[ 1, "Client Token" ]'
};
fetch("https://engine.tygron.com/api/session/event/editorstakeholder/select_stakeholder/", options)
 .then(response => response.text())
 .then(result => console.log(result))
 .catch(error => console.log('error', error));