title: When running a generated loopback REST app that connects to MongoDB, my GET fails
body: <p><strong>When running a generated loopback REST app that uses an unauthenticated MongoDB datasource, my query fails to return any documents; calling curl produces output complaining about an authentication and/or dns issue</strong></p>
  
  <p>I generated (using slc, on a Windows 7 PC) a Loopback REST server app that uses MongoDB as its datasource.  I created a model (also using slc) for an already-established, already-populated collection and (hopefully) made sure I ran npm install so that the app was properly provisioned.</p>
  
  <p>I started the app from the Windows cmd command line and was able to view it using the StrongLoop API Explorer. However, all queries in the Explorer I've attempted up to this point (and I've tried dozens of permutations of them, all for a record that I know exists) have either failed with complaints about the "id" field, or--after I added an explicit "_id" field to the model--returned with a "200" error code, but still haven't returned any records.</p>
  
  <p>The model I created seemed to be correct; I initially left out the _id field (the Loopback documentation implies that it will automatically create an "id" field and map that to "_id"), but added it in after I began to have problems.  I also attempted the same request with curl on my PC, using the curl command that the Explorer created from my request.  This failed as well, but generated html-formatted output that either complained about an authentication failure or a dns issue.</p>
  
  <p>Here's the most recent message from the curl output:</p>
  
  <p>Your credentials could not be authenticated: "Credentials are missing.". You will not be permitted access until your credentials can be verified.</p>
  
  <p>The MongoDB instance I'm querying is visible from my PC using a generic client (RoboMongo) that connects to it without any authentication, and that client able to successfully query for the record I asked my Loopback app to find (my Loopback Explorer filter looks like this:  "where" : { "node" : "aldi004.aldc.att.com" }}).</p>
  
  <p>Here's the model:</p>
  
  <pre><code>{
    "name": "swmJoin",
    "plural": "swmJoins",
    "base": "PersistedModel",
    "idInjection": true,
    "options": {
      "validateUpsert": true
    },
    "properties": {
      "_id": {
        "type": "string",
        "id": true,
        "required": true
      },
      "node": {
        "type": "string",
        "required": true
      },
      "port": {
        "type": "string"
      },
      "os": {
        "type": "string"
      },
      "arch": {
        "type": "string"
      },
      "mgtgrp": {
        "type": "string"
      },
      "env": {
        "type": "string"
      },
      "geoloc": {
        "type": "string"
      },
      "override_user": {
        "type": "string"
      },
      "override_group": {
        "type": "string"
      },
      "rootdir": {
        "type": "string"
      },
      "status": {
        "type": "string"
      },
      "parent": {
        "type": "string"
      },
      "swmBootstrapComponents": {
        "type": "number",
        "required": true,
        "default": "0"
      },
      "nonSwmBootstrapComponents": {
        "type": "number",
        "required": true,
        "default": "0"
      },
      "nodeGroups": {
        "type": [
          "string"
        ]
      },
      "ownerMgtGroups": {
        "type": [
          "string"
        ]
      },
      "parentNodeGroups": {
        "type": [
          "string"
        ]
      },
      "components": {
        "type": [
          "object"
        ]
      },
      "motsIds": {
        "type": [
          "object"
        ]
      }
    },
    "validations": [],
    "relations": {},
    "acls": [
      {
        "accessType": "*",
        "principalType": "ROLE",
        "principalId": "$everyone",
        "permission": "ALLOW"
      }
    ],
    "methods": {}
  }
  </code></pre>
  
  <p>I'm sure I'm missing something obvious, but does anyone have any ideas where I can look to see what could be causing these problems?</p>
  
  <p>Thanks...</p>