Api session event editor parametric set function: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
API Endpoint: api/session/event/editorparametric/set_function/ | API Endpoint: api/session/event/editorparametric/set_function/ | ||
Description: Set [[Function]] | Description: Set a [[Function]] of a [[Function]] Type for a [[Parametric Design]]. Use [[Function]] ID -1 to remove it for a [[Function]] Type. | ||
{|class=wikitable | {|class=wikitable | ||
| Line 19: | Line 19: | ||
| REQUIRED | | REQUIRED | ||
| (FunctionType or multiple values in array [a, b, c]) | | (FunctionType or multiple values in array [a, b, c]) | ||
| [[Function]]Type | | [[Function]] Type | ||
| | | | ||
|- | |- | ||
| Line 25: | Line 25: | ||
| REQUIRED | | REQUIRED | ||
| (Integer number or multiple integer values in array [1, 2, 3]) | | (Integer number or multiple integer values in array [1, 2, 3]) | ||
| | | [[Function]] ID | ||
| | | | ||
|} | |} | ||
| Line 33: | Line 33: | ||
!Description | !Description | ||
|- | |- | ||
| | | 200 | ||
| | | Parametric Design ID | ||
|- | |- | ||
| 300-600 | | 300-600 | ||
Revision as of 15:31, 10 November 2026
API Endpoint: api/session/event/editorparametric/set_function/
Description: Set a Function of a Function Type for a Parametric Design. Use Function ID -1 to remove it for a Function Type.
| Index | Importance | Type | Description | Values |
|---|---|---|---|---|
| 0 | REQUIRED | (PARAMETRIC_DESIGN Integer ID or multiple integer values in array [1, 2, 3]) | Parametric Designs | |
| 1 | REQUIRED | (FunctionType or multiple values in array [a, b, c]) | Function Type | |
| 2 | REQUIRED | (Integer number or multiple integer values in array [1, 2, 3]) | Function ID |
Response Codes
| Response Code: | Description |
|---|---|
| 200 | Parametric Design ID |
| 300-600 | Codes Overview |
Example POST
Curl example POST
curl 'https://engine.tygron.com/api/session/event/editorparametric/set_function/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, "ROAD", 1 ]'Curl example multi item POST
curl 'https://engine.tygron.com/api/session/event/editorparametric/set_function/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ [ 1, 2, 3 ], [ "ROAD", "WATER", "PARKING" ], [ 1, 2, 3 ] ]'JavaScript example POST
var options = {
method: "POST",
headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
body: '[ 1, "ROAD", 1 ]'
};
fetch("https://engine.tygron.com/api/session/event/editorparametric/set_function/", options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));