요청하신 페이지는 현재 사용 중인 언어로 제공되지 않습니다. Chrome에 내장된 번역 기능을 사용하면 어떤 웹페이지라도 원하는 언어로 즉시 번역할 수 있습니다.

Elastifile REST API using CLI (Quick Reference)

This article is for those who are interesting in quick reference to run REST API commands against the Elastifile system using CLI.

In the code below you can find a general authentication and some API calls.
 

You can always refer to 'REST API Docs' for more details under the following link from your Elastifile web interface:

REST API Docs Menu

 

 

Start API session for the EMS
EMS_IP=35.226.102.236 (example)

curl -k -D session.txt -H "Content-Type: application/json" -X POST -d '{"user": {"login":"admin","password":"'changeme'"}}' https://$EMS_IP/api/sessions


Get system total capacity
curl -k -s -b session.txt --request GET --url https://$EMS_IP/api/system_statistics/  | tr -d '\n' | cut -c6- | jq '.[0].capacity'
{
  "bytes": 61033062334464
}
curl -k -s -b session.txt --request GET --url https://$EMS_IP/api/system_statistics/  | tr -d '\n' | cut -c6- | jq '.[0].free'
{
  "bytes": 58385789321216
}


Get list of DC names
curl -k -s -b session.txt --request GET --url https://$EMS_IP/api/data_containers | tr -d '\n' | cut -c6- | jq '.[].name'
Get hard and soft quota for DC
curl -k -s -b session.txt --request GET --url https://$EMS_IP/api/data_containers | tr -d '\n' | cut -c6- | jq '.[1].hard_quota'
{
  "bytes": 1073741824000
}

curl -k -s -b session.txt --request GET --url https://$EMS_IP/api/data_containers | tr -d '\n' | cut -c6- | jq '.[1].soft_quota'
{
  "bytes": 536870912000
}


Modify soft quota on DC
curl -k -s -b session.txt -H "Content-Type: application/json" --request PUT --url https://$EMS_IP/api/data_containers/2 -d '{"soft_quota":{"bytes":805306368000}}'

curl -k -s -b session.txt --request GET --url https://$EMS_IP/api/data_containers | tr -d '\n' | cut -c6- | jq '.[1].soft_quota'
{
  "bytes": 805306368000
}

Was this helpful?

How can we improve it?
true
Search
Clear search
Close search
Main menu
14805310560402761471
true
Search Help Center
true
true
true
false
false