> Log In

API V1

Mitta's APIs provides methods to crawl, organize, search and backup documents and indexes.

Methods

Settings: https://mitta.us/p - create and manage user settings

Crawl: https://mitta.us/g - image and index a URL or URI

Spools: https://mitta.us/u - create, manage and upload PDFs or images into spools

Index: https://mitta.us/i - index documents or create and manage index stores

Search: https://mitta.us/s - find, filter and relate command logs, spools and other documents

Model: https://mitta.us/m - manage and interact with models and tag documents

Share: https://mitta.us/e - share documents with others


Authentication

Authentication uses a token passed with calls to the API. Tokens are managed from the web console:

Κordlesš@gmail.com:~> !token |reset
chocolate-locust|> API token: 1v4HGdqfmnhL08LcpWE970H69nh8J7N8lsQhnj
chocolate-locust|> Token copied to clipboard.

Use

Start by using the console to image and index Slashdot Science:

Κordlesš@gmail.com:~> !crawl https://science.slashdot.org/
chocolate-locust|> Please wait while I index https://science.slashdot.org/.
chocolate-locust|> Site has been indexed. An image of the site will be added in ~10 seconds.
chocolate-locust|> ...
chocolate-locust|> [updated] 2022-05-05T02:31:29Z
chocolate-locust|> [ID] 4DpAY6PnhyHaHafWa
chocolate-locust|> [title] Slashdot: News for nerds, stuff that matters
chocolate-locust|> [description] Slashdot: News for nerds, stuff that matters. Timely news source for technology related news with a heavy slant towards Linux and Open Source issues.
chocolate-locust|> [URL] https://science.slashdot.org/
chocolate-locust|> [Tags] #grub, #Slashdot, #news, #nerds, #Linux, #Open, #Source

Now test the search method by passing it the q, rows and token parameters:

$ curl https://mitta.us/s?q=title:slashdot&rows=1&token=1v4HGdqfmnhL08LcpWE970H69nh8J7N8lsQhnj

The API's responses use the application/json MIME type:

{
  "timestamp": "2022-05-05T02:42:08Z",
  "result": "success",
  "status": "running",
  "action": "none",
  "responseHeader": {
    "status": 0,
    "QTime": 0,
    "params": {
      "q": "title:news",
      "rows": "1"
    }
  },
  "response": {
    "numFound": 1,
    "start": 0,
    "numFoundExact": true,
    "docs": [{
      "document_id": ["cEqorrese1BNiqgru"],
      "created": ["2022-05-05T02:41:33Z"],
      "updated": ["2022-05-05T02:41:33Z"],
      "sidekick": ["orchid-parrot"],
      "line": ["!crawl https://science.slashdot.org/"],
      "spool": ["bold-spirited-binturong"],
      "source_type": ["web"],
      "url": ["https://science.slashdot.org/"],
      "title": ["Slashdot: News for nerds, stuff that matters"],
      "text": ["https://science.slashdot.org/"],
      "description": ["Slashdot: News for nerds, stuff that matters. Timely news source for technology related news with a heavy slant towards Linux and Open Source issues."],
      "tags": ["#grub", "#Slashdot", "#news", "#nerds", "#Linux", "#Open", "#Source"]
    }]
  },
  "facets": {},
  "resolve": ""
}

Returned data always include a timestamp, result and request_url.

Optional responseHeader and response values are returned depending on the method being called.


^ User Settings

Personal settings may be viewed and used from the shell:

Κordlesš@gmail.com:~> !settings $ui_theme
strange-prawn@mitta.us:-> $ui_theme =dark

Settings other than email may be updated from the shell:

Κordlesš@gmail.com:~> !settings $ui_theme =light
strange-prawn@mitta.us:-> $ui_theme =light

A setting can be deleted from the shell:

Κordlesš@gmail.com:~> !settings $ui_theme |delete
strange-prawn@mitta.us:-> Setting deleted.

All settings may be viewed (limit 10 custom settings per account):

