Pochetes/portfolio-api

Building the endpoints 5/5 -> `/experiences`

Closed this issue · 1 comments

The request examples for each endpoint in the /experiences resource

Sample API Requests

GET /experiences

curl --location --request GET 'https://pochetes.heroku-app.com/experiences'

GET /experiences/{ experienceId }

curl --location --request GET 'https://pochetes.heroku-app.com/experiences?experienceId=8'

POST /experiences

curl --location --request POST 'https://pochetes.heroku-app.com/experiences' \
--header 'Content-Type: application/json' \
--data-raw '{
    "company": "Meta Platforms Inc.",
    "position": "Software Engineer Intern",
    "dateStarted": "June 2021",
    "dateEnded": "August 2021",
    "image": "<link_to_image>"
}'

PATCH /experiences/{ experienceId }

curl --location --request PATCH 'https://pochetes.heroku-app.com/experiences?experienceId=8' \
--header 'Content-Type: application/json' \
--data-raw '{
    "company": "Google",
    "position": "Software Engineer Intern",
    "dateStarted": "December 2021",
    "dateEnded": "March 2022",
    "image": "<link_to_image>"
}'

DELETE /experiences/{ experienceId }

curl --location --request DELETE 'https://pochetes.heroku-app.com/experiences?experienceId=8'