Jobs

Create #

Parameters


string name


(array) config config

Config


(array) compute compute

See Compute help


(array) storage storage

See Storage


(array) schedules schedules

See Schedules Help


int recipe_id

See Backup Solutions


string encryption_key_id

(Optional) Encryption Key ID to use with this Job.


integer proxy_id

(Optional) Proxy ID to use with this Job.

                            POST
                            /v1/jobs
                        
                           
curl https://api.snapshooter.com/v1/jobs \
-X POST \
--header 'Authorization: Bearer API_TOKEN_HERE' \
HTTP/2 201
{
"data": {
"id": "0319170e-2394-425c-a1c2-96be9810314c",
"name": "Demo Job",
"recipe": "file-backups",
"compute": {
"type": "server",
"server_id": 102,
"server": {
"id": 102,
"host": "10.0.33.142",
"user": "simon",
"port": 22,
"name": "Demo SnapShooter",
"created_at": "2022-01-11T06:40:29.000000Z",
"last_used": null,
"status": "success",
"key": {
"id": 102,
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDJEHdNyNDoSpUXH9X0gVhzFzYTFPC9fPtUs3O3y0oFk5/b7dJB7dIQ2AxdYANWm2dhbSPD5Dw+ff1NRMeHINpFLEGFSRoExGXdLDEGsB9LhWAEzgAEQvKZRMfrdrkp1+SzFoyq/7y0LqUMZLvNKBaO5Srb//RI8IilFu3Ll6MhbXoJltsUN2FkppS0XgQh1krsfymAON+UH/2lpYh6BDpR8ygs5aGVWZ9LmjpUnOT0q8VFVqWoGb1FzOmQhZZIuu1H3U7lKsHi/7aLgiyMw0AL7GmMrwbN4ZldavanOLPE/HApr7msVZb6wZ2Z98JQPGT783cO4lTgXAS20CRYyJo1mckmBOscKLUck7/9Fu2AMaw/z+KmYA2WkxPxye8C1AUUa8hDBdaO5R2HhW/saf292K4zV0eHNKmib0pV8DuCgLbF4pmYdNE+gZ0EjbvSge+obhjmLlvmkioELo0vDhR8GKz+uN5fnm5DaAM352BalyQk/HLRcf3a/ul6x+hZsNUl/KnQTsPc6wzhf0KMSYXAF0/+utvjq/MIOZf/j6i+brVk7jHwYUzhIPrlYd78iEACedLjZaeJWHhQJ/UMiXGljXrCArUz9kw8mQD1rJ+itb4OYkuMFULNz9rRJIO5y74Ze1mEFvKjsu02eN7dSllrWy1Lg7OcmXcLhuoqjcRx8w== bot@snapshooter.com",
"name": "Staging Key",
"created_at": "2022-01-11T06:40:29.000000Z",
"last_used": "2022-01-11T06:40:30.000000Z"
}
}
},
"config": {
"root_path": {
"value": "/",
"label": "Root Paths",
"type": "textarea"
},
"exclude": {
"value": "/etc\n/var\n/sys\n/proc",
"label": "Exclude List",
"type": "textarea"
},
"compression_level": {
"value": 6,
"label": "Compression Level",
"type": "number"
},
"use_sudo": {
"value": "False",
"label": "Run using Sudo?",
"type": "checkbox"
}
},
"last_ran_at": null,
"created_at": "2022-01-11T06:40:31.000000Z",
"updated_at": "2022-01-11T06:40:31.000000Z",
"schedule": [
{
"id": 15,
"schedule_name": "main",
"schedule_order": 0,
"status": "active",
"frequency": 30,
"frequency_mode": "minute",
"cron": "0 * * * *",
"timezone": "UTC",
"run_offset": 5,
"retention": {
"hourly": 7,
"daily": 7,
"weekly": 7,
"monthly": 7
},
"resource_type": "BackupJob",
"resource_id": "0319170e-2394-425c-a1c2-96be9810314c"
}
],
"storage": [
{
"id": 40,
"name": "main",
"provider": "digitalocean",
"region": "fra1",
"bucket": "snapshooter-test",
"endpoint": null,
"estimated_size": 0,
"priority": 1
}
],
"last_backups": []
}
}

Examples

