/strstd

Primary LanguageJavaScript

API

  1. Create a new company
  2. Get a list of companies
  3. Get a single company
  4. Update a single company
  5. Delete a single company
Create a new company
POST /companies
Parameters
Name Type Description
name string a company name
Example
{
	"name": "company name"
}
Response
Status: 200 OK
Content-Type: text/html
{
	"_id": "id",
	"name": "company name"
}
Get a list of companies
GET /companies
Parameters

There aren't any required parameters for this route

Example
Response
Status: 200 OK
Content-Type: text/html
[
  {
      "_id": "id",
      "name": "company name"
  },
  {
      "_id": "id",
      "name": "company name"
  },
  ...
]