Get a blog category
curl --request GET \
--url https://{notifuseDomain}/api/blogCategories.get \
--header 'Authorization: Bearer <token>'import requests
url = "https://{notifuseDomain}/api/blogCategories.get"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{notifuseDomain}/api/blogCategories.get', 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://{notifuseDomain}/api/blogCategories.get",
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://{notifuseDomain}/api/blogCategories.get"
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://{notifuseDomain}/api/blogCategories.get")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{notifuseDomain}/api/blogCategories.get")
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{
"category": {
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"slug": "product",
"settings": {
"name": "Product",
"description": "Release notes and product announcements.",
"seo": {
"meta_title": "Release notes for October",
"meta_description": "Everything that shipped this month.",
"og_title": "<string>",
"og_description": "<string>",
"og_image": "https://cdn.example.com/og/october.png",
"canonical_url": "https://blog.example.com/product/october-release",
"keywords": [
"release",
"changelog"
],
"meta_robots": "index,follow"
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "either id or slug is required"
}{
"error": "<string>"
}{
"error": "Insufficient permissions: read access to blog required",
"resource": "blog",
"permission": "read"
}{
"error": "Failed to get category"
}Blog
Get a blog category
Retrieves a category by id or by slug; when both are given, id wins. Requires the blog read permission.
GET
/
api
/
blogCategories.get
Get a blog category
curl --request GET \
--url https://{notifuseDomain}/api/blogCategories.get \
--header 'Authorization: Bearer <token>'import requests
url = "https://{notifuseDomain}/api/blogCategories.get"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{notifuseDomain}/api/blogCategories.get', 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://{notifuseDomain}/api/blogCategories.get",
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://{notifuseDomain}/api/blogCategories.get"
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://{notifuseDomain}/api/blogCategories.get")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{notifuseDomain}/api/blogCategories.get")
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{
"category": {
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"slug": "product",
"settings": {
"name": "Product",
"description": "Release notes and product announcements.",
"seo": {
"meta_title": "Release notes for October",
"meta_description": "Everything that shipped this month.",
"og_title": "<string>",
"og_description": "<string>",
"og_image": "https://cdn.example.com/og/october.png",
"canonical_url": "https://blog.example.com/product/october-release",
"keywords": [
"release",
"changelog"
],
"meta_robots": "index,follow"
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "either id or slug is required"
}{
"error": "<string>"
}{
"error": "Insufficient permissions: read access to blog required",
"resource": "blog",
"permission": "read"
}{
"error": "Failed to get category"
}Authorizations
API token for authentication
Query Parameters
The ID of the workspace
The category ID. Either id or slug is required.
The category slug. Either id or slug is required.
Response
The category
Show child attributes
Show child attributes
