Check file share quota
curl --request POST \
--url https://api.gcore.com/cloud/v1/file_shares/{project_id}/{region_id}/check_limits \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"size": 5
}'import requests
url = "https://api.gcore.com/cloud/v1/file_shares/{project_id}/{region_id}/check_limits"
payload = { "size": 5 }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({size: 5})
};
fetch('https://api.gcore.com/cloud/v1/file_shares/{project_id}/{region_id}/check_limits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/cloud/v1/file_shares/{project_id}/{region_id}/check_limits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'size' => 5
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/cloud/v1/file_shares/{project_id}/{region_id}/check_limits"
payload := strings.NewReader("{\n \"size\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gcore.com/cloud/v1/file_shares/{project_id}/{region_id}/check_limits")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"size\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v1/file_shares/{project_id}/{region_id}/check_limits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"size\": 5\n}"
response = http.request(request)
puts response.read_body{
"sfs_count_limit": 10,
"sfs_count_requested": 1,
"sfs_count_usage": 1,
"sfs_size_limit": 100,
"sfs_size_requested": 50,
"sfs_size_usage": 90
}File Shares
Check file share quota
Check if regional quota is exceeded, if yes the number of additional quotas needed to create the specified File Share will be calculated
POST
/
cloud
/
v1
/
file_shares
/
{project_id}
/
{region_id}
/
check_limits
Check file share quota
curl --request POST \
--url https://api.gcore.com/cloud/v1/file_shares/{project_id}/{region_id}/check_limits \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"size": 5
}'import requests
url = "https://api.gcore.com/cloud/v1/file_shares/{project_id}/{region_id}/check_limits"
payload = { "size": 5 }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({size: 5})
};
fetch('https://api.gcore.com/cloud/v1/file_shares/{project_id}/{region_id}/check_limits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/cloud/v1/file_shares/{project_id}/{region_id}/check_limits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'size' => 5
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/cloud/v1/file_shares/{project_id}/{region_id}/check_limits"
payload := strings.NewReader("{\n \"size\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gcore.com/cloud/v1/file_shares/{project_id}/{region_id}/check_limits")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"size\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v1/file_shares/{project_id}/{region_id}/check_limits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"size\": 5\n}"
response = http.request(request)
puts response.read_body{
"sfs_count_limit": 10,
"sfs_count_requested": 1,
"sfs_count_usage": 1,
"sfs_size_limit": 100,
"sfs_size_requested": 50,
"sfs_size_usage": 90
}Authorizations
API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234_abcdef
Path Parameters
Project ID
Example:
1
Region ID
Example:
1
Body
application/json
File Share size in GiB
Required range:
x >= 1Example:
5
Response
200 - application/json
OK
Shared file system Count limit
Example:
10
Shared file system Count requested
Example:
1
Shared file system Count usage
Example:
1
Shared file system Size, GiB limit
Example:
100
Shared file system Size, GiB requested
Example:
50
Shared file system Size, GiB usage
Example:
90
Was this page helpful?