# Backup & Restore

## Get backup/restore item details

> Get a backup/restore item details

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_BackupRestore"}],"servers":[{"url":"{server}","variables":{"server":{"default":"https://api.example.com"}}}],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"The bearer token can be obtained by creating a ServiceAccount.\n"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"session_id","description":"On successful SAML/SSO login, the API will set a cookie with a session id.\n"}},"schemas":{"agent_BackupRestoreItem":{"required":["id","createdAt","type","topic","connectCluster","connectorName","connectorVersion","s3Location"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"createdAt":{"type":"integer","format":"int64"},"type":{"$ref":"#/components/schemas/agent_BackupRestoreType"},"topic":{"type":"string"},"connectCluster":{"type":"string"},"connectorName":{"type":"string"},"connectorVersion":{"type":"string"},"s3Location":{"type":"string"},"reference":{"type":"string"}}},"agent_BackupRestoreType":{"type":"string","enum":["Backup","Restore"]}}},"paths":{"/api/v1/environments/{environment}/proxy/api/v1/s3/backups/{id}":{"get":{"tags":["agent_BackupRestore"],"summary":"Get backup/restore item details","description":"Get a backup/restore item details","operationId":"getBackupRestoreItem","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The unique identifier held by the backup Lenses store","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_BackupRestoreItem"}}}},"400":{"description":"The request input was invalid","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Authentication error","content":{"text/plain":{"schema":{"type":"string"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"text/plain":{"schema":{"type":"string"}}}},"403":{"description":"Authorisation error","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"The requested resource cannot be found","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"An internal server error has occurred","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```

## Delete a backup/restore item

> Delete a backup/restore item

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_BackupRestore"}],"servers":[{"url":"{server}","variables":{"server":{"default":"https://api.example.com"}}}],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"The bearer token can be obtained by creating a ServiceAccount.\n"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"session_id","description":"On successful SAML/SSO login, the API will set a cookie with a session id.\n"}}},"paths":{"/api/v1/environments/{environment}/proxy/api/v1/s3/backups/{id}":{"delete":{"tags":["agent_BackupRestore"],"summary":"Delete a backup/restore item","description":"Delete a backup/restore item","operationId":"deleteBackupRestoreItem","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The unique identifier held by the backup Lenses store","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":""},"400":{"description":"The request input was invalid","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Authentication error","content":{"text/plain":{"schema":{"type":"string"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"text/plain":{"schema":{"type":"string"}}}},"403":{"description":"Authorisation error","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"The requested resource cannot be found","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"An internal server error has occurred","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```

## List all backup/restore items

> List all backup/restore items

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_BackupRestore"}],"servers":[{"url":"{server}","variables":{"server":{"default":"https://api.example.com"}}}],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"The bearer token can be obtained by creating a ServiceAccount.\n"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"session_id","description":"On successful SAML/SSO login, the API will set a cookie with a session id.\n"}},"schemas":{"agent_BackupRestoreItem":{"required":["id","createdAt","type","topic","connectCluster","connectorName","connectorVersion","s3Location"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"createdAt":{"type":"integer","format":"int64"},"type":{"$ref":"#/components/schemas/agent_BackupRestoreType"},"topic":{"type":"string"},"connectCluster":{"type":"string"},"connectorName":{"type":"string"},"connectorVersion":{"type":"string"},"s3Location":{"type":"string"},"reference":{"type":"string"}}},"agent_BackupRestoreType":{"type":"string","enum":["Backup","Restore"]}}},"paths":{"/api/v1/environments/{environment}/proxy/api/v1/s3/backups":{"get":{"tags":["agent_BackupRestore"],"summary":"List all backup/restore items","description":"List all backup/restore items","operationId":"listBackupRestoreItems","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/agent_BackupRestoreItem"}}}}},"400":{"description":"The request input was invalid","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Authentication error","content":{"text/plain":{"schema":{"type":"string"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"text/plain":{"schema":{"type":"string"}}}},"403":{"description":"Authorisation error","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"The requested resource cannot be found","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"An internal server error has occurred","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```