Κordlesš@gmail.com:~> !settings
strange-prawn@mitta.us:-> A list of your settings follows.
strange-prawn@mitta.us:-> $email =Κordlesš@gmail.com
strange-prawn@mitta.us:-> $sidekick =strange-prawn
strange-prawn@mitta.us:-> $ui_theme =dark
strange-prawn@mitta.us:-> $openai_key =sCMid0fooudTkweJLUZDG1DD6ewFodNrSkRslbYJB

Settings uses GET, POST, PUT and DELETE requests and may be called with the following parameters:

GET /p

Returns a list of personal settings and their current values. Requires token only.

$ curl https://mitta.us/p?token=qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs
{
  "timestamp": "2021-03-08T14:54:45Z",
  "result": "success",
  "request_url": "/p",
  "settings": [
    {
      "updated": "2020-12-22T21:03:43Z",
      "name": "email",
      "value": "kordless@gmail.com",
      "methods": ["GET"]
    },
    {
      "updated": "2021-03-08T10:06:43Z",
      "name": "sidekick",
      "value": "strange-prawn",
      "methods": ["GET", "POST", "PUT", "DELETE"]
    }
  ]
}

GET /p/[name]

Returns a single personal configuration setting's name and value. Requires token.

$ curl https://mitta.us/p/sidekick?token=qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs
{
  "timestamp": "2021-03-08T14:55:31Z",
  "result": "success",
  "request_url": "/p/sidekick",
  "setting": {
    "updated": "2021-03-08T10:06:43Z",
    "name": "sidekick",
    "value": "strange-prawn",
    "methods": ["GET", "POST", "PUT", "DELETE"]
  }
}

POST /p/[name] or PUT /p/[name]

Creates or sets a personal settings value. A POST or PUT request will create a named value set or set a existing named value. Requires token and value parameters:

$ curl -X POST -d "value=tuna" https://mitta.us/p/foobar?token=qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs
{
  "timestamp": "2021-03-08T23:37:23Z",
  "result": "success",
  "request_url": "/p/foobar",
  "setting": {
    "updated": "2021-03-08T23:37:23Z",
    "name": "foobar",
    "value": "tuna",
    "methods": ["GET", "POST", "PUT", "DELETE"]
  }
}

NOTE: Not all configuration settings may be updated as indicated by the lack of a POST method.

DELETE /p/[name]

Deletes a personal configuration setting. Requires token:

$ curl -X DELETE https://mitta.us/p/foobar?token=qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs
{
  "result": "success"
}

^ Crawl URL

Converts a universal resource locator (URL) into images. Uses POST requests and may be called with the following parameters:

POST /g

This method creates a new spool for the URL and asynchronously uploads images created from the crawl into the spool. The description is returned immediately, if found. The title may be passed and overide any title blocks found in the document. Subsequent POST requests use the URL's spool ID for storing new imagery.

Requires token and url.

$ curl -X POST -d "url=https://news.google.com/" https://mitta.us/g?token=qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs
{
  "timestamp": "2021-03-10T22:11:40Z",
  "request_url": "/g",
  "result": "success",
  "response": [{
    "source_type": "spool",
    "created": "2021-03-08T18:08:01Z",
    "updated": "2021-03-10T22:11:41Z",
    "name": "spool_Fzk8v3n44ZG3n",
    "nick": "free-ultramarine-monkey",
    "upload_url": "https://mitta.us/u/free-ultramarine-monkey",
    "url": "https://news.google.com/",
    "title": "Google News",
    "description": "Comprehensive up-to-date news coverage, aggregated from sources all over the world by Google News.",
    "tags": ["#grub", "#tag1", "#tag2"],
    "filenames": ["DVa1fmrXe0dlksFSx2T4h24.png", "7M3xnCS7dFYB4RyMr03QWZX.png", "juUNrH3vABS2xrSt6zX5R1J.png"]
  }]
}

NOTE: Similar to the /u upload method, a POST to the crawl method creates a new spool if one doesn't already exist for the URL. The #grub tag is added to any tags you send to indicate it has been crawled by the system.


^ Upload Images

