MongoDB.GetOptions
------------------

Queries the options from the URL.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [MongoDB](component_MongoDB.md) | [13.1](newinversion131.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "MongoDB.GetOptions"; MongoDBRef ) 

**MBS**( **"MongoDB.GetOptions";** /\* Queries the options from the URL. \*/  
**$MongoDBRef**) /\* The reference number for the mongo connection.e.g. $MongoDB \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| MongoDBRef | The reference number for the mongo connection. | $MongoDB |

### Result

Returns JSON or error.

### Description

Queries the options from the URL.  
Fetches a JSON document containing all of the options provided after the ? of a URI.  
Can be empty if not set.  
### Examples

Query options from URL:

 Set Variable \[ $Mongo ; Value: MBS ( "[MongoDB.New](MongoDBNew.md)" ) \]   
\#   
\# set URL with options   
Set Variable \[ $r ; Value: MBS ( "[MongoDB.SetURI](MongoDBSetURI.md)"; $Mongo ; "mongodb://test@1.2 .3.4 /?ssl=true&amp;tlsCAFile=" &amp; GetAsURLEncoded ( "/Users/cs/cacert.pem" )) \]   
\#   
\# query and show options   
Set Variable \[ $options ; Value: MBS ( "MongoDB.GetOptions"; $Mongo ) \]   
Show Custom Dialog \[ "Options" ; $options \]   
\#   
\# success   
Exit Script \[ Text Result: $Mongo \]  
### See also

- [MongoDB.New](MongoDBNew.md)
- [MongoDB.SetSSLOptions](MongoDBSetSSLOptions.md)
- [MongoDB.SetURI](MongoDBSetURI.md)

### Release notes

- **Version 13.1**
    - Added [MongoDB.GetOptions](https://www.mbsplugins.eu/MongoDBGetOptions.shtml), [MongoDB.GetTLS](https://www.mbsplugins.eu/MongoDBGetTLS.shtml) and [MongoDB.SetDatabase](https://www.mbsplugins.eu/MongoDBSetDatabase.shtml) functions.

### Blog Entries

- [New in MBS FileMaker Plugin 13.1](https://www.mbsplugins.de/archive/2023-03-15/New_in_MBS_FileMaker_Plugin_13/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.1pr1](https://www.mbsplugins.de/archive/2023-02-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 22nd January 2023 , last changed 7th May 2023

  
[MongoDB.GetCredentials](MongoDBGetCredentials.md) - [MongoDB.GetPassword](MongoDBGetPassword.md)

[HTML Version](MongoDBGetOptions.shtml)