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
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
  "name": "mysite",
  "instanceDir": "/opt/solr/solr-6.4.0/server/solr/configsets/crafter_configs",
  "dataDir": "/opt/solr/solr-6.4.0/server/solr/mysite/data/",
  "config": "solrconfig.xml",
  "schema": "managed-schema",
  "startTime": 1487112987142,
  "uptime": 3239865,
  "index": {
    "numDocs": 0,
    "maxDoc": 0,
    "deletedDocs": 0,
    "indexHeapUsageBytes": 0,
    "version": 2,
    "segmentCount": 0,
    "current": true,
    "hasDeletions": false,
    "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))",
    "segmentsFile": "segments_1",
    "segmentsFileSizeInBytes": 71,
    "userData": {},
    "sizeInBytes": 71,
    "size": "71 bytes"
  }
}

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" }