Api session event editor excelsheet add: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
Tag: Reverted
No edit summary
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
API Event to Add new [[Excel Sheet]]sheet
API Endpoint: api/session/event/editorexcelsheet/add/
 
Description: Add new [[Excel Sheet]]
 
{|class=wikitable
{|class=wikitable
!Name
!Index
!Importance
!Importance
!Type
!Type
Line 7: Line 10:
!Values
!Values
|-
|-
|0
| 0
|REQUIRED
| REQUIRED
|(String)
| (String)
|Name
| Name
|
|  
|-
|-
|1
| 1
|REQUIRED
| REQUIRED
|(byte or multiple values in array [a, b, c])
| (byte or multiple values in array [a, b, c])
|Byte array content
| Byte array content
|
|  
|-
|-
|2
| 2
|REQUIRED
| REQUIRED
|(String)
| (String)
|Uploader Name
| Uploader Name
|
|  
|}
|}
===Response Codes===
===Response Codes===
Line 30: Line 33:
!Description
!Description
|-
|-
|200
| 200
|Integer (Excel ID)
| Integer (Excel ID)
|-
|-
|300-600
| 300-600
|Codes Overview
| Codes Overview
|}
|}
===Example POST===
===Example POST===
Example POST: https://engine.tygron.com/api/session/event/editorexcelsheet/add/?f=HTML&token=API_TOKEN
Curl example POST
 
<syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/event/editorexcelsheet/add/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ "Name", 1, "Uploader Name" ]'
with content:
</syntaxhighlight>
<pre>[ "Name", [ 1, 2, 3 ], "Uploader Name" ]
Curl example multi item POST
</pre>
<syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/event/editorexcelsheet/add/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ "Name", [ 1, 2, 3 ], "Uploader Name" ]'
{{article end|seealso=*[[api session event editor excelsheet]]}}
</syntaxhighlight>
JavaScript example POST
<syntaxhighlight lang="text" copy>var options = {
 method: "POST",
 headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
 body: '[ "Name", 1, "Uploader Name" ]'
};
fetch("https://engine.tygron.com/api/session/event/editorexcelsheet/add/", options)
 .then(response => response.text())
 .then(result => console.log(result))
 .catch(error => console.log('error', error));
</syntaxhighlight>
{{article end|seealso=*[[Api session event editor excelsheet]]
*[[Api session items excelsheets]]
}}


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

Latest revision as of 12:02, 15 June 2026

API Endpoint: api/session/event/editorexcelsheet/add/

Description: Add new Excel Sheet

Index Importance Type Description Values
0 REQUIRED (String) Name
1 REQUIRED (byte or multiple values in array [a, b, c]) Byte array content
2 REQUIRED (String) Uploader Name

Response Codes

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

Example POST

Curl example POST

curl 'https://engine.tygron.com/api/session/event/editorexcelsheet/add/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ "Name", 1, "Uploader Name" ]'

Curl example multi item POST

curl 'https://engine.tygron.com/api/session/event/editorexcelsheet/add/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ "Name", [ 1, 2, 3 ], "Uploader Name" ]'

JavaScript example POST

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