Object of repository objects.
Each repositroy has a fs
and password
key.
Example:
{
"test": {
"fs": "pool/test",
"password": "qwe123"
}
}
- Code: 200
- Content:
["testing-20140510"]
- Code: 500
- Content:
{"status":"error","error":{"killed":false,"code":1,"signal":null},"message":"Error: Command failed: Unable to open /dev/zfs: Permission denied.; Unable to open /dev/zfs: Permission denied."}
curl -u test:qwe123 http://repo.example.com:8080/snapshot
["testing-20140510"]
- name
- Code: 200
- Content:
{"status":"success"}
- Code: 500 or 406
- Content:
{"status":"error","error":"invalid name"}
curl -u test:qwe123 -X POST -d "name=x" http://repo.example.com:8080/snapshot
{"status":"success"}
- name
- Code: 200
- Content:
{"status":"success"}
- Code: 500 or 406
- Content:
{"status":"error","error":{"killed":false,"code":1,"signal":null},"message":"Error: Command failed: could not find any snapshots to destroy; check snapshot names."}
curl -u test:qwe123 -X DELETE -d "name=x" http://repo.example.com:8080/snapshot
{"status":"success"}
- Code: 200
- Content:
{"testing":"1"}
- Code: 500
- Content:
{"status":"error","error":{"killed":false,"code":1,"signal":null},"message":"Error: Command failed: Unable to open /dev/zfs: Permission denied.; Unable to open /dev/zfs: Permission denied."}
curl -u test:qwe123 http://repo.example.com:8080/alias
{"testing":"1"}
- source (existing zfs snapshot)
- target (preferred alias name)
- Code: 200
- Content:
{"status":"success"}
- Code: 500
- Content:
{"status":"error","error":{"errno":47,"code":"EEXIST","path":"/pool/mirror-ubuntu/.zfs/snapshot/1"},"message":"Error: EEXIST, symlink '/pool/mirror-ubuntu/.zfs/snapshot/1'"}
curl -u test:qwe123 -X POST -d "source=1" -d "target=testing" http://repo.example.com:8080/alias
{"status":"success"}
- source (existing zfs snapshot)
- target (preferred alias name)
- Code: 200
- Content:
{"status":"success"}
- Code: 500
- Content:
{"status":"error","error":{"errno":47,"code":"EEXIST","path":"/pool/mirror-ubuntu/.zfs/snapshot/1"},"message":"Error: EEXIST, symlink '/pool/mirror-ubuntu/.zfs/snapshot/1'"}
curl -u test:qwe123 -X PUT -d "source=example" -d "target=testing" http://repo.example.com:8080/alias
{"status":"success"}
- name
- Code: 200
- Content:
{"status":"success"}
- Code: 500
- Content:
{"status":"error","error":{"errno":34,"code":"ENOENT","path":"/pool/mirror-ubuntu/.alias/testing"},"message":"Error: ENOENT, unlink '/pool/mirror-ubuntu/.alias/testing'"}
curl -u test:qwe123 -X DELETE -d "name=testing" http://repo.example.com:8080/alias