https://github.com/jsonzilla/personals_contacts
The already classic interview toy project for test api creation of our applicants
https://github.com/jsonzilla/personals_contacts
api interview-test nodejs
Last synced: 25 days ago
JSON representation
The already classic interview toy project for test api creation of our applicants
- Host: GitHub
- URL: https://github.com/jsonzilla/personals_contacts
- Owner: jsonzilla
- License: mit
- Created: 2021-05-08T15:26:42.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-11-11T19:45:21.000Z (over 3 years ago)
- Last Synced: 2025-06-26T23:18:05.316Z (11 months ago)
- Topics: api, interview-test, nodejs
- Language: JavaScript
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# PersonContacts #
----
REST API which to store people and their contacts.
## Install
Need install MongoDB
https://docs.mongodb.com/manual/installation/
```
npm install
npm start
```
## Draft API Documentation
**Person**
----
* **URL**
/person
* **Method:**
`GET` | `POST`
* **URL Params**
**Required:**
`name=[string]`
**Optional:**
`children=[id]`
* **Success Response:**
* **Code:** 200
**Content:**
```
{
"_id": "5a07015cec75c12bf2c18588",
"name": "Carlos Voltair",
"__v": 0,
"children": []
}```
**Person:id**
----
* **URL**
/person/:id
* **Method:**
GET` | `DELETE` | `PUT`
* **URL Params**
**Required:**
`id=[interger]`
* **Data Params**
**Optional:**
`children=[id]`
* **Success Response:**
* **Code:** 200
**Content:**
```
{
"_id": "5a07015cec75c12bf2c18588",
"name": "Carlos Voltair",
"__v": 0,
"children": []
}```
**Contact**
----
* **URL**
/contact/:id
* **Method:**
`GET` | `POST`
* **URL Params**
**Optional:**
`name=[string]`
`phone=[string]`
`phone=[email]`
`owner=[id]`
* **Data Params**
**Required:**
`name=[string]`
`phone=[string]`
`phone=[email]`
**Optional:**
`owner=[id]`
* **Success Response:**
* **Code:** 200
**Content:**
```
{
"_id": "5a07016bec75c12bf2c18598",
"owner": "5a07015fec75c12bf2c18597",
"name": "Ester Colbolt",
"email": "ester@mail.zr",
"__v": 0,
"phone": "55 5555-5555",
"social": "@twiter"
}```
**Contact:id**
----
* **URL**
/contact
* **Method:**
GET` | `DELETE` | `PUT`
* **URL Params**
**Required:**
`id=[interger]`
**Optional:**
`name=[string]`
`phone=[string]`
`phone=[email]`
`owner=[id]`
* **Data Params**
**Required:**
`name=[string]`
`phone=[string]`
`phone=[email]`
**Optional:**
`owner=[id]`
* **Success Response:**
* **Code:** 200
**Content:**
```
{
"_id": "5a07016bec75c12bf2c18598",
"owner": "5a07015fec75c12bf2c18597",
"name": "Ester Colbolt",
"email": "ester@mail.zr",
"__v": 0,
"phone": "55 5555-5555",
"social": "@twiter"
}```