Create and accept sets of similar images for storage. Spools may be ingested by either indexing methods or the tagging methods.

Upload uses GET and POST requests and may be called with the following parameters:

POST /u

Creates a new spool which may be used as a target for uploading an image set. Requires token.

Optionally accepts title, description and tags parameters.

$ curl -X POST -d "tags[]=moo&tags[]=cows&title=Cows&description=Here are cows." https://mitta.us/u?token=qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs
{
  "timestamp": "2021-03-10T22:31:56Z",
  "request_url": "/u",
  "result": "success",
  "response": [{
    "source_type": "spool",
    "created": "2021-03-10T22:31:56Z",
    "updated": "2021-03-10T22:31:56Z",
    "name": "spool_sl1dhtoBuvOsg",
    "nick": "accomplished-eager-shark",
    "upload_url": "https://mitta.us/u/accomplished-eager-shark",
    "title": "Cows",
    "description": "Here are cows.",
    "tags": ["#moo", "#cows"],
    "filenames": []
  }]
}

GET /u/[nick_or_name]

Returns information about a spool, including a set of image filenames. Requires token.

$ curl https://mitta.us/u/free-ultramarine-monkey?token=UXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs
{
  "timestamp": "2021-03-10T22:11:40Z",
  "request_url": "/u",
  "result": "success",
  "response": [{
    "source_type": "spool",
    "created": "2021-03-08T18:08:01Z",
    "updated": "2021-03-10T22:11:41Z",
    "name": "spool_Fzk8v3n44ZG3n",
    "nick": "free-ultramarine-monkey",
    "upload_url": "https://mitta.us/u/free-ultramarine-monkey",
    "url": "https://news.google.com/",
    "title": "Google News",
    "description": "Comprehensive up-to-date news coverage, aggregated from sources all over the world by Google News.",
    "tags": ["#url"],
    "filenames": ["DVa1fmrXe0dlksFSx2T4h24.png", "7M3xnCS7dFYB4RyMr03QWZX.png", "juUNrH3vABS2xrSt6zX5R1J.png"]
  }]
}

DELETE /u/[nick_or_name]

Deletes a spool and all of its files. Requires token.

$ curl -X DELETE https://mitta.us/u/messy-active-skylark?token=qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs
{
  "result": "success"
}

POST /u/[nick_or_name]

Upload an image to the named spool. Returns information about the spool, including a list of image filenames in the spool. Requires token and a key named data passed in using a multipart/form-data POST.

$ curl -X POST -F "data=@crazyhair.png" https://mitta.us/u/messy-centipede-of-emphasis?token=qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs
{
  "timestamp": "2021-03-10T22:51:19Z",
  "request_url": "/u",
  "result": "success",
  "response": [{
    "source_type": "spool",
    "created": "2021-03-10T22:50:52Z",
    "updated": "2021-03-10T22:50:52Z",
    "name": "spool_ATlUqelOT9uPy",
    "nick": "messy-centipede-of-emphasis",
    "upload_url": "https://mitta.us/u/messy-centipede-of-emphasis",
    "url": "https://mitta.usd/spool_ATlUqelOT9uPy",
    "title": "Walking",
    "description": "Walking the doge.",
    "tags": ["#pasture", "#doge"],
    "filenames": ["crazyhair.png"]
  }]
}

GET /d/[nick_or_name]/[filename]

Returns images which were uploaded to a spool. Requires token.

$ curl -O https://mitta.us/d/spool_ATlUqelOT9uPy/crazyhair.png?token=Ul5rkL2kyL6b858Z88x4yEEKVZOeM0pioPjRX2Ynuu9HEBRfLb5Cwn2mLdwC__bX56EgDZI88UdfjGoIEy5A
qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs > crazyhair.png
$ open crazyhair.png

Requests to this endpoint may also be done from a browser after a login to the site.

DELETE /u/[nick_or_name]/[filename]

Deletes an image from a spool. Requires token.

$ curl -X DELETE https://mitta.us/u/messy-centipede-of-emphasis/crazyhair.png?token=qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs
{
  "result": "success"
}

