Skip to main content
Version: 1.x.x

createPeer

Creates a new Peer resource.

URL

/peers

Method

POST

Parameters

This method does not receive any parameters.

Request body

A file containing a Peer resource in json format.

Response

If successful this method creates a Peer resource.

Sample Call

POST /api/{apiversion}/peers
{
"apiVersion": "v1beta1",
"kind": "Peer",
"metadata": {
"name": "Asterisk PBX"
},
"spec": {
"credentials": {
"username": "ast",
"secret": "1234"
}
}
}

HTTP/1.1 201 Created
{
"status": "201",
"message": "Created",
"data": "pr2c77f4"
}