API

  • Models
    • /api/models returns an array of all the models that are available to forms-angular
    • /api/schema/:model returns the schema for a model
    • /api/schema/:model/:customForm returns the schema for a model
    • /api/:model returns an array of all the documents in a model (needs pagination)
    • /api/:model/:id returns a single document from the collection
    • /api/:model/:id/list returns how a document should appear in a list
    The calls that return data will strip out any fields that are defined as secure - for example
    passwordHash: {type: String, secure:true, form: {hidden: true}}
  • Search
    • /api/search?q=string returns documents where the string is found at the beginning of an indexed field
    • /api/search/:model?q=string returns documents in the specified collection where the string is found at the beginning of an indexed field. Note that the search is case insensitive, so will be inefficient (and to be avoided on large datasets) until Mongo 2.5 comes out. (See issue here)
    • /api/search?q=string&f={filterjson} returns documents where the string is found at the beginning of an indexed field which satisfy the conditions in the filter.