curl -X POST https://api.snapshooter.com/v1/jobs \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"recipe_id": 1,
"name": "Demo File Backup",
"config": {
"root_path": "/",
"compression_level": 6
},
"compute": {
"type": "server",
"server_id": 1
},
"storage": [
{
"priority": 1,
"storage_id": 1232
}
],
"schedules": [
{
"order": 1,
"timezone": "UTC",
"retention_daily": 7
}
]
}
DATA
curl -X POST https://api.snapshooter.com/v1/jobs \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"recipe_id": 28,
"name": "Demo MySQL Backup",
"config": {
"mysql_username": "snapshooter-demo",
"mysql_password": "<Database Password>",
"mysql_host": "demo-mysql.example.com",
"mysql_port": 3306,
"mysql_database": "my-popular-minecraft-server",
"compression_level": 6
},
"compute": {
"type": "ss_serverless",
"region": 'eu'
},
"storage": [
{
"priority": 1,
"storage_id": 1232
}
],
"schedules": [
{
"order": 1,
"timezone": "UTC",
"retention_daily": 7
}
]
}
DATA
curl -X POST https://api.snapshooter.com/v1/jobs \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"recipe_id": 8,
"name": "Demo Laravel Forge Backup",
"config": {
"backup_storage_folder": true,
"compression_level": 6
},
"compute": {
"type": "server",
"server_id": 1
},
"storage": [
{
"priority": 1,
"storage_id": 1232
}
],
"schedules": [
{
"order": 1,
"timezone": "UTC",
"retention_daily": 7
}
]
}
DATA
curl -X POST https://api.snapshooter.com/v1/jobs \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"recipe_id": 1,
"name": "Demo URL Backup",
"config": {
"url": "example.com",
"use_compression": true,
"compression_level": 6
},
"compute": {
"type": "server",
"server_id": 1
},
"storage": [
{
"priority": 1,
"storage_id": 1232
}
],
"schedules": [
{
"order": 1,
"timezone": "UTC",
"retention_daily": 7
}
]
}
DATA

Errors


Compute Options:

server - Your server connected via SSH connection

ss_serverless - SnapShooter Serverless workers, region required, EU or US.

ss_agent - Your server connected via the agent

List #

URL Parameters


string host (optional)

Filter jobs by connected Server Host address


string sort (optional)

Parameter to sort by. Must be one of the following: id, name, last_ran_at, created_at, updated_at. Default direction is ascending, to request a descending order you can prefix the parameter value with a dash: sort=-created_at.


datetime modified_since (optional)

Filter jobs that have only been modified after the given date time.


integer page_size (optional)

Amount of results to display per page. Must be betwen 15 and 100.

                            GET
                            /v1/jobs 
                        
                           
