Api session event editor source add file: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
API | API Endpoint: editorsource/add_file. | ||
Description: Add File | |||
{|class=wikitable | {|class=wikitable | ||
!Name | !Name | ||
| Line 31: | Line 34: | ||
|} | |} | ||
===Example POST=== | ===Example POST=== | ||
Curl | Curl example POST: | ||
<syntaxhighlight lang="text" copy>curl 'https:// | <syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/event/editorsource/add_file/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ "Text", "Text" ]' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
JavaScript | JavaScript example POST: | ||
<syntaxhighlight lang="text" copy>var options = { | <syntaxhighlight lang="text" copy>var options = { | ||
method: "POST", | method: "POST", | ||
headers: { "Content-Type": "application/json", "Authorization": "Bearer | headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" }, | ||
body: '[ "Text", "Text" ]' | body: '[ "Text", "Text" ]' | ||
}; | }; | ||
fetch("https:// | fetch("https://engine.tygron.com/api/session/event/editorsource/add_file/", options) | ||
.then(response => response.text()) | .then(response => response.text()) | ||
.then(result => console.log(result)) | .then(result => console.log(result)) | ||
Latest revision as of 13:40, 14 April 2026
API Endpoint: editorsource/add_file.
Description: Add File
| Name | Importance | Type | Description | Values |
|---|---|---|---|---|
| 0 | REQUIRED | (String) | String | |
| 1 | REQUIRED | (String) | String |
Response Codes
| Response Code: | Description |
|---|---|
| 200 | Integer (Integer) |
| 300-600 | Codes Overview |
Example POST
Curl example POST:
curl 'https://engine.tygron.com/api/session/event/editorsource/add_file/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ "Text", "Text" ]'JavaScript example POST:
var options = {
method: "POST",
headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
body: '[ "Text", "Text" ]'
};
fetch("https://engine.tygron.com/api/session/event/editorsource/add_file/", options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));