Api session event editor netload generate paths: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
API Event to Generate Paths
API Endpoint: api/session/event/editornetload/generate_paths/
 
Description: Connect [[Net Load]]s to an existing Net by adding [[Net Line]]s with the provided [[Net Function]]. [[Net Line]]s are generated with a Search Range for paths to existing [[Net Node]]s and a Merge Range to combine [[Net Node]]s
 
{|class=wikitable
{|class=wikitable
!Name
!Index
!Importance
!Importance
!Type
!Type
Line 7: Line 10:
!Values
!Values
|-
|-
|0
| 0
|REQUIRED
| REQUIRED
|(NET_FUNCTION Integer ID)
| (NET_FUNCTION Integer ID)
|[[Net Function]]
| [[Net Function]]
|
|  
|-
|-
|1
| 1
|REQUIRED
| REQUIRED
|(NET_LOAD Integer ID or multiple values in array [1, 2, 3])
| (NET_LOAD Integer ID or multiple integer values in array [1, 2, 3])
|[[Net Load]]
| [[Net Load]]s
|
|  
|-
|-
|2
| 2
|REQUIRED
| REQUIRED
|(Floating point number)
| (Floating point number)
|Double
| Search Range
|
|  
|-
|-
|3
| 3
|REQUIRED
| REQUIRED
|(Floating point number)
| (Floating point number)
|Double
| Merge Range
|
|  
|}
|}
===Response Codes===
===Response Codes===
Line 36: Line 39:
!Description
!Description
|-
|-
|204
| 204
|No Content
| No Content
|-
|-
|300-600
| 300-600
|Codes Overview
| Codes Overview
|}
|}
===Example POST===
===Example POST===
Curl Example POST:
Curl example POST
 
<syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/event/editornetload/generate_paths/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, 1, 72, 43 ]'
<syntaxhighlight lang="text" copy>curl 'https://development.tygron.com/api/session/event/editornetload/generate_paths/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, 1, 78, 17 ]'
</syntaxhighlight>
</syntaxhighlight>
Curl Example multi item POST:
Curl example multi item POST
 
<syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/event/editornetload/generate_paths/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, [ 1, 2, 3 ], 16, 45 ]'
<syntaxhighlight lang="text" copy>curl 'https://development.tygron.com/api/session/event/editornetload/generate_paths/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, [ 1, 2, 3 ], 19, 82 ]'
</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": "Bearer 31410104zAuxtcJo8WGhL6iYlCDnU5hd" },
 headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
 body: '[ 1, 1, 78, 17 ]'
 body: '[ 1, 1, 72, 43 ]'
};
};
fetch("https://development.tygron.com/api/session/event/editornetload/generate_paths/", options)
fetch("https://engine.tygron.com/api/session/event/editornetload/generate_paths/", options)
 .then(response => response.text())
 .then(response => response.text())
 .then(result => console.log(result))
 .then(result => console.log(result))

Latest revision as of 14:52, 11 November 2026

API Endpoint: api/session/event/editornetload/generate_paths/

Description: Connect Net Loads to an existing Net by adding Net Lines with the provided Net Function. Net Lines are generated with a Search Range for paths to existing Net Nodes and a Merge Range to combine Net Nodes

Index Importance Type Description Values
0 REQUIRED (NET_FUNCTION Integer ID) Net Function
1 REQUIRED (NET_LOAD Integer ID or multiple integer values in array [1, 2, 3]) Net Loads
2 REQUIRED (Floating point number) Search Range
3 REQUIRED (Floating point number) Merge Range

Response Codes

Response Code: Description
204 No Content
300-600 Codes Overview

Example POST

Curl example POST

curl 'https://engine.tygron.com/api/session/event/editornetload/generate_paths/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, 1, 72, 43 ]'

Curl example multi item POST

curl 'https://engine.tygron.com/api/session/event/editornetload/generate_paths/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, [ 1, 2, 3 ], 16, 45 ]'

JavaScript example POST

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