Api event share set icon: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
Server@tygron.com (talk | contribs)
Created page with "API Endpoint: api/event/share/set_icon/ Description: Set icon for given path. {|class=wikitable !Index !Importance !Type !Description !Values |- | 0 | REQUIRED | (String or multiple values in array ["a", "b", "c"]) | Path (e.g. "mydir/myname.tiff", note: viewers and directories end with a slash e.g. "mydir/viewer/") | |- | 1 | REQUIRED | (String or multiple values in array ["a", "b", "c"]) | Icon Name | |} ===Response Codes=== {|class=wikitable !Response Code: !Descr..."
 
Server@tygron.com (talk | contribs)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 35: Line 35:
===Example POST===
===Example POST===
Curl example POST
Curl example POST
<syntaxhighlight lang="text" copy>curl 'https://devshare.tygron.com/api/event/share/set_icon/' -H 'Content-Type: application/json' -H 'Authorization: Basic <credentials>=' -d '[ "Path 1", "Icon Name 1" ]'
<syntaxhighlight lang="text" copy>curl 'https://devshare.tygron.com/api/event/share/set_icon/' -H 'Content-Type: application/json' -H 'Authorization: Basic <credentials>' -d '[ "Path 1", "Icon Name 1" ]'
</syntaxhighlight>
</syntaxhighlight>
Curl example multi item POST
Curl example multi item POST
<syntaxhighlight lang="text" copy>curl 'https://devshare.tygron.com/api/event/share/set_icon/' -H 'Content-Type: application/json' -H 'Authorization: Basic <credentials>=' -d '[ [ "Path 1", "Path 2", "Path 3" ], [ "Icon Name 1", "Icon Name 2", "Icon Name 3" ] ]'
<syntaxhighlight lang="text" copy>curl 'https://devshare.tygron.com/api/event/share/set_icon/' -H 'Content-Type: application/json' -H 'Authorization: Basic <credentials>' -d '[ [ "Path 1", "Path 2", "Path 3" ], [ "Icon Name 1", "Icon Name 2", "Icon Name 3" ] ]'
</syntaxhighlight>
</syntaxhighlight>
JavaScript example POST
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": "Basic <credentials>=" },
 headers: { "Content-Type": "application/json", "Authorization": "Basic <credentials>" },
 body: '[ "Path 1", "Icon Name 1" ]'
 body: '[ "Path 1", "Icon Name 1" ]'
};
};

Latest revision as of 15:18, 20 November 2026

API Endpoint: api/event/share/set_icon/

Description: Set icon for given path.

Index Importance Type Description Values
0 REQUIRED (String or multiple values in array ["a", "b", "c"]) Path (e.g. "mydir/myname.tiff", note: viewers and directories end with a slash e.g. "mydir/viewer/")
1 REQUIRED (String or multiple values in array ["a", "b", "c"]) Icon Name

Response Codes

Response Code: Description
200 Boolean (Content was updated)
300-600 Codes Overview

Example POST

Curl example POST

curl 'https://devshare.tygron.com/api/event/share/set_icon/' -H 'Content-Type: application/json' -H 'Authorization: Basic <credentials>' -d '[ "Path 1", "Icon Name 1" ]'

Curl example multi item POST

curl 'https://devshare.tygron.com/api/event/share/set_icon/' -H 'Content-Type: application/json' -H 'Authorization: Basic <credentials>' -d '[ [ "Path 1", "Path 2", "Path 3" ], [ "Icon Name 1", "Icon Name 2", "Icon Name 3" ] ]'

JavaScript example POST

var options = {
 method: "POST",
 headers: { "Content-Type": "application/json", "Authorization": "Basic <credentials>" },
 body: '[ "Path 1", "Icon Name 1" ]'
};
fetch("https://devshare.tygron.com/api/event/share/set_icon/", options)
 .then(response => response.text())
 .then(result => console.log(result))
 .catch(error => console.log('error', error));

See also