List all your web templates.
GET /api/web-templates
Example request :
curl "https://cloud.boxydev.com/api/web-templates" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
Example response :
{
"data": [
{
"id": 1,
"name": "amazing-dream-OcCREOtinKHhDB5b",
"content": "server_name fiorella",
"created_at": "2022-08-23T16:54:12.000000Z"
}
],
"links": {
"first": "https://cloud.boxydev.com/api/web-templates?page=1",
"last": "https://cloud.boxydev.com/api/web-templates?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://cloud.boxydev.com/api/web-templates",
"per_page": 20,
"to": 1,
"total": 1
}
}
Show web template.
GET /api/web-template/{id}
Example request :
curl "https://cloud.boxydev.com/api/web-template/1" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
Example response :
{
"id": 1,
"name": "fiorella",
"content": "server_name fiorella",
"created_at": "2022-08-23T16:54:12.000000Z"
}
Create a web template.
POST /api/web-template
Parameters :
Parameter | Description |
---|---|
name | The web template name. |
content | The web template content. |
Example request :
curl "https://cloud.boxydev.com/api/web-template" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "fiofio",
"content": "server_name fiofio"
}'
Example response :
{
"id": 1,
"name": "fiofio",
"content": "server_name fiofio",
"created_at": "2022-08-31T20:26:46.000000Z"
}
Update a web template.
PUT /api/web-template/{id}
Parameters :
Parameter | Description |
---|---|
name | The web template name. |
content | The web template content. |
Example request :
curl -X PUT "https://cloud.boxydev.com/api/web-template/1" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "marina",
"content": "server_name marina"
}'
Example response :
{
"id": 1,
"name": "marina",
"content": "server_name marina",
"created_at": "2022-08-23T16:54:12.000000Z"
}
Delete a web template.
DELETE /api/web-template/{id}
Example request :
curl -X DELETE "https://cloud.boxydev.com/api/web-template/1" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"