^ Index Documents

Create or delete index cores, or "sidekicks". Also, have a sidekick index or delete documents. A sidekick's documents may also be updated by using the tag methods.

Index uses GET, DELETE and POST requests and may be called with the following parameters:

POST /i

Creates a new sidekick. Requires token.

$ curl -X POST https://mitta.us/i?token=qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs
{
  "timestamp": "2021-03-10T23:18:16Z",
  "request_url": "/i",
  "result": "success",
  "sidekick": {
    "updated": "2021-03-10T23:18:16Z",
    "name": "sidekick_l5J7V7Iod1GIo",
    "nick": "terrestrial-kangaroo",
    "numDocs": 0,
    "mood": "happy"
  }
}

GET /i

Returns a list of sidekicks. Requires token.

$ curl https://mitta.us/i?token=qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs
{
  "timestamp": "2021-03-10T23:20:07Z",
  "result": "success",
  "request_url": "/i",
  "sidekicks": [{
      "updated": "2021-03-09T20:08:52Z",
      "name": "sidekick_5wMauZQZnkYtf",
      "nick": "rose-smilodon",
      "numDocs": 59,
      "mood": "bored"
    },
    {
      "updated": "2021-03-08T18:07:47Z",
      "name": "sidekick_YsAR9KJPlwBSM",
      "nick": "strange-prawn",
      "numDocs": 157,
      "mood": "bored"
    },
    {
      "updated": "2021-03-10T23:18:16Z",
      "name": "sidekick_l5J7V7Iod1GIo",
      "nick": "terrestrial-kangaroo",
      "numDocs": 0,
      "mood": "bored"
    }
  ]
}

GET /i/[nick]

Get a sidekick's status. Requires token.

$ curl https://mitta.us/i/strange-prawn?token=qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs
{
  "timestamp": "2021-03-10T23:21:38Z",
  "request_url": "/i/strange-prawn",
  "result": "success",
  "sidekick": {
    "updated": "2021-03-08T18:07:47Z",
    "name": "sidekick_YsAR9KJPlwBSM",
    "nick": "strange-prawn",
    "numDocs": 157,
    "mood": "happy"
  }
}}

DELETE /i/[nick]

Delete a sidekick and all of its documents. Requires token.

$ curl -X DELETE https://mitta.us/i/rose-smilodon?token=qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs
{
  "result": "success"
}

POST /i/[nick]

Send a document to a sidekick. Requires token and takes a JSON object or spool returned from an upload method.

Here we view a prepared file with two documents, with both carrying a "spool" source_type:

$ cat data.json
{
  "response": [{
      "source_type": "spool",
      "created": "2021-03-10T22:50:52Z",
      "updated": "2021-03-10T22:50:52Z",
      "name": "spool_ATlUqelOT9uPy",
      "nick": "messy-centipede-of-emphasis",
      "upload_url": "https://mitta.us/u/messy-centipede-of-emphasis",
      "url": "https://mitta.usd/spool_ATlUqelOT9uPy",
      "title": "Walking",
      "description": "Walking the doge.",
      "tags": ["#pasture", "#doge"],
      "filenames": ["crazyhair.png"]
    },
    {
      "source_type": "spool",
      "created": "2021-03-08T18:08:01Z",
      "updated": "2021-03-10T23:30:02Z",
      "name": "spool_Fzk8v3n44ZG3n",
      "custom_field": "Kord was here.",
      "nick": "free-ultramarine-monkey",
      "upload_url": "https://mitta.us/u/free-ultramarine-monkey",
      "url": "https://news.google.com/",
      "title": "Google News",
      "description": "Comprehensive up-to-date news coverage, aggregated from sources all over the world by Google News.",
      "tags": ["#url"],
      "filenames": ["DVa1fmrXe0dlksFSx2T4h24.png", "7M3xnCS7dFYB4RyMr03QWZX.png", "juUNrH3vABS2xrSt6zX5R1J.png", "yM5xbYTF3KY2zi81OOM5sdY.png", "4rHNnMSZVFnAt79PsXtErit.png", "YEwBwzX0nFe5eNUxVA1JhXw.png", "Q63X6BnnGLF4jdPUFe3npDb.png"]
    }
  ]
}

