---
title: "rest:bind — RESTful binding"
description: "iXML command rest:bind: RESTful binding."
canonical_url: "https://www.zeyos.com/ixml/ref/rest-bind"
markdown_url: "https://www.zeyos.com/ai/guide/ixml/ref/rest-bind.md"
section: "ixml-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/ixmldoc.xml"
source_sha256: "a23f04e6a98628ca3c273c3b8dd2c33c034cfda3e0f00478d8793074fd2f70dd"
---

# rest:bind — RESTful binding

REST:BIND defines a RESTful resource as a function that can be invoked with subsequent CALL statements.

Resource route arguments of the form ':name' are substituted with the actual corresponding parameter values when being called. All remaining parameters are treated as query arguments according to RFC 3986 and are generally passed via the URL query component except for method POST in which case they are transported as the HTTP body.

Invoked resources return an array comprised of the following items if type is specified as 'raw':

				Key    Description
				----------------------------
				status response status code
				type   response content type
				header response header
				body   response body

### Attributes
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| var | var |  | Function variable name |
| method | string | GET | Method |
| type | type | prepared | Processing type |

#### Possible values
Possible values for `method`:
- HEAD — HEAD
- GET — GET
- POST — POST
- PUT — PUT
- PATCH — PATCH
- DELETE — DELETE
- TRACE — TRACE
- OPTIONS — OPTIONS
- CONNECT — CONNECT

Possible values for `type`:
- prepared — Prepared
- raw — Raw


### Children
- (none)

### Parents
- rest:client

### Result
- binding: var; type: function; predicate: no-result-propagation