curl https://api.snapshooter.com/v1/jobs \
-X GET \
--header 'Authorization: Bearer API_TOKEN_HERE' \
HTTP/2 200
{
"data": [
{
"id": "c6757905-4ec5-49d9-bc8e-3f53ff29f9e3",
"name": "Server File",
"recipe": "file-backups",
"compute_type": "server",
"compute": {
"type": "server",
"server_id": 3,
"server": {
"id": 3,
"host": "10.0.33.142",
"user": "simon",
"port": 22,
"name": "docker2",
"created_at": "2021-12-14T14:19:56.000000Z",
"last_used": "2021-12-30T12:39:14.000000Z",
"status": "success",
"key": {
"id": 6112328,
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC1KJw5YlnZapvLdHBauy4W+MXunQDGIXVWqxS+7oIhLSFQYcjoIxy4bmzYWci2tiNJ5SBswbkndugo7uDNBf1wyEw7sNEmgDytMeDDvqBJ9Zq5z/qVf76Ro642wPdhaErUR7XgJsB90mr5Ci1M5PtFKr2H7ZVgtII5qGUCD9j4sbX/wtX9Fwi+dumuGAUkxP5o/VMoByiec5p5rF3BlobGcmkL46a7iderT3u+fJiiWkzPV7Z6o9VsVXK4mCGZwnoLZgpII0KBPzWZfO3bAq/NYG9ZUw5hB5qSsbaKsCh+a7Re4lJOhVofvznsKTiwVv4IRIWS0XbWl0bluU0HwwBA9v0rWCggukLeS9BKND24FAcadWBAP721GfNoCQ5egUpjblNzCISXmli8VVp5VDd1nFvKc4I0jjfaaX7mpbwLn3Gsf8hrDeZ5XwK8kZDiPAi6y2wRD/6AVyvnyFxiLGUJFV81cRI0z2M4LPE453qiAZy5EjeU4/Ku8ZM/9uvRHFOXr8tRG1L9EOK9Ji+HCxa54t2NqXXuUHaZFSRMkRl4eW7Q1Pv5FZw2ORChDIleeIYp36LRnW2kG+1qDHRsT0dBBzgKM6WHpwvVQRzwgJ/Z8v2lxwr7VL64AtwMFTsKvzPJtkl0IE1DS7fXjbaqs+rX+XjsNvFzoSw7pbE826Uhsw== bot@snapshooter.com",
"name": "SnapShooter 2021-12-14 14:19:48",
"created_at": "2021-12-14T14:19:48.000000Z",
"last_used": "2021-12-30T12:39:35.000000Z"
}
}
},
"config": {
"root_path": {
"value": "/home/simon/backup",
"label": "Root Paths",
"type": "textarea"
},
"exclude": {
"value": "/backups\n/boot\n/run\n/proc\n/sys\n/mnt\n/media\n/dev\n/var/run\n/var/cache\n/var/tmp\n/var/lib/apt/lists\n/var/lib/lxcfs\n/bin\n/lib\n/lib64\n/sbin\n/usr/share\n/usr/src\n/usr/lib\n/usr/bin\n/usr/sbin\n/swap\n/swapfile\n/home/*/.gvfs\n/home/*/.cache\n/home/*/.local/share/Trash\n/tmp\n",
"label": "Exclude List",
"type": "textarea"
},
"compression_level": {
"value": 6,
"label": "Compression Level",
"type": "number"
},
"use_sudo": {
"value": "True",
"label": "Run using Sudo?",
"type": "checkbox"
}
},
"last_ran_at": "2021-12-30T12:39:00.000000Z",
"created_at": "2021-12-14T14:19:37.000000Z",
"updated_at": "2021-12-30T12:39:00.000000Z",
"schedule": [
{
"id": 3,
"schedule_name": "main",
"schedule_order": 0,
"status": "active",
"frequency": 24,
"frequency_mode": "hour",
"cron": "0 * * * *",
"timezone": "UTC",
"run_offset": 0,
"retention": {
"hourly": 0,
"daily": 12,
"weekly": 0,
"monthly": 0
},
"resource_type": "BackupJob",
"resource_id": "c6757905-4ec5-49d9-bc8e-3f53ff29f9e3"
}
],
"storage": [
{
"id": 3,
"name": "SnapShooter EU (Ireland)",
"provider": "snapshooter",
"region": "eu-west-1",
"bucket": "9ewsy1.free.eu-west-1.snapshooter.cloud",
"endpoint": null
}
],
"last_backups": [
{
"id": "b8ee1bb5-47ff-48a2-a134-376c92be8c75",
"job_id": "c6757905-4ec5-49d9-bc8e-3f53ff29f9e3",
"tags": {
"manual": 1,
"hourly": 0,
"daily": 0,
"weekly": 0,
"monthly": 0
},
"s3_directory": "snapshooter/c6757905-server-file/2021/12/30/12-38",
"created_at": "2021-12-30T12:38:59.000000Z",
"started_at": "2021-12-30T12:39:00.000000Z",
"completed_at": "2021-12-30T12:39:14.000000Z",
"status": "completed",
"monitoring_available": true
},
{
"id": "1970047d-6e58-4c9b-a84e-cfbe68fb545d",
"job_id": "c6757905-4ec5-49d9-bc8e-3f53ff29f9e3",
"tags": {
"manual": 1,
"hourly": 0,
"daily": 0,
"weekly": 0,
"monthly": 0
},
"s3_directory": "snapshooter/c6757905-server-file/2021/12/30/12-36",
"created_at": "2021-12-30T12:36:13.000000Z",
"started_at": "2021-12-30T12:36:14.000000Z",
"completed_at": "2021-12-30T12:36:27.000000Z",
"status": "completed",
"monitoring_available": true
},
{
"id": "6f2e1aa7-7e6e-417d-b77a-dfec8c400804",
"job_id": "c6757905-4ec5-49d9-bc8e-3f53ff29f9e3",
"tags": {
"manual": 1,
"hourly": 0,
"daily": 0,
"weekly": 0,
"monthly": 0
},
"s3_directory": "snapshooter/c6757905-server-file/2021/12/30/12-31",
"created_at": "2021-12-30T12:31:43.000000Z",
"started_at": "2021-12-30T12:31:44.000000Z",
"completed_at": "2021-12-30T12:31:52.000000Z",
"status": "completed_with_errors",
"monitoring_available": true
}
]
},
{
"id": "127906c7-4599-4d87-94b0-33c9a45c7ea8",
"name": "URL Backup",
"recipe": "url-backups",
"compute_type": "server",
"compute": {
"type": "server",
"server_id": 3,
"server": {
"id": 3,
"host": "10.0.33.142",
"user": "simon",
"port": 22,
"name": "docker2",
"created_at": "2021-12-14T14:19:56.000000Z",
"last_used": "2021-12-30T12:39:14.000000Z",
"status": "success",
"key": {
"id": 6112328,
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC1KJw5YlnZapvLdHBauy4W+MXunQDGIXVWqxS+7oIhLSFQYcjoIxy4bmzYWci2tiNJ5SBswbkndugo7uDNBf1wyEw7sNEmgDytMeDDvqBJ9Zq5z/qVf76Ro642wPdhaErUR7XgJsB90mr5Ci1M5PtFKr2H7ZVgtII5qGUCD9j4sbX/wtX9Fwi+dumuGAUkxP5o/VMoByiec5p5rF3BlobGcmkL46a7iderT3u+fJiiWkzPV7Z6o9VsVXK4mCGZwnoLZgpII0KBPzWZfO3bAq/NYG9ZUw5hB5qSsbaKsCh+a7Re4lJOhVofvznsKTiwVv4IRIWS0XbWl0bluU0HwwBA9v0rWCggukLeS9BKND24FAcadWBAP721GfNoCQ5egUpjblNzCISXmli8VVp5VDd1nFvKc4I0jjfaaX7mpbwLn3Gsf8hrDeZ5XwK8kZDiPAi6y2wRD/6AVyvnyFxiLGUJFV81cRI0z2M4LPE453qiAZy5EjeU4/Ku8ZM/9uvRHFOXr8tRG1L9EOK9Ji+HCxa54t2NqXXuUHaZFSRMkRl4eW7Q1Pv5FZw2ORChDIleeIYp36LRnW2kG+1qDHRsT0dBBzgKM6WHpwvVQRzwgJ/Z8v2lxwr7VL64AtwMFTsKvzPJtkl0IE1DS7fXjbaqs+rX+XjsNvFzoSw7pbE826Uhsw== bot@snapshooter.com",
"name": "SnapShooter 2021-12-14 14:19:48",
"created_at": "2021-12-14T14:19:48.000000Z",
"last_used": "2021-12-30T12:39:35.000000Z"
}
}
},
"config": {
"url": {
"value": "**not set**",
"label": "Download URL",
"type": "text"
}
},
"last_ran_at": "2021-12-22T13:11:52.000000Z",
"created_at": "2021-12-15T06:44:59.000000Z",
"updated_at": "2021-12-22T13:11:52.000000Z",
"schedule": [
{
"id": 4,
"schedule_name": "main",
"schedule_order": 0,
"status": "active",
"frequency": 24,
"frequency_mode": "hour",
"cron": "0 * * * *",
"timezone": "UTC",
"run_offset": 0,
"retention": {
"hourly": 0,
"daily": 1,
"weekly": 0,
"monthly": 0
},
"resource_type": "BackupJob",
"resource_id": "127906c7-4599-4d87-94b0-33c9a45c7ea8"
}
],
"storage": [
{
"id": 3,
"name": "SnapShooter EU (Ireland)",
"provider": "snapshooter",
"region": "eu-west-1",
"bucket": "9ewsy1.free.eu-west-1.snapshooter.cloud",
"endpoint": null
}
],
"last_backups": [
{
"id": "13e7b82a-a6a3-4728-ad7d-2d3d10703c91",
"job_id": "127906c7-4599-4d87-94b0-33c9a45c7ea8",
"tags": {
"manual": 1,
"hourly": 0,
"daily": 0,
"weekly": 0,
"monthly": 0
},
"s3_directory": "snapshooter/127906c7-url-backup/2021/12/22/13-11",
"created_at": "2021-12-22T13:11:51.000000Z",
"started_at": "2021-12-22T13:11:52.000000Z",
"completed_at": "2021-12-22T13:11:57.000000Z",
"status": "failed",
"monitoring_available": true
},
{
"id": "d4e047e3-1c68-4dc9-86d3-2c8a70dfa42a",
"job_id": "127906c7-4599-4d87-94b0-33c9a45c7ea8",
"tags": {
"manual": 1,
"hourly": 0,
"daily": 0,
"weekly": 0,
"monthly": 0
},
"s3_directory": "snapshooter/127906c7-url-backup/2021/12/22/13-11",
"created_at": "2021-12-22T13:11:39.000000Z",
"started_at": "2021-12-22T13:11:41.000000Z",
"completed_at": "2021-12-22T13:11:45.000000Z",
"status": "failed",
"monitoring_available": true
},
{
"id": "0729590f-64a8-4c19-8ee1-a248443525e0",
"job_id": "127906c7-4599-4d87-94b0-33c9a45c7ea8",
"tags": {
"manual": 1,
"hourly": 0,
"daily": 0,
"weekly": 0,
"monthly": 0
},
"s3_directory": "snapshooter/127906c7-url-backup/2021/12/15/11-31",
"created_at": "2021-12-15T11:31:23.000000Z",
"started_at": "2021-12-15T11:31:24.000000Z",
"completed_at": "2021-12-15T11:32:31.000000Z",
"status": "completed",
"monitoring_available": true
}
]
}
],
"links": {
},
"meta": {
}
}

