List Community Categories
curl --request GET \
--url https://schoolmaker.co/api/v1/community/categories \
--header 'Authorization: Bearer <token>'import requests
url = "https://schoolmaker.co/api/v1/community/categories"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://schoolmaker.co/api/v1/community/categories', 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://schoolmaker.co/api/v1/community/categories",
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://schoolmaker.co/api/v1/community/categories"
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://schoolmaker.co/api/v1/community/categories")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://schoolmaker.co/api/v1/community/categories")
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{
"categories": [
{
"id": "33333333-3333-4333-8333-333333333333",
"name": "General",
"is_published": true,
"is_inline_question_category": false,
"is_closed": false,
"is_member_topic_creation_active": true
}
],
"pagination": {
"current_page": 1,
"total_pages": 1,
"total_count": 1
}
}{
"error": "Access denied"
}{
"error": "You do not have permission to perform this action"
}{
"error": "Record not found"
}{
"error": "Invalid arguments"
}Community
List Community Categories
Retrieves published community categories, including program question categories, ordered by position.
GET
/
community
/
categories
List Community Categories
curl --request GET \
--url https://schoolmaker.co/api/v1/community/categories \
--header 'Authorization: Bearer <token>'import requests
url = "https://schoolmaker.co/api/v1/community/categories"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://schoolmaker.co/api/v1/community/categories', 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://schoolmaker.co/api/v1/community/categories",
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://schoolmaker.co/api/v1/community/categories"
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://schoolmaker.co/api/v1/community/categories")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://schoolmaker.co/api/v1/community/categories")
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{
"categories": [
{
"id": "33333333-3333-4333-8333-333333333333",
"name": "General",
"is_published": true,
"is_inline_question_category": false,
"is_closed": false,
"is_member_topic_creation_active": true
}
],
"pagination": {
"current_page": 1,
"total_pages": 1,
"total_count": 1
}
}{
"error": "Access denied"
}{
"error": "You do not have permission to perform this action"
}{
"error": "Record not found"
}{
"error": "Invalid arguments"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Page number.
Required range:
1 <= x <= 10000Number of results per page. Maximum 30.
Required range:
1 <= x <= 30Was this page helpful?