code: function createEndpoint(req, method, config, conn, cb){
    if(_.isObject(conn.options) && conn.options.hasOwnProperty('id')){
      config.endpoint = url.resolve(conn.connection.endpoint + '/', conn.collection + '/' + conn.options.id);
      delete conn.options.id;
    } else {
      config.endpoint = url.resolve(conn.connection.endpoint + '/', conn.collection);
    }
    cb();
  }
docs: Createn an HTTP request URL from connection configuration, collection name and query options object.
  If query options object contains an `id` field, the HTTP URL will be formatted as proto://pathname/collection/id.
  Otherwise the HTTP URL will be formatted as proto://pathname/collection.
  
  @param {Request} req - SuperAgent HTTP Request object
  @param {String}  method - HTTP request method
  @param {Object}  config - configuration object used to hold request-specific configuration. this is used to avoid polluting the connection's own configuration object.
  @param {Object}  conn - connection configuration object:
  - {Object} connection - Waterline connection configuration object
  - {String} collection - collection name. appended to API pathname.
  For example, given the api `http://localhost:8080/api/v1`,
  a collection named `user` will resolve to `http://localhost:8080/api/v1/user`.
  - {Object} options - query options object. contains query conditions (`where`), sort, limit etc. as per Waterline's API.
  - {Array<Object>} values - values of records to create.
  @param {Function} cb - function that is called when this hook finishes