• Document Up to Date

Get Index Info

Returns information about an index. The information returned depends on the search engine used (currently just Solr).

Resource Information

This service uses the tomcat application on port 8080 by default. To see a list of default ports click here

The context for this API is /crafter-search, please prefix the API URLs with this context.

HTTP Verb
GET
URL
/api/2/admin/index/info/:id
Response Formats
JSON

Parameters

Name
Type
Required
Description
id
String
The index ID.
token
String
The access token.

The access token could be optional depending on the configuration.

Example

Request

GET .../api/2/admin/index/info/mysite?token=myAccessToken

Response (Solr)

Status 200 OK

 1{
 2  "name": "mysite",
 3  "instanceDir": "/opt/solr/solr-6.4.0/server/solr/configsets/crafter_configs",
 4  "dataDir": "/opt/solr/solr-6.4.0/server/solr/mysite/data/",
 5  "config": "solrconfig.xml",
 6  "schema": "managed-schema",
 7  "startTime": 1487112987142,
 8  "uptime": 3239865,
 9  "index": {
10    "numDocs": 0,
11    "maxDoc": 0,
12    "deletedDocs": 0,
13    "indexHeapUsageBytes": 0,
14    "version": 2,
15    "segmentCount": 0,
16    "current": true,
17    "hasDeletions": false,
18    "directory": "org.apache.solr.core.MetricsDirectoryFactory$MetricsDirectory:MetricsDirectory(NRTCachingDirectory(MMapDirectory@/opt/solr/solr-6.4.0/server/solr/test/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@3622a183; maxCacheMB=48.0 maxMergeSizeMB=4.0))",
19    "segmentsFile": "segments_1",
20    "segmentsFileSizeInBytes": 71,
21    "userData": {},
22    "sizeInBytes": 71,
23    "size": "71 bytes"
24  }
25}

Responses

Status
Location
Response Body
200

See example above.
404

{ "message" : "Index not found" }
500

{ "message" : "Internal server error" }
503

{ "message" : "Service unavailable, please try again later" }