Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.
ahonor edited this page Aug 17, 2012 · 8 revisions

WikiAPI ReferenceNodes

Authenticating

See Authenticating

CREATE

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

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.

SHOW

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

List all Nodes:

curl --verbose --request POST --header "Content-Type: application/json" http://localhost:8080/api/node/list/{format} --cookie cookies.txt

DELETE

Delete a node:

curl --request DELETE http://localhost:8080/api/node/none/1 --cookie cookies.txt

DELETE MULTIPLE

Comma separated list of node IDs:

curl --request DELETE http://localhost:8080/api/node/none/{1,2} --cookie cookies.txt

IMPORT

You can import node data that meets the yana.xsd:

curl --form yanaimport=@yana_import.xml "http://localhost:8080/import/savexml" --cookie cookies.txt

Clone this wiki locally