# Restores

## Get all Restores

> Get all Restores operations

```json
{"openapi":"3.1.1","info":{"title":"MariaDB Cloud DBaaS API","version":"1.0"},"servers":[{"url":"https://api.skysql.com/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"v1.PagedRestoresResponse":{"type":"object","properties":{"pages_count":{"description":"PagesCount counter of all pages","type":"integer"},"restores":{"description":"Restores results","type":"array","items":{"$ref":"#/components/schemas/v1.RestoreResponse"}},"restores_count":{"description":"RestoresCount holds count of the restores","type":"integer"}}},"v1.RestoreResponse":{"type":"object","properties":{"backup_id":{"description":"unique backup id","type":"string"},"bucket":{"description":"bucket where the backup is located","type":"string"},"created_at":{"description":"CreatedAt represents the time when the restore operation was triggered","type":"string"},"id":{"description":"id of the restore operation","type":"integer"},"message":{"description":"message","type":"string"},"service_id":{"description":"service id represents unique database id","type":"string"},"service_name":{"description":"name of the database service","type":"string"},"status":{"description":"status of the restore operation","type":"string"},"type":{"description":"type of the restore operation","type":"string"}}},"web.ErrorResponse":{"type":"object","properties":{"code":{"type":"integer"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/web.ErrorDetails"}},"exception":{"type":"string"},"path":{"type":"string"},"timestamp":{"type":"integer"},"trace_id":{"type":"string"}}},"web.ErrorDetails":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/skybackup/v1/restores":{"get":{"description":"Get all Restores operations","tags":["Restores"],"summary":"Get all Restores","operationId":"get-all-restores","parameters":[{"schema":{"type":"integer","minimum":1},"description":"page number","name":"page","in":"query"},{"schema":{"type":"integer","minimum":1},"description":"items per page","name":"page_size","in":"query"},{"schema":{"type":"string","minLength":3},"description":"ServiceID Query","name":"service_id","in":"query","required":true},{"schema":{"type":"string"},"description":"physical or logical","name":"type","in":"query"},{"schema":{"type":"string","enum":["desc","asc"]},"description":"asc or desc","name":"order","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1.PagedRestoresResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/web.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/web.ErrorResponse"}}}}}}}}}
```

## Create Restore

> Create new Restore operation

```json
{"openapi":"3.1.1","info":{"title":"MariaDB Cloud DBaaS API","version":"1.0"},"servers":[{"url":"https://api.skysql.com/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"v1.RestoreResponse":{"type":"object","properties":{"backup_id":{"description":"unique backup id","type":"string"},"bucket":{"description":"bucket where the backup is located","type":"string"},"created_at":{"description":"CreatedAt represents the time when the restore operation was triggered","type":"string"},"id":{"description":"id of the restore operation","type":"integer"},"message":{"description":"message","type":"string"},"service_id":{"description":"service id represents unique database id","type":"string"},"service_name":{"description":"name of the database service","type":"string"},"status":{"description":"status of the restore operation","type":"string"},"type":{"description":"type of the restore operation","type":"string"}}},"web.ErrorResponse":{"type":"object","properties":{"code":{"type":"integer"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/web.ErrorDetails"}},"exception":{"type":"string"},"path":{"type":"string"},"timestamp":{"type":"integer"},"trace_id":{"type":"string"}}},"web.ErrorDetails":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}},"v1.RestoreRequest":{"type":"object","required":["id","service_id"],"properties":{"external_source":{"description":"External Source is the external storage where the backup is kept","$ref":"#/components/schemas/v1.ExternalSource"},"id":{"description":"key represents unique backup id","type":"string"},"point_in_time":{"description":"timestamp represents date and time value in 'CCYY-MM-DD hh:mm:ss' format","type":"string"},"service_id":{"description":"service id represents unique database id","type":"string"}}},"v1.ExternalSource":{"type":"object","required":["bucket","method"],"properties":{"bucket":{"description":"Bucket source","type":"string"},"credentials":{"description":"Credentials to access external source. base64 encoded\nDon't provide credentials in case of managed buckets","type":"array","items":{"type":"integer"}},"encryption_key":{"description":"EncryptionKey represents encryption key for the bucket data","type":"string"},"method":{"description":"Method represents the different variations of the cloud backup utilities\nvalid types: mariabackup,mysqldump","type":"string"}}}}},"paths":{"/skybackup/v1/restores":{"post":{"description":"Create new Restore operation","tags":["Restores"],"summary":"Create Restore","operationId":"create-restore","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1.RestoreResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/web.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/web.ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1.RestoreRequest"}}},"description":"Create Restore","required":true}}}}}
```

## Look up Services for Restore

> Look up eligible Services for Restore by Backup ID

