Skip to main content

Data

These are the docs for the data endpoints. Used for getting info about languages and the number of active pastes.

Get a language by name

Get the language information for a specific language. Note that the language name must be percent encoded.

GET /api/v2/data/language?name=:languageName
Response
{
"name": "C",
"mode": "clike",
"mimes": [
"text/x-csrc"
],
"ext": [
"c",
"cats",
"h",
"idc"
],
"color": "#555555"
}

Get a language by extension

Get the language information for a specific language.

GET /api/v2/data/language?extension=:languageExtension
Response
{
"name": "C",
"mode": "clike",
"mimes": [
"text/x-csrc"
],
"ext": [
"c",
"cats",
"h",
"idc"
],
"color": "#555555"
}

Get the number of currently active pastes

Returns the number of currently active pastes.

GET /api/v2/data/numPastes
Response
{
"numPastes": 111
}