Show #

URL Parameters

This endpoint does not accept any parameters
                            GET
                            /v1/jobs/{job_id}
                        
                           
curl https://api.snapshooter.com/v1/jobs/{job_id} \
-X GET \
--header 'Authorization: Bearer API_TOKEN_HERE'
HTTP/2 200
{
"data": {
"id": "127906c7-4599-4d87-94b0-33c9a45c7ea8",
"name": "URL Backup",
"recipe": "url-backups",
"compute_type": "server",
"compute": {
"type": "server",
"server_id": 3,
"server": {
"id": 3,
"host": "10.0.33.142",
"user": "simon",
"port": 22,
"name": "docker2",
"created_at": "2021-12-14T14:19:56.000000Z",
"last_used": "2021-12-30T12:39:14.000000Z",
"status": "success",
"key": {
"id": 6112328,
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC1KJw5YlnZapvLdHBauy4W+MXunQDGIXVWqxS+7oIhLSFQYcjoIxy4bmzYWci2tiNJ5SBswbkndugo7uDNBf1wyEw7sNEmgDytMeDDvqBJ9Zq5z/qVf76Ro642wPdhaErUR7XgJsB90mr5Ci1M5PtFKr2H7ZVgtII5qGUCD9j4sbX/wtX9Fwi+dumuGAUkxP5o/VMoByiec5p5rF3BlobGcmkL46a7iderT3u+fJiiWkzPV7Z6o9VsVXK4mCGZwnoLZgpII0KBPzWZfO3bAq/NYG9ZUw5hB5qSsbaKsCh+a7Re4lJOhVofvznsKTiwVv4IRIWS0XbWl0bluU0HwwBA9v0rWCggukLeS9BKND24FAcadWBAP721GfNoCQ5egUpjblNzCISXmli8VVp5VDd1nFvKc4I0jjfaaX7mpbwLn3Gsf8hrDeZ5XwK8kZDiPAi6y2wRD/6AVyvnyFxiLGUJFV81cRI0z2M4LPE453qiAZy5EjeU4/Ku8ZM/9uvRHFOXr8tRG1L9EOK9Ji+HCxa54t2NqXXuUHaZFSRMkRl4eW7Q1Pv5FZw2ORChDIleeIYp36LRnW2kG+1qDHRsT0dBBzgKM6WHpwvVQRzwgJ/Z8v2lxwr7VL64AtwMFTsKvzPJtkl0IE1DS7fXjbaqs+rX+XjsNvFzoSw7pbE826Uhsw== bot@snapshooter.com",
"name": "SnapShooter 2021-12-14 14:19:48",
"created_at": "2021-12-14T14:19:48.000000Z",
"last_used": "2021-12-30T12:39:35.000000Z"
}
}
},
"config": {
"url": {
"value": "**not set**",
"label": "Download URL",
"type": "text"
}
},
"last_ran_at": "2021-12-22T13:11:52.000000Z",
"created_at": "2021-12-15T06:44:59.000000Z",
"updated_at": "2021-12-22T13:11:52.000000Z",
"schedule": [
{
"id": 4,
"schedule_name": "main",
"schedule_order": 0,
"status": "active",
"frequency": 24,
"frequency_mode": "hour",
"cron": "0 * * * *",
"timezone": "UTC",
"run_offset": 0,
"retention": {
"hourly": 0,
"daily": 1,
"weekly": 0,
"monthly": 0
},
"resource_type": "BackupJob",
"resource_id": "127906c7-4599-4d87-94b0-33c9a45c7ea8"
}
],
"storage": [
{
"id": 3,
"name": "SnapShooter EU (Ireland)",
"provider": "snapshooter",
"region": "eu-west-1",
"bucket": "9ewsy1.free.eu-west-1.snapshooter.cloud",
"endpoint": null
}
],
"last_backups": [
{
"id": "13e7b82a-a6a3-4728-ad7d-2d3d10703c91",
"job_id": "127906c7-4599-4d87-94b0-33c9a45c7ea8",
"tags": {
"manual": 1,
"hourly": 0,
"daily": 0,
"weekly": 0,
"monthly": 0
},
"s3_directory": "snapshooter/127906c7-url-backup/2021/12/22/13-11",
"created_at": "2021-12-22T13:11:51.000000Z",
"started_at": "2021-12-22T13:11:52.000000Z",
"completed_at": "2021-12-22T13:11:57.000000Z",
"status": "failed",
"monitoring_available": true
},
{
"id": "d4e047e3-1c68-4dc9-86d3-2c8a70dfa42a",
"job_id": "127906c7-4599-4d87-94b0-33c9a45c7ea8",
"tags": {
"manual": 1,
"hourly": 0,
"daily": 0,
"weekly": 0,
"monthly": 0
},
"s3_directory": "snapshooter/127906c7-url-backup/2021/12/22/13-11",
"created_at": "2021-12-22T13:11:39.000000Z",
"started_at": "2021-12-22T13:11:41.000000Z",
"completed_at": "2021-12-22T13:11:45.000000Z",
"status": "failed",
"monitoring_available": true
},
{
"id": "0729590f-64a8-4c19-8ee1-a248443525e0",
"job_id": "127906c7-4599-4d87-94b0-33c9a45c7ea8",
"tags": {
"manual": 1,
"hourly": 0,
"daily": 0,
"weekly": 0,
"monthly": 0
},
"s3_directory": "snapshooter/127906c7-url-backup/2021/12/15/11-31",
"created_at": "2021-12-15T11:31:23.000000Z",
"started_at": "2021-12-15T11:31:24.000000Z",
"completed_at": "2021-12-15T11:32:31.000000Z",
"status": "completed",
"monitoring_available": true
}
]
}
}

Errors


Update #

Parameters


array schedules


array storage

                            PATCH
                            /v1/jobs/{job_id}
                        
                           
curl https://api.snapshooter.com/v1/jobs/{job_id} \
-X PATCH \
--header 'Authorization: Bearer API_TOKEN_HERE' \
HTTP/2 204
//Empty Response Body

Examples

curl -X POST https://api.snapshooter.com/v1/jobs/{job_id} \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"storage": [
{
"storage_id": 84,
"priority": 1
},
{
"storage_id": 45,
"priority": 2
}
]
}
DATA
curl -X POST https://api.snapshooter.com/v1/jobs/{job_id} \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"schedules": [
{
"cron": "0 * * * *",
"timezone": "UTC"
},
{
"cron": "0 0 * * MON",
"timezone": "America/Mexico_City"
}
]
}
DATA

Errors


Delete #

Parameters

This endpoint does not accept any parameters
                            DELETE
                            /v1/jobs/{job_id}
                        
                           
curl https://api.snapshooter.com/v1/jobs/{job_id} \
-X DELETE \
--header 'Authorization: Bearer API_TOKEN_HERE'
HTTP/2 204
//Empty Response Body

Errors


Backups

List Backups #

URL Parameters


string status (optional)

Filter by backup status. Options: pending, running, expired, failed, completed, completed_with_errors