Send the file to the sidekick:

$ curl -X POST -H 'Content-type:application/json' --data @"data.json" https://mitta.us/i/terrestrial-kangaroo?token=qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs
{
  "timestamp": "2021-03-10T23:36:34Z",
  "request_url": "/i/terrestrial-kangaroo",
  "result": "success",
  "num_docs_indexed": 2
}

Queries to the sidekick's indexes use the search method:

$ curl "https://mitta.us/s?q=source_type:spool&rows=1&token=qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs"
{
  "timestamp": "2021-03-10T23:41:04Z",
  "result": "success",
  "request_url": "/s",
  "responseHeader": {
    "status": 0,
    "QTime": 13,
    "params": {
      "q": "source_type:spool",
      "rows": "1"
    }
  },
  "response": {
    "numFound": 3,
    "start": 0,
    "numFoundExact": true,
    "docs": [{
      "source_type": ["spool"],
      "created": ["2021-03-08T18:08:01Z"],
      "updated": ["2021-03-10T23:30:02Z"],
      "name": ["spool_Fzk8v3n44ZG3n"],
      "nick": ["free-ultramarine-monkey"],
      "upload_url": ["https://mitta.us/u/free-ultramarine-monkey"],
      "url": ["https://news.google.com/"],
      "custom_field": ["Kord was here."],
      "title": ["Google News"],
      "description": ["Comprehensive up-to-date news coverage, aggregated from sources all over the world by Google News."],
      "tags": ["#url"],
      "filenames": ["DVa1fmrXe0dlksFSx2T4h24.png", "7M3xnCS7dFYB4RyMr03QWZX.png", "juUNrH3vABS2xrSt6zX5R1J.png", "yM5xbYTF3KY2zi81OOM5sdY.png", "4rHNnMSZVFnAt79PsXtErit.png", "YEwBwzX0nFe5eNUxVA1JhXw.png"],
      "id": "b7bb214d-80be-49ce-915a-db0b3ae4bfc0",
      "_version_": 1693889597430300672
    }]
  }
}

DELETE /i/[nick]/[document_id]

Delete a document from a sidekick. Requires token.

$ curl -X DELETE https://mitta.us/i/terrestrial-kangaroo/b7bb214d-80be-49ce-915a-db0b3ae4bfc0?token=qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs
{
  "result": "success"
}

^ Tag Documents

Show a list of machine learning models or proxy a spool's images through a machine learning model before indexing.

Tag uses GET and POST requests and may be called with the following parameters:

GET /t/[sidekick_nick]

Returns a list of machine learning models for a sidekick. Requires token.

$ curl https://mitta.us/t/strange-prawn?token=qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs
{
  "timestamp": "2021-03-10T18:20:53Z",
  "result": "success",
  "request_url": "/t/strange-prawn",
  "models": [{
      "model_name": "document-text-detection",
      "description": "Percieve and extract text from a page screenshot.",
      "source_type": "spool",
      "tag_field": "fulltext"
    },
    {
      "model_name": "object-vision",
      "description": "Perceive and extract object tags from an image.",
      "source_type": "spool",
      "tag_field": "tags"
    }
  ]
}

POST /t/[sidekick_nick]/[model_name]

Instructs a sidekick to load a spool into a machine learning model and then index the images if they aren't already in the index. Unlike the indexing methods, tag returns a count of the number of indexed documents.

Each model has a target field it populates when it runs on an image. Searching these fields from the UI is done as follows:

Κordlesš@gmail.com:~> !search fulltext:fungi

Requires token and the spool's nick or name passed in via the spool parameter.

$ curl -X POST -d "spool=free-ultramarine-monkey" https://mitta.us/t/mighty-ape/document-text-detection?token=qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs
{
  "timestamp": "2021-03-16T20:39:25Z",
  "request_url": "/t/mighty-ape/document-text-detection",
  "result": "success",
  "num_docs_indexed": 1
}

