此示例显示如何使用简单的 HTTP get 请求来获取某些 JSON 数据:
> curl --user ${USER}:${PASSWORD} -k -i https://zfssa.example.com:215/api/nas/v1/pools/gold HTTP/1.1 200 OK Date: Tue, 23 Jul 2013 12:57:02 GMT Server: WSGIServer/0.1 Python/2.6.4 Content-Length: 284 Content-Type: application/json X-Zfs-Sa-Nas-Api: 1.0 { "pool": { "profile": "mirror", "name": "gold", "usage": { "available": 895468984832.0, "total": 895500681216.0, "dedupratio": 100, "used": 31696384.0 }, "peer": "00000000-0000-0000-0000-000000000000", "state": "online", "owner": "tanana", "asn": "314d252e-c42b-e844-dab1-a3bca680b563" } }