object tags (optional)

Filter by specific tags. Options are specified as booleans: manual, hourly, daily, weekly, monthly.


string sort (optional)

Parameter to sort by. Must be one of the following: id, name, created_at, started_at, completed_at. Default direction is ascending, to request a descending order you can prefix the parameter value with a dash: sort=-created_at.


datetime started_since (optional)

Filter backups that have been started after the given date time.


datetime completed_since (optional)

Filter backups that have been completed after the given date time.


integer page_size (optional)

Amount of results to display per page. Must be betwen 15 and 100.

                            GET
                            /v1/jobs/{job_id}/backups
                        
                           
curl https://api.snapshooter.com/v1/jobs/{job_id}/backups \
-X GET \
--header 'Authorization: Bearer API_TOKEN_HERE' \
HTTP/2 200
{
"data": [
{
"id": "0e3ee98d-32c5-48be-b788-0c78fab85a23",
"job_id": "9c6d63d1-e309-434a-9e13-63da4af49329",
"status": "completed_with_errors",
"tags": {
"manual": false,
"hourly": false,
"daily": true,
"weekly": true,
"monthly": true
},
"s3_directory": "/tmp",
"created_at": "2022-06-14T14:53:14.000000Z",
"started_at": "2022-06-14T14:53:14.000000Z",
"completed_at": "2022-06-14T14:53:14.000000Z",
"monitoring_available": false,
"encryption_key": "LS0tLS1CRU...URSBLRVktLS0tLQ==",
"files": [
{
"id": "...",
"name": "...",
"size": "19023 bytes",
"url": "..."
}
]
},
{
"id": "21824332-16a3-4451-88df-245a1bcc7fe9",
"job_id": "9c6d63d1-e309-434a-9e13-63da4af49329",
"status": "failed",
"tags": {
"manual": false,
"hourly": true,
"daily": true,
"weekly": false,
"monthly": false
},
"s3_directory": "/tmp",
"created_at": "2022-06-14T14:53:14.000000Z",
"started_at": "2022-06-14T14:53:14.000000Z",
"completed_at": "2022-06-14T14:53:14.000000Z",
"monitoring_available": true,
"encryption_key": "LS0tLS1CRU...URSBLRVktLS0tLQ==",
"files": [
{
"id": "...",
"name": "...",
"size": "42 bytes",
"url": "..."
}
]
},
{
"id": "29046968-ab26-4eae-b647-9098bddd5e10",
"job_id": "9c6d63d1-e309-434a-9e13-63da4af49329",
"status": "completed",
"tags": {
"manual": false,
"hourly": false,
"daily": true,
"weekly": false,
"monthly": false
},
"s3_directory": "/tmp",
"created_at": "2022-06-14T14:53:14.000000Z",
"started_at": "2022-06-14T14:53:14.000000Z",
"completed_at": "2022-06-14T14:53:14.000000Z",
"monitoring_available": true,
"encryption_key": "LS0tLS1CRU...URSBLRVktLS0tLQ==",
"files": [
{
"id": "...",
"name": "...",
"size": "100 bytes",
"url": "..."
}
]
}
],
"links": {},
"meta": {}
}

