http://wiki.servicenow.com/index.php?title=Table_API_Curl_Examples
1, create
curl \
--header "Content-Type:application/json" \
--header "Accept: application/json" \
--request POST \
--data '{"email":"linyingkui@gmail.com"}' \
http://api.localhost:3000/v1/reset_passwordcurl \
--header "Content-Type:application/json" \
--header "Accept: application/json" \
--request PATCH \
--data '{"user": {"password":"newpassword", "password_confirmation": "newpassword"}, "old_password": "albertlin"}' \
http://localhost:3000/v1/users/55465c776c65760c23000000/update_passwordcurl \
--header "Content-Type:application/json" \
--header "Accept: application/json" \
--request POST \
--data '{"variant": {"product_id":"553580706c657629b8050000", "size": "medium", "color": "green", "price": 3900, "compare_at_price": 3800, "inventory_quantity": 7, "shipping_fee": 2000}}' \
http://localhost:3000/v1/variants/curl \
--header "Content-Type:application/json" \
--header "Accept: application/json" \
--request POST \
--data '{ "like": { "user_id": "551ef36e6e322d0a7b000000", "likable_type": "product", "likable_id": "5535802c6c657629b8040000" } }' \
http://localhost:3000/v1/likescurl \
--header "Content-Type:application/json" \
--header "Accept: application/json" \
--request POST \
--data '{ "item": { "product_id": "55356e3a6c657629b8020000", "cart_id": "5535a9a2616c620212000000", "quantity": "10", "size": "S" } }' \
http://localhost:3000/v1/itemscurl \
--header "Content-Type:application/json" \
--header "Accept: application/json" \
--request POST \
--data '{ "order": { "user_id": "551ef3b86e322d0a7b040000", "cart_id": "5535a9a2616c620212000000", "stripe_charge_id": "abcd" } }' \
http://localhost:3000/v1/orders2, read
curl --header "Accept: application/json" \
http://api.localhost:3000/v1/userscurl --header "Accept: application/json" \
http://api.localhost:3000/v1/shopperscurl --header "Accept: application/json" \
http://api.localhost:3000/v1/users/551330ee616c620fbb0000003, patch
curl --header "Content-Type:application/json" \
--header "Accept: application/json" \
--request PATCH \
--data '{"email":"another@gmail.com"}' \
http://api.localhost:3000/v1/users/551330ee616c620fbb0000004, delete
curl --header "Content-Type:application/json" \
--header "Accept: application/json" \
--request DELETE \
http://api.localhost:3000/v1/users/551330ee616c620fbb0000005, access_token
curl -H \
--header 'Authorization: Token token=":token_id"' \
--header "Accept: application/json" \
https://cataluv.com/v1/users6, log in
curl \
--header "Content-Type:application/json" \
--header "Accept: application/json" \
--request POST \
--data '{"email":"first@gmail.com", "password":"password"}' \
http://api.localhost:3000/v1/login