Search a sidekick (index) for matching documents. Returns documents or statistics about documents, fields and values.

Search uses GET requests and may be called with a wide range of Solr parameters:

The tq field uses formatted time ranges like 2020-11-04T03:00:00Z_2020-11-04T03:59:59Z, where the underscore character _ denotes a range between the lower bound and upper bound timestamps.

The tq field may also use the following timewords:

GET /s/[nick] or GET /s

Search the default sidekick for documents. Requires token.

$ curl "https://mitta.us/s/terrestrial-kangaroo?q=title:news&token=qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs"
{
  "timestamp": "2021-03-11T01:08:14Z",
  "result": "success",
  "request_url": "/s/terrestrial-kangaroo",
  "responseHeader": {
    "status": 0,
    "QTime": 1,
    "params": {
      "q": "title:news"
    }
  },
  "response": {
    "numFound": 1,
    "start": 0,
    "numFoundExact": true,
    "docs": [{
      "source_type": ["spool"],
      "created": ["2021-03-08T18:08:01Z"],
      "updated": ["2021-03-10T23:30:02Z"],
      "name": ["spool_Fzk8v3n44ZG3n"],
      "nick": ["free-ultramarine-monkey"],
      "upload_url": ["https://mitta.us/u/free-ultramarine-monkey"],
      "url": ["https://news.google.com/"],
      "title": ["Google News"],
      "description": ["Comprehensive up-to-date news coverage, aggregated from sources all over the world by Google News."],
      "tags": ["#url"],
      "filenames": ["DVa1fmrXe0dlksFSx2T4h24.png", "7M3xnCS7dFYB4RyMr03QWZX.png", "juUNrH3vABS2xrSt6zX5R1J.png", "yM5xbYTF3KY2zi81OOM5sdY.png", "4rHNnMSZVFnAt79PsXtErit.png", "YEwBwzX0nFe5eNUxVA1JhXw.png", "Q63X6BnnGLF4jdPUFe3npDb.png"],
      "id": "d1149ff2-bdaa-47e3-95c4-53620c979d34",
      "_version_": 1693890006876160000
    }]
  }
}

Search can also be called using a JSON formatted query file. This example uses the Solr Facet API to return counts of terms from descriptions over a set of documents:

$ cat facet_query.json
{
  "query": "*:*",
  "limit": 0,
  "facet": {
    "title_terms": {
      "type": "terms",
      "field": "title",
      "limit": 10
    }
  }
}

We query the sidekick using curl and the query file:

$ curl --data-binary @"facet_query.json" -H 'Content-type:application/json' https://mitta.us/s/strange-prawn?token=qXrUkd2FpfTEGaGPXbqe50k2jh_VZDQPYjifjFNQLHdv0orcOpKRvYVAs
{
  "timestamp": "2021-03-10T17:53:35Z",
  "result": "success",
  "request_url": "/s/strange-prawn",
  "responseHeader": {
    "status": 0,
    "QTime": 1,
    "params": {
      "json": "{\"query\": \"*:*\", \"limit\": 0, \"facet\": {\"title_terms\": {\"type\": \"terms\", \"field\": \"title\", \"limit\": 10}}}"
    }
  },
  "response": {
    "numFound": 14,
    "start": 0,
    "numFoundExact": true,
    "docs": []
  },
  "facets": {
    "count": 14,
    "title_terms": {
      "buckets": [{
        "val": "the",
        "count": 6
      }, {
        "val": "google",
        "count": 4
      }, {
        "val": "in",
        "count": 4
      }, {
        "val": "barrier",
        "count": 3
      }, {
        "val": "breaking",
        "count": 3
      }, {
        "val": "faster",
        "count": 3
      }, {
        "val": "for",
        "count": 3
      }, {
        "val": "light",
        "count": 3
      }, {
        "val": "than",
        "count": 3
      }, {
        "val": "travel",
        "count": 3
      }]
    }
  }
}

The list of fields for querying Solr with JSON is located here.