List the cohort vocabulary
GET
/api/v1/cohorts/{registry_type}
const url = 'https://api.pkgplease.com/api/v1/cohorts/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.pkgplease.com/api/v1/cohorts/example \ --header 'Authorization: Bearer <token>'Every pkgPlease-authored cohort with at least one reviewed member. A cohort is a kind of package (e.g. logging) whose members substitute for one another. The slugs are the valid values of suggest_allowed's cohort.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”registry_type
required
string
One of the org's configured registry types (npm is the one in active use).
Responses
Section titled “Responses”The vocabulary, ordered by slug
Media typeapplication/json
object
cohorts
Array<object>
object
slug
string
name
string
description
string
Example
{ "cohorts": [ { "slug": "logging", "name": "Logging" } ]}Unsupported registry type
Media typeapplication/json
object
error
required
string
Examplegenerated
{ "error": "example"}