Api event share add url: Difference between revisions
Jump to navigation
Jump to search
Created page with "API Endpoint: api/event/share/add_url/ Description: Add new Shareable for given path, name and type; returns a unique path with primary extension. {|class=wikitable !Index !Importance !Type !Description !Values |- | 0 | REQUIRED | (String) | Path (e.g. "mydir/myname.tiff", note: viewers and directories end with a slash e.g. "mydir/viewer/") | |- | 1 | REQUIRED | (Enumeration) | Type | CITYGML, CITYJSON, CSV, DIRECTORY, DOC, DXF, EXCEL, GEOJSON, GEOPACKAGE, GEOTIFF, GI..." |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 41: | Line 41: | ||
===Example POST=== | ===Example POST=== | ||
Curl example POST | Curl example POST | ||
<syntaxhighlight lang="text" copy>curl 'https://devshare.tygron.com/api/event/share/add_url/' -H 'Content-Type: application/json' -H 'Authorization: Basic <credentials> | <syntaxhighlight lang="text" copy>curl 'https://devshare.tygron.com/api/event/share/add_url/' -H 'Content-Type: application/json' -H 'Authorization: Basic <credentials>' -d '[ "Path", "GEOTIFF" ]' | ||
</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", "GEOTIFF" ]' | body: '[ "Path", "GEOTIFF" ]' | ||
}; | }; | ||
Latest revision as of 15:18, 20 November 2026
API Endpoint: api/event/share/add_url/
Description: Add new Shareable for given path, name and type; returns a unique path with primary extension.
| Index | Importance | Type | Description | Values |
|---|---|---|---|---|
| 0 | REQUIRED | (String) | Path (e.g. "mydir/myname.tiff", note: viewers and directories end with a slash e.g. "mydir/viewer/") | |
| 1 | REQUIRED | (Enumeration) | Type | CITYGML, CITYJSON, CSV, DIRECTORY, DOC, DXF, EXCEL, GEOJSON, GEOPACKAGE, GEOTIFF, GIF, IFC, JPEG, MARKDOWN, ONNX, PDF, PNG, SLIDES, SLPK, TXT, VIEWER or ZIP |
| 2 | OPTIONAL | (String) | URL with Content (optional) |
Response Codes
| Response Code: | Description |
|---|---|
| 200 | String (String) |
| 300-600 | Codes Overview |
Example POST
Curl example POST
curl 'https://devshare.tygron.com/api/event/share/add_url/' -H 'Content-Type: application/json' -H 'Authorization: Basic <credentials>' -d '[ "Path", "GEOTIFF" ]'JavaScript example POST
var options = {
method: "POST",
headers: { "Content-Type": "application/json", "Authorization": "Basic <credentials>" },
body: '[ "Path", "GEOTIFF" ]'
};
fetch("https://devshare.tygron.com/api/event/share/add_url/", options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));