Get service's details
curl --request GET \
--url https://api.gcore.com/iam/clients/{clientId}/services/{serviceId} \
--header 'Authorization: <api-key>'import requests
url = "https://api.gcore.com/iam/clients/{clientId}/services/{serviceId}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/iam/clients/{clientId}/services/{serviceId}', 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/iam/clients/{clientId}/services/{serviceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/iam/clients/{clientId}/services/{serviceId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.gcore.com/iam/clients/{clientId}/services/{serviceId}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/iam/clients/{clientId}/services/{serviceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "CDN",
"client": 123,
"status": "paused",
"previous_status": "active",
"status_changed_at": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z",
"enabled": true,
"options": [
{
"id": 123,
"value": "<string>",
"value_type": "int",
"name": "<string>",
"category": "<string>",
"description": "<string>",
"title": "<string>"
}
],
"status_transition_options": [
{
"id": 123,
"value": "<string>",
"value_type": "int",
"name": "<string>",
"category": "<string>",
"description": "<string>",
"title": "<string>"
}
],
"deleted_date": "2023-11-07T05:31:56Z"
}Services
Get service's details
Returns list of client’s services.
GET
/
iam
/
clients
/
{clientId}
/
services
/
{serviceId}
Get service's details
curl --request GET \
--url https://api.gcore.com/iam/clients/{clientId}/services/{serviceId} \
--header 'Authorization: <api-key>'import requests
url = "https://api.gcore.com/iam/clients/{clientId}/services/{serviceId}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/iam/clients/{clientId}/services/{serviceId}', 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/iam/clients/{clientId}/services/{serviceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/iam/clients/{clientId}/services/{serviceId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.gcore.com/iam/clients/{clientId}/services/{serviceId}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/iam/clients/{clientId}/services/{serviceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "CDN",
"client": 123,
"status": "paused",
"previous_status": "active",
"status_changed_at": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z",
"enabled": true,
"options": [
{
"id": 123,
"value": "<string>",
"value_type": "int",
"name": "<string>",
"category": "<string>",
"description": "<string>",
"title": "<string>"
}
],
"status_transition_options": [
{
"id": 123,
"value": "<string>",
"value_type": "int",
"name": "<string>",
"category": "<string>",
"description": "<string>",
"title": "<string>"
}
],
"deleted_date": "2023-11-07T05:31:56Z"
}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
Response
OK.
Service's ID.
Service's name.
Available options:
CDN, STORAGE, STREAMING, DNS, DDOS, CLOUD Client's ID.
Status of the service.
Available options:
new, trial, trialend, active, paused, activating, deleted Example:
"paused"
Status of the service.
Available options:
new, trial, trialend, active, paused, activating, deleted Example:
"active"
When status was changed.
Trial start date.
Shows if a service is enabled or disabled.
List of service options.
Show child attributes
Show child attributes
List of status transition options.
Show child attributes
Show child attributes
Date and time when service's status will be changed to deleted.
Applicable only if current service's status is trialend or paused.
Was this page helpful?