Templates
GET
https://api.restorehub.net /api/v1/templates List your templates
Required scope: templates:read
Code samples
cURL
curl -X GET "https://api.restorehub.net/api/v1/templates" \
-H "Authorization: Bearer $RESTOREHUB_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}400 Validation failed
Example
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}Schema
errorstringHuman-readable error message
codestringMachine-readable error code (optional)
detailsobjectValidation issues (optional)
requiredScopestringRequired scope (on 403 only)
yourScopesstring[]Your key's scopes (on 403 only)
POST
https://api.restorehub.net /api/v1/templates Create a template
Required scope: templates:write
Request body
application/json
namestringrequireddescriptionstringdataobjectrequiredTemplate body (channels, roles, ...)
isPublicboolean{
"name": "string",
"description": "string",
"data": {},
"isPublic": true
}Code samples
cURL
curl -X POST "https://api.restorehub.net/api/v1/templates" \
-H "Authorization: Bearer $RESTOREHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"string","description":"string","data":{},"isPublic":true}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}POST
https://api.restorehub.net /api/v1/templates/from-backup Create a template from an existing backup
Required scope: templates:write
Request body
application/json
backupIdstringrequirednamestringrequireddescriptionstringisPublicboolean{
"backupId": "string",
"name": "string",
"description": "string",
"isPublic": true
}Code samples
cURL
curl -X POST "https://api.restorehub.net/api/v1/templates/from-backup" \
-H "Authorization: Bearer $RESTOREHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"backupId":"string","name":"string","description":"string","isPublic":true}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}GET
https://api.restorehub.net /api/v1/templates/{id} Get a template
Required scope: templates:read
Parameters
idstringpathrequiredCode samples
cURL
curl -X GET "https://api.restorehub.net/api/v1/templates/{id}" \
-H "Authorization: Bearer $RESTOREHUB_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}PUT
https://api.restorehub.net /api/v1/templates/{id} Update a template
Required scope: templates:write
Parameters
idstringpathrequiredRequest body
application/json
namestringdescriptionstringdataobjectisPublicboolean{
"name": "string",
"description": "string",
"data": {},
"isPublic": true
}Code samples
cURL
curl -X PUT "https://api.restorehub.net/api/v1/templates/{id}" \
-H "Authorization: Bearer $RESTOREHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"string","description":"string","data":{},"isPublic":true}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}DELETE
https://api.restorehub.net /api/v1/templates/{id} Delete a template
Required scope: templates:write
Parameters
idstringpathrequiredCode samples
cURL
curl -X DELETE "https://api.restorehub.net/api/v1/templates/{id}" \
-H "Authorization: Bearer $RESTOREHUB_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}POST
https://api.restorehub.net /api/v1/servers/{id}/apply-template Apply a template to a server
Required scope: templates:apply
Parameters
idstringpathrequiredRequest body
application/json
templateIdstringrequiredoptionsobject{
"templateId": "string",
"options": {}
}Code samples
cURL
curl -X POST "https://api.restorehub.net/api/v1/servers/{id}/apply-template" \
-H "Authorization: Bearer $RESTOREHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"templateId":"string","options":{}}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}Updated