Event Categories
Hierarchical taxonomy used to categorize events.
Get a collection
GET /event_categories HTTP/1.1
Query string parameters
All query string parameters are optional.
-
callback
string -
Wraps the response in a callback function of the given name. Use this parameter to facilitate JSONP requests.
-
excluded_ids
comma-separated list of IDs -
Returns event categories, except those with the given IDs.
-
ids
comma-separated list of IDs -
Return event categories with the given IDs.
-
order_by
comma-separated list -
Sort event categories by one or more
ORDER_BY
andORDER
parameter pairs. Options:Format:
ORDER_BY|ORDER[,ORDER_BY|ORDER,...]
Default value:
name|asc
-
page
integer -
Return event categories from a specific page of a collection.
Default value:
1
-
per_page
integer -
Number of event categories to return per page of a collection. Maximum:
100
Default value:
5
-
slug
comma-separated list -
Return event categories matching the given slug(s).
Response
In the example response, embedded event categories are truncated for illustrative purposes. In the real-world version of the response, "...event category object..."
is an entire event category resource.
{
"_embedded": {
"event_categories": [
"...event category object...",
"...event category object...",
"...event category object...",
"...event category object...",
"...event category object..."
]
},
"_links": {
"find": {
"href": "/event_categories/{?id}",
"templated": true
},
"next": {
"href": "/event_categories?page=3"
},
"prev": {
"href": "/event_categories?page=1"
},
"self": {
"href": "/event_categories?page=2"
}
},
"page": 1,
"per_page": 5,
"return_count": 5,
"total_available": 100
}
Attributes
-
_embedded
hash -
Embedded resources.
-
_embedded.event_categories[]
array -
An array of event category objects.
-
_links
hash -
Links to resources associated with the event category collection.
-
_links.find
link object -
A templated link that can be used to find a specific resource in the collection.
-
_links.find.href
string -
URI of the link.
-
_links.find.templated
boolean -
Identifies the href as a templated URI.
-
_links.next
link object -
A link to the next set of resources in the collection. If there is not a next page, this link will not be present.
-
_links.next.href
string -
URI of the link.
-
_links.prev
link object -
A link to the previous set of resources in the collection. If there is not a previous page, this link will not be present.
-
_links.prev.href
string -
URI of the link.
-
_links.self
link object -
A link that identifies the current resource.
-
_links.self.href
string -
URI of the link.
-
page
integer -
The page number of the returned collection.
-
per_page
integer -
The number of event categories requested per page.
-
return_count
integer -
Number of event categories returned.
-
total_available
integer -
Total number of event categories available in the collection.
Get one
GET /event_categories/:id HTTP/1.1
Endpoint parameters
-
id
integer required -
The unique identifier of the event category.
Response
GET /event_categories/2471
{
"_embedded": {},
"_links": {
"self": {
"href": "/event_categories/2471"
}
},
"id": 2471,
"name": "Music",
"parent": {
"id": 2450,
"name": "Arts+Culture",
"slug": "arts-culture"
},
"slug": "music",
"type": "event_category",
"url": "https://hub.jhu.edu/events/?categories=music"
}
Attributes
-
_embedded
hash -
Embedded resources.
-
_links
hash -
Links to resources associated with the event category.
-
_links.self
link object -
A link that identifies the current resource.
-
_links.self.href
string -
URI of the link.
-
id
integer -
Unique identifier of the event category.
-
name
string -
The nice name of the event category.
-
parent
hash|null -
The parent event category, if there is one.
-
parent.id
integer -
Unique identifier of the parent event category.
-
parent.name
string -
The nice name of the parent event category.
-
parent.slug
string -
The name of the parent event category used in URLs.
-
slug
string -
The name of the event category used in URLs.
-
type
string -
Type of resource.
-
url
hash -
URLs that point to collections of content in this event category on the Hub website.
Get a subcollection
A subcollection is a collection of objects contained within an event category.
GET /event_categories/:id/:subcollection HTTP/1.1
Endpoint parameters
-
id
integer - The unique identifier of the event category.
-
subcollection
string -
The name of the subcollection to retrieve. Options:
events
Query string parameters
To filter the subcollection, see the list of available parameters associated with the chosen subcollection:
Response
See the response associated with the chosen subcollection: