-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathapi_scripts.txt
23 lines (13 loc) · 2.18 KB
/
api_scripts.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Use these in the Bash console to test the backend!
// ----------- LOCAL SCRIPTS -----------
curl --location 'localhost:8080/api/v1/cartoons?size=0&page=0' --header 'PlanetAThonKey: rememberme'
curl --location --request GET 'localhost:8080/api/v1/cartoons/e26e242f-055c-4746-8dc9-9785b6f4f6ef' --header 'PlanetAThonKey: rememberme'
curl --location 'localhost:8080/api/v1/cartoons' --header 'PlanetAThonKey: rememberme' --header 'Content-Type: application/json' --data '{"name": "Pink Panther","age": 22,"gender": "Male","show": "The Pink Panther","description": "A wonderful panther.","color": "Patchouli Pink","likes": 100010}'
curl --location --request PATCH 'localhost:8080/api/v1/cartoons' --header 'PlanetAThonKey: rememberme' --header 'Content-Type: application/json' --data '{"id": "6da7c45b-1ebe-450f-867f-f4d566e31fff","color": "Blazing Hot Pink","likes": 29102}'
curl --location --request DELETE 'localhost:8080/api/v1/cartoons/8067783c-b811-4482-926a-510a9770a55d' --header 'PlanetAThonKey: rememberme'
// ----------- DEPLOYED SCRIPTS -----------
curl --location 'https://planet-a-thon-backend-{YOURNAMESPACE}.cloud.okteto.net/api/v1/cartoons?size=0&page=0' --header 'PlanetAThonKey: rememberme'
curl --location --request GET 'https://planet-a-thon-backend-{YOURNAMESPACE}.cloud.okteto.net/api/v1/cartoons/e26e242f-055c-4746-8dc9-9785b6f4f6ef' --header 'PlanetAThonKey: rememberme'
curl --location 'https://planet-a-thon-backend-{YOURNAMESPACE}.cloud.okteto.net/api/v1/cartoons' --header 'PlanetAThonKey: rememberme' --header 'Content-Type: application/json' --data '{"name": "Pink Panther","age": 22,"gender": "Male","show": "The Pink Panther","description": "A wonderful panther.","color": "Patchouli Pink","likes": 100010}'
curl --location --request PATCH 'https://planet-a-thon-backend-{YOURNAMESPACE}.cloud.okteto.net/api/v1/cartoons' --header 'PlanetAThonKey: rememberme' --header 'Content-Type: application/json' --data '{"id": "6da7c45b-1ebe-450f-867f-f4d566e31fff","color": "Blazing Hot Pink","likes": 29102}'
curl --location --request DELETE 'https://planet-a-thon-backend-{YOURNAMESPACE}.cloud.okteto.net/api/v1/cartoons/8067783c-b811-4482-926a-510a9770a55d' --header 'PlanetAThonKey: rememberme'