Errors


Start Backup #

Parameters


boolean is_manual

Should we tag the backup job as manual, if set to 1 all other tags are defaulted to 0
Example: true


boolean is_hourly

Should we tag the backup job as hourly
Example: false


boolean is_daily

Should we tag the backup job as daily
Example: false


boolean is_weekly

Should we tag the backup job as weekly
Example: false


boolean is_monthly

Should we tag the backup job as monthly
Example: false

                            POST
                            /v1/jobs/{job_id}/backups/start
                        
                           
curl https://api.snapshooter.com/v1/jobs/{job_id}/backups/start \
-X POST \
--header 'Authorization: Bearer API_TOKEN_HERE' \
-d is_manual="true" \
-d is_hourly="false" \
-d is_daily="false" \
-d is_weekly="false" \
-d is_monthly="false"
HTTP/2 202
{
"status": "starting",
"backup_id": "9e9b3492-d61f-4ce6-9492-59eb89d1a83a",
"url": "https://app.snapshooter.test/backup/9e9b3492-d61f-4ce6-9492-59eb89d1a83a",
"config": [],
"tags": {
"is_manual": false,
"is_hourly": false,
"is_daily": true,
"is_weekly": false,
"is_monthly": false
}
}

Examples

curl -X POST https://api.snapshooter.com/v1/jobs/{job_id}/backups/start \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"is_manual": true,
"is_hourly": false,
"is_daily": false,
"is_weekly": false,
"is_monthly": false
}
DATA
curl -X POST https://api.snapshooter.com/v1/jobs/{job_id}/backups/start \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"is_manual": false,
"is_hourly": true,
"is_daily": false,
"is_weekly": false,
"is_monthly": false
}
DATA
curl -X POST https://api.snapshooter.com/v1/jobs/{job_id}/backups/start \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"is_manual": false,
"is_hourly": false,
"is_daily": true,
"is_weekly": false,
"is_monthly": false
}
DATA
curl -X POST https://api.snapshooter.com/v1/jobs/{job_id}/backups/start \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"is_manual": false,
"is_hourly": false,
"is_daily": false,
"is_weekly": true,
"is_monthly": false
}
DATA
curl -X POST https://api.snapshooter.com/v1/jobs/{job_id}/backups/start \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"is_manual": false,
"is_hourly": false,
"is_daily": false,
"is_weekly": false,
"is_monthly": true
}
DATA

