-
Notifications
You must be signed in to change notification settings - Fork 1
Nodes
Wiki ▸ API Reference ▸ Nodes
See Authenticating
Create a new node:
curl --verbose --request POST --header "Content-Type: application/json" -d "{name:'new node',description:'this is the description',nodetype:1,tags:'this,is,a,test',att1:'value1',att2:'value2'}" http://localhost:8080/api/node/none --cookie cookies.txt
status possible values include DEV,TEST,STAGE,PROD,IMP,BKP,OTHER
NOTE: attribute name and value pairs will vary depending on the nodetype template you are editing and it is best if you read these in from the templateattribute api.
Edit a Node:
curl --verbose --request PUT --header "Content-Type: application/json" -d "{id:4,name:'new node',description:'this is the description',nodetype:1,tags:'this,is,a,test',att1:'test',att2:'test2'}" http://localhost:8080/api/node/none --cookie cookies.txt
NOTE: attribute name and value pairs will vary depending on the nodetype template you are editing and it is best if you read these in from the templateattribute api.
Get data about a Node:
curl --request GET http://localhost:8080/api/node/{format}/1 --cookie cookies.txt
Wherein {format} can be replaced with:
- xml
- json
- none
List all Nodes:
curl --verbose --request POST --header "Content-Type: application/json" http://localhost:8080/api/node/list/{format} --cookie cookies.txt
Delete a node:
curl --request DELETE http://localhost:8080/api/node/none/1 --cookie cookies.txt
Comma separated list of node IDs:
curl --request DELETE http://localhost:8080/api/node/none/{1,2} --cookie cookies.txt
You can import node data that meets the yana.xsd:
curl --form yanaimport=@yana_import.xml "http://localhost:8080/import/savexml" --cookie cookies.txt