Skip to content

IndexApi

All URIs are relative to http://localhost

MethodHTTP requestDescription
createExpiringIndexPUT /mongodb/collections/{collectionName}/index/field/{fieldName}/{duration}/expiringCreate expiring Index by Field for Collection
createIndexPUT /mongodb/collections/{collectionName}/indexCreate Index for Collection
createIndexForFieldPUT /mongodb/collections/{collectionName}/index/field/Create Index by Field for Collection
createTextIndexPUT /mongodb/collections/{collectionName}/index/field/{fieldName}/textCreate text index by field for collection
createUniqueIndexPUT /mongodb/collections/{collectionName}/index/field/{fieldName}/uniqueCreate Unique Index
deleteIndexDELETE /mongodb/collections/{collectionName}/index/Delete Index
indexGET /mongodb/collections/{collectionName}/index/Index for Collection
listIndicesGET /mongodb/collections/{collectionName}/indexList Indices for Collection

createExpiringIndex

IndexCreateResponse createExpiringIndex(collectionName, fieldName, duration, sortAscending, name)

Create expiring Index by Field for Collection

Create expiring Index by Field for given Collection

Parameters

NameTypeDescriptionNotes
collectionNameStringThe name of your MongoDb Collection[default to null]
fieldNameStringThe field Name for your index[default to null]
durationStringExpiring Duration in format 15d (https://www.scala-lang.org/api/2.13.7/scala/concurrent/duration/Duration.html)[default to 15d]
sortAscendingBooleanSort your index ascending[optional] [default to true]
nameStringName for your index[optional] [default to null]

Return type

IndexCreateResponse

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/plain

createIndex

IndexCreateResponse createIndex(collectionName, IndexCreateRequest)

Create Index for Collection

Create Index for given Collection

Parameters

NameTypeDescriptionNotes
collectionNameStringThe name of your MongoDb Collection[default to null]
IndexCreateRequestIndexCreateRequest

Return type

IndexCreateResponse

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain

createIndexForField

IndexCreateResponse createIndexForField(collectionName, fieldName, sortAscending, IndexOptionsRequest)

Create Index by Field for Collection

Create Index by Field for given Collection

Parameters

NameTypeDescriptionNotes
collectionNameStringThe name of your MongoDb Collection[default to null]
fieldNameStringThe field Name for your index[default to null]
sortAscendingBooleanSort your index ascending[optional] [default to true]
IndexOptionsRequestIndexOptionsRequest[optional]

Return type

IndexCreateResponse

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain

createTextIndex

IndexCreateResponse createTextIndex(collectionName, fieldName, IndexOptionsRequest)

Create text index by field for collection

Create text index by field for given collection

Parameters

NameTypeDescriptionNotes
collectionNameStringThe name of your MongoDb Collection[default to null]
fieldNameStringThe field Name for your index[default to null]
IndexOptionsRequestIndexOptionsRequest[optional]

Return type

IndexCreateResponse

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain

createUniqueIndex

IndexCreateResponse createUniqueIndex(collectionName, fieldName, sortAscending, name)

Create Unique Index

Create Unique Index by Field for given Collection

Parameters

NameTypeDescriptionNotes
collectionNameStringThe name of your MongoDb Collection[default to null]
fieldNameStringThe field Name for your index[default to null]
sortAscendingBooleanSort your index ascending[optional] [default to true]
nameStringName for your index[optional] [default to null]

Return type

IndexCreateResponse

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/plain

deleteIndex

IndexDropResponse deleteIndex(collectionName, indexName)

Delete Index

Delete Index by Name for given Collection

Parameters

NameTypeDescriptionNotes
collectionNameStringThe name of your MongoDb Collection[default to null]
indexNameStringThe name of your Index[default to null]

Return type

IndexDropResponse

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

index

MongoIndex index(collectionName, indexName)

Index for Collection

Index by Name for given Collection

Parameters

NameTypeDescriptionNotes
collectionNameStringThe name of your MongoDb Collection[default to null]
indexNameStringThe name of your Index[default to null]

Return type

MongoIndex

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listIndices

List listIndices(collectionName)

List Indices for Collection

List all Indices for given Collection

Parameters

NameTypeDescriptionNotes
collectionNameStringThe name of your MongoDb Collection[default to null]

Return type

List

Authorization

httpAuth1, httpAuth, apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Released under the Apache License 2.0.