Pidoco. Your wireframing tool.

Element Resource

Description of Element Resource

List Elements of Page

Method: GET
URI: /rabbit/api/prototypes/{id}/pages/{id}/elements.json
Access: Read

Returns a JSON Array with the ids of all elements of this page.

CURL Example:
			missing
			

List Elements of Layer

Method: GET
URI: /rabbit/api/prototypes/{id}/layers/{id}/elements.json
Access: Read

Returns a JSON Array with the ids of all elements of this layer.

CURL Example:
			see "List Elements of Page" example
			

Create new Element on Page

Method: POST
URI: /rabbit/api/prototypes/{id}/pages/{id}/elements.json
Access: Read-Write
Data: {type: 'elementType', position /* optional */: { x: 100, y: 10 }, dimensions /* optional */: {width: 120, height: 40}, target /* optional */: 'page0001', ...}

Creates a new element. Returns the same list as with GET. Has the Location HTTP header set with the URI of the new element (which includes its ID). Attributes that are not contained in the request remain unmodified. For a complete list of attributes see listing below. TODO: auflisten For a complete list of elementTypes see listing below. TODO: auflisten

CURL Example:
			missing
			

Create new Element on Layer

Method: POST
URI: /rabbit/api/prototypes/{id}/layers/{id}/elements.json
Access: Read-Write
Data: {type: 'elementType', ...}

Creates a new element. Returns the same list as with GET. Has the Location HTTP header set with the URI of the new element (which includes its ID). Attributes that are not contained in the request remain unmodified. For a complete list of attributes see listing below. TODO: auflisten For a complete list of elementTypes see listing below. TODO: auflisten

CURL Example:
			 see example of Create new Element on Page
			

Show Metadata of Element on Page

Method: GET
URI: /rabbit/api/prototypes/{id}/pages/{id}/elements/{id}.json
Access: Read

Returns a JSON Object with the metadata to the element, e.g. its position or dimensions.

CURL Example:
 
			missing
			

Show Metadata of Element on Layer

Method: GET
URI: /rabbit/api/prototypes/{id}/layers/{id}/elements/{id}.json
Access: Read

Returns a JSON Object with the metadata to the element, e.g. its position or dimensions.

CURL Example:
 
			see example of "Show Metadata of Element on Page"
			

Update Metadata of Element on Page

Method: PUT
URI: /rabbit/api/prototypes/{id}/pages/{id}/elements/{id}.json
Access: Read-Write
Data: { position /* optional */: { x: 100, y: 10 }, dimensions /* optional */: {width: 120, height: 40}, target /* optional */: 'page0001', ... }

Updates the element metadata that is provided in the request. Attributes that are not contained in the request remain unmodified. For a complete list of attributes see listing below.

CURL Example:
			missing
			

Update Metadata of Element on Layer

Method: PUT
URI: /rabbit/api/prototypes/{id}/layers/{id}/elements/{id}.json
Access: Read-Write
Data: { position /* optional */: { x: 100, y: 10 }, dimensions /* optional */: {width: 120, height: 40}, target /* optional */: 'page0001', ... }

Updates the element metadata that is provided in the request. Attributes that are not contained in the request remain unmodified. For a complete list of attributes see listing below.

CURL Example:
			see "Update Metadata of Element on Page" example
			

Delete Element on Layer

Method: DELETE
URI: /rabbit/api/prototypes/{id}/layers/{id}/elements/{id}
Access: Read-Write

Deletes the element from the layer.

CURL Example:
			curl -vX DELETE -H "Content-Type: application/json" 
			  https://pidoco.com/rabbit/api/prototypes/1/layers/layer9112/elements/element0001.json?api_key=samplekey
			> DELETE /rabbit/api/prototypes/1/layers/layer9112/elements/element0001.json?api_key=samplekey HTTP/1.1
			> User-Agent: curl/7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15
			> Host: pidoco.com
			> Accept: */*
			> Content-Type: application/json
			> 
			< HTTP/1.1 204 Pas de Contenu
			< Server: Apache-Coyote/1.1
			< Date: Fri, 10 Sep 2010 08:15:02 GMT
			< 
			

Delete Element on Page

Method: DELETE
URI: /rabbit/api/prototypes/{id}/pages/{id}/elements/{id}
Access: Read-Write

Deletes the element from the page.

CURL Example:
			see "Delete Element on Layer" example
			

List Element Types with attributes