# createTable() function does not work for MongoDB

**URL:** <https://community.dreamfactory.com/t/createtable-function-does-not-work-for-mongodb/1405>\
**Category:** Schema & Data\
**Created:** [August 22, 2015, 1:02am UTC](https://community.dreamfactory.com/t/createtable-function-does-not-work-for-mongodb/1405 "2015-08-22T01:02:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![uniconstructor](https://avatars.discourse-cdn.com/v4/letter/u/e9bcb4/32.png) [@uniconstructor](https://community.dreamfactory.com/u/uniconstructor)\
**Post date:** [August 22, 2015, 1:02am UTC](https://community.dreamfactory.com/t/createtable-function-does-not-work-for-mongodb/1405/1 "2015-08-22T01:02:38Z")

</div>

POST /mongodb/\_schema/{table\_name} does not work as expected

Steps to reproduce this error:

1. Open Live API: [https://www.dreamfactory.com/developers/live\_API](https://www.dreamfactory.com/developers/live_API)

2. Open POST /mongodb/\_schema/{table\_name}  
Documetdation for this API method says: “createTable() - Create a table with the given properties and fields.”

3. Set required fields:  
**table\_name** : elephants  
**schema** :

4. Click “Try It out!”

**Expected result** : new collection in MongoDB, named "elephants"  
**Actual result** : error (Table ‘elephants’ not found.)

**Details** :  
Request URL: _[https://dsp-sandman1.cloud.dreamfactory.com:443/rest/mongodb/\_schema/elephants](https://dsp-sandman1.cloud.dreamfactory.com:443/rest/mongodb/_schema/elephants)_  
Responce Body:

```
{
  "error": [
    {
      "context": null,
      "message": "Table 'elephants' not found.",
      "code": 404
    }
  ]
}

```

I got same error in my local DreamFactory installation (permissions is not a problem here)

---

<div class="post-metadata">

**Author:** ![formerstaff](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/formerstaff/32/1133_2.png) [@formerstaff](https://community.dreamfactory.com/u/formerstaff)\
**Post date:** [August 24, 2015, 2:21pm UTC](https://community.dreamfactory.com/t/createtable-function-does-not-work-for-mongodb/1405/2 "2015-08-24T14:21:47Z")

</div>

Thanks @uniconstructor .  
In order to accomplish what you are wanting, I believe you just need to use `POST /mongodb/_schema`

Not `POST /mongodb/_schema/{table_name}`