```json
{"openapi":"3.1.1","info":{"title":"MariaDB Cloud DBaaS API","version":"1.0"},"servers":[{"url":"https://api.skysql.com/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"v1.LookupRestoreResponse":{"type":"object","properties":{"services":{"description":"Services represents the list of services that can be restored","type":"array","items":{"$ref":"#/components/schemas/v1.LookupService"}}}},"v1.LookupService":{"type":"object","properties":{"service_id":{"description":"service id represents unique database id","type":"string"},"service_name":{"description":"name of the database service","type":"string"}}},"web.ErrorResponse":{"type":"object","properties":{"code":{"type":"integer"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/web.ErrorDetails"}},"exception":{"type":"string"},"path":{"type":"string"},"timestamp":{"type":"integer"},"trace_id":{"type":"string"}}},"web.ErrorDetails":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}},"v1.LookupRestoreRequest":{"type":"object","properties":{"backup_id":{"description":"BackupID unique backup id","type":"string"},"service_id":{"description":"ServiceID represents unique database id of the source service","type":"string"}}}}},"paths":{"/skybackup/v1/restores/lookup":{"post":{"description":"Look up eligible Services for Restore by Backup ID","tags":["Restores"],"summary":"Look up Services for Restore","operationId":"lockup-restore","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1.LookupRestoreResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/web.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/web.ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1.LookupRestoreRequest"}}},"description":"Look up Request","required":true}}}}}
```

## Look up Services for Point in time Restore

> Look up eligible Services to provide backups for Point in time Restore

```json
{"openapi":"3.1.1","info":{"title":"MariaDB Cloud DBaaS API","version":"1.0"},"servers":[{"url":"https://api.skysql.com/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"v1.LookupPointInTimeRestoreResponse":{"type":"object","properties":{"services":{"description":"Services represents the list of services that can provide backups for point in time restore.","type":"array","items":{"$ref":"#/components/schemas/v1.LookupPointInTimeRestoreService"}}}},"v1.LookupPointInTimeRestoreService":{"type":"object","properties":{"end_time":{"description":"EndTime represents the last time when point in time restore can be used","type":"string"},"service_id":{"description":"service id represents unique database id","type":"string"},"service_name":{"description":"name of the database service","type":"string"},"start_time":{"description":"StartTime represents the first time when point in time restore can be used","type":"string"}}},"web.ErrorResponse":{"type":"object","properties":{"code":{"type":"integer"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/web.ErrorDetails"}},"exception":{"type":"string"},"path":{"type":"string"},"timestamp":{"type":"integer"},"trace_id":{"type":"string"}}},"web.ErrorDetails":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/skybackup/v1/restores/pointintime/lookup":{"get":{"description":"Look up eligible Services to provide backups for Point in time Restore","consumes":["application/json"],"tags":["Restores"],"summary":"Look up Services for Point in time Restore","operationId":"lockup-pitr-restore","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1.LookupPointInTimeRestoreResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/web.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/web.ErrorResponse"}}}}}}}}}
```

## Get Restore

> Get single Restore operation

```json
{"openapi":"3.1.1","info":{"title":"MariaDB Cloud DBaaS API","version":"1.0"},"servers":[{"url":"https://api.skysql.com/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"v1.RestoreResponse":{"type":"object","properties":{"backup_id":{"description":"unique backup id","type":"string"},"bucket":{"description":"bucket where the backup is located","type":"string"},"created_at":{"description":"CreatedAt represents the time when the restore operation was triggered","type":"string"},"id":{"description":"id of the restore operation","type":"integer"},"message":{"description":"message","type":"string"},"service_id":{"description":"service id represents unique database id","type":"string"},"service_name":{"description":"name of the database service","type":"string"},"status":{"description":"status of the restore operation","type":"string"},"type":{"description":"type of the restore operation","type":"string"}}},"web.ErrorResponse":{"type":"object","properties":{"code":{"type":"integer"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/web.ErrorDetails"}},"exception":{"type":"string"},"path":{"type":"string"},"timestamp":{"type":"integer"},"trace_id":{"type":"string"}}},"web.ErrorDetails":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/skybackup/v1/restores/{id}":{"get":{"description":"Get single Restore operation","tags":["Restores"],"summary":"Get Restore","operationId":"get-restore","parameters":[{"schema":{"type":"string"},"description":"Restore ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1.RestoreResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/web.ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/web.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/web.ErrorResponse"}}}}}}}}}
```

## Delete Restore

> Delete single Restore operation

```json
{"openapi":"3.1.1","info":{"title":"MariaDB Cloud DBaaS API","version":"1.0"},"servers":[{"url":"https://api.skysql.com/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"web.ErrorResponse":{"type":"object","properties":{"code":{"type":"integer"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/web.ErrorDetails"}},"exception":{"type":"string"},"path":{"type":"string"},"timestamp":{"type":"integer"},"trace_id":{"type":"string"}}},"web.ErrorDetails":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/skybackup/v1/restores/{id}":{"delete":{"description":"Delete single Restore operation","tags":["Restores"],"summary":"Delete Restore","operationId":"delete-restore","parameters":[{"schema":{"type":"string"},"description":"Restore ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/web.ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/web.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/web.ErrorResponse"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/mariadb-cloud/reference/mariadb-cloud-api-reference-guide/restores.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
