curl --request GET \
--url https://api.opal.dev/v1/resources/{resource_id}/configuration-template \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.opal.dev/v1/resources/{resource_id}/configuration-template"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.opal.dev/v1/resources/{resource_id}/configuration-template', 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.opal.dev/v1/resources/{resource_id}/configuration-template",
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: Bearer <token>"
],
]);
$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.opal.dev/v1/resources/{resource_id}/configuration-template"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.opal.dev/v1/resources/{resource_id}/configuration-template")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opal.dev/v1/resources/{resource_id}/configuration-template")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"configuration_template_id": "06851574-e50d-40ca-8c78-f72ae6ab4304"
}Get the ID of the configuration template linked to a resource
Returns the ID of the configuration template that the resource is
currently linked to. The response body is
{"configuration_template_id": "<uuid>" | null}:
<uuid>is the ID of the configuration template the resource is linked to.nullmeans the resource is not linked to any configuration template and uses its own private configuration.
This endpoint only exposes the link between a resource and a
configuration template — it does not return the template’s own fields
(name, description, request configurations, visibility, etc.). To read
those, call GET /configuration-templates/{configuration_template_id}
with the ID returned here.
curl --request GET \
--url https://api.opal.dev/v1/resources/{resource_id}/configuration-template \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.opal.dev/v1/resources/{resource_id}/configuration-template"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.opal.dev/v1/resources/{resource_id}/configuration-template', 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.opal.dev/v1/resources/{resource_id}/configuration-template",
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: Bearer <token>"
],
]);
$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.opal.dev/v1/resources/{resource_id}/configuration-template"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.opal.dev/v1/resources/{resource_id}/configuration-template")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opal.dev/v1/resources/{resource_id}/configuration-template")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"configuration_template_id": "06851574-e50d-40ca-8c78-f72ae6ab4304"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the resource whose configuration template link is being read.
Response
The ID of the configuration template currently linked to the resource, or null if the resource uses its own private configuration.
A reference, by ID only, to the configuration template a resource is
linked to. This schema does not include any of the template's own
fields (name, description, request configurations, visibility, etc.) —
to read or modify those, use the /configuration-templates endpoints
with the ID carried here. A null configuration_template_id
indicates that the resource is not linked to a configuration template
and uses its own private configuration.
The ID of the configuration template that the resource is linked
to, or null if the resource is not linked to a configuration
template. Only the ID is exposed here; the template's own fields
are managed through the /configuration-templates endpoints.
"06851574-e50d-40ca-8c78-f72ae6ab4304"
Was this page helpful?