Errors


Delete All Backups #

Parameters

This endpoint does not accept any parameters
                            DELETE
                            /v1/jobs/{job_id}/backups
                        
                           
curl https://api.snapshooter.com/v1/jobs/{job_id}/backups \
-X DELETE \
--header 'Authorization: Bearer API_TOKEN_HERE'
HTTP/2 200
{
"message": "165 backups scheduled for deletion"
}

Errors


Encryptions

Enable Job Encryption #

Parameters


integer encryption_key_id

Encryption Key id to use with Job

                            POST
                            /v1/jobs/{job_id}/encryption-key
                        
                           
curl https://api.snapshooter.com/v1/jobs/{job_id}/encryption-key \
-X POST \
--header 'Authorization: Bearer API_TOKEN_HERE' \
HTTP/2 204
//Empty Response Body

Examples

curl -X POST https://api.snapshooter.com/v1/jobs/{job_id}/encryption-key \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"encryption_key_id": 481
}
DATA

Errors


Disable Job Encryption #

Parameters

This endpoint does not accept any parameters
                            DELETE
                            /v1/jobs/{job_id}/encryption-key
                        
                           
curl https://api.snapshooter.com/v1/jobs/{job_id}/encryption-key \
-X DELETE \
--header 'Authorization: Bearer API_TOKEN_HERE'
HTTP/2 204
//Empty Response Body

Errors


Proxy

Enable Job Proxy #

Parameters


integer proxy_id

The Proxy ID to use with this Job

                            POST
                            /v1/jobs/{job_id}/proxy
                        
                           
curl https://api.snapshooter.com/v1/jobs/{job_id}/proxy \
-X POST \
--header 'Authorization: Bearer API_TOKEN_HERE' \
HTTP/2 204
//Empty Response Body

Examples

curl -X POST https://api.snapshooter.com/v1/jobs/{job_id}/proxy \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"proxy_id": 13
}
DATA

Errors


Disable Job Proxy #

Parameters

This endpoint does not accept any parameters
                            DELETE
                            /v1/jobs/{job_id}/proxy
                        
                           
curl https://api.snapshooter.com/v1/jobs/{job_id}/proxy \
-X DELETE \
--header 'Authorization: Bearer API_TOKEN_HERE'
HTTP/2 204
//Empty Response Body

Errors


Schedules

Update Job Schedule #

Parameters


string timezone

Timezone in which to schedule your jobs


integer run_offset

Offset to run job after scheduled time

                            PATCH
                            /v1/jobs/{job_id}/schedules/{schedule_id}
                        
                           
curl https://api.snapshooter.com/v1/jobs/{job_id}/schedules/{schedule_id} \
-X PATCH \
--header 'Authorization: Bearer API_TOKEN_HERE' \
HTTP/2 204
//Empty Response Body

Examples

curl -X POST https://api.snapshooter.com/v1/jobs/{job_id}/schedules/{schedule_id} \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"timezone": "America/Mexico_City"
}
DATA
curl -X POST https://api.snapshooter.com/v1/jobs/{job_id}/schedules/{schedule_id} \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"run_offset": 10
}
DATA
curl -X POST https://api.snapshooter.com/v1/jobs/{job_id}/schedules/{schedule_id} \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"retention_hourly": 0,
"retention_daily": 0,
"retention_weekly": 1,
"retention_monthly": 0
}
DATA
curl -X POST https://api.snapshooter.com/v1/jobs/{job_id}/schedules/{schedule_id} \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"cron": "0 * * * *"
}
DATA

Errors


Storage

Update Job Storage #

Parameters


array storage

An array of storage configurations to use for the given job. Each configuration has a "storage_id" refering to the storage to use, and a "priority" for that storage.

                            PATCH
                            /v1/jobs/{job_id}/storage
                        
                           
curl https://api.snapshooter.com/v1/jobs/{job_id}/storage \
-X PATCH \
--header 'Authorization: Bearer API_TOKEN_HERE' \
HTTP/2 204
//Empty Response Body

Examples

curl -X POST https://api.snapshooter.com/v1/jobs/{job_id}/storage \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"storage": [
{
"storage_id": 84,
"priority": 1
},
{
"storage_id": 45,
"priority": 2
}
]
}
DATA

Errors


Was this page helpful?

Thank you for helping us improve!