Skip to content
Contents

Taxonomy

The three things a listing is organised by. Every endpoint here needs taxonomy:read and nothing else.

All six are read-only. Writing taxonomy reshapes what is already published — a renamed category moves a public URL, and a deleted one is refused by three foreign keys — so it happens in the console, where an operator can see what moves.

Categories

The whole tree, flattened, in tree order. parent_id, path and depth are everything you need to rebuild it. This is the one collection on the API that is not paged.

GET /api/v1/directories/DIRECTORY_ID/categories

taxonomy:read The capability a key must carry to call this.

List the directory's categories, whole tree, in tree order. This is the one collection that is not paged.

GET /api/v1/directories/DIRECTORY_ID/categories/ID

taxonomy:read The capability a key must carry to call this.

Read one category, including its parent, its path and its depth.

curl

curl -X GET \ -H "Authorization: Bearer YOUR_KEY" \ "https://directories.prosvita.io/api/v1/directories/DIRECTORY_ID/categories"

Ruby

require "net/http" require "json" uri = URI("https://directories.prosvita.io/api/v1/directories/DIRECTORY_ID/categories") request = Net::HTTP::Get.new(uri) request["Authorization"] = "Bearer YOUR_KEY" response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http| http.request(request) end puts JSON.parse(response.body)

Tags

Every tag in the directory, in name order, a page at a time, each with the number of listings carrying it.

GET /api/v1/directories/DIRECTORY_ID/tags

taxonomy:read The capability a key must carry to call this.

List the directory's tags, in name order, a page at a time.

GET /api/v1/directories/DIRECTORY_ID/tags/ID

taxonomy:read The capability a key must carry to call this.

Read one tag and how many listings carry it.

curl

curl -X GET \ -H "Authorization: Bearer YOUR_KEY" \ "https://directories.prosvita.io/api/v1/directories/DIRECTORY_ID/tags"

Ruby

require "net/http" require "json" uri = URI("https://directories.prosvita.io/api/v1/directories/DIRECTORY_ID/tags") request = Net::HTTP::Get.new(uri) request["Authorization"] = "Bearer YOUR_KEY" response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http| http.request(request) end puts JSON.parse(response.body)

Collections

Curated groups of listings. The index lists them; reading one also returns the category and tag rules that decide what it holds, and the cached listing count with the time it was counted.

GET /api/v1/directories/DIRECTORY_ID/collections

taxonomy:read The capability a key must carry to call this.

List the directory's collections, in their own order, a page at a time.

GET /api/v1/directories/DIRECTORY_ID/collections/ID

taxonomy:read The capability a key must carry to call this.

Read one collection, including the category and tag rules that decide what it holds.

curl

curl -X GET \ -H "Authorization: Bearer YOUR_KEY" \ "https://directories.prosvita.io/api/v1/directories/DIRECTORY_ID/collections"

Ruby

require "net/http" require "json" uri = URI("https://directories.prosvita.io/api/v1/directories/DIRECTORY_ID/collections") request = Net::HTTP::Get.new(uri) request["Authorization"] = "Bearer YOUR_KEY" response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http| http.request(request) end puts JSON.parse(response.body)