Last active
December 20, 2023 15:38
-
-
Save waldekmastykarz/068de4b66a03e13ead22983070490b59 to your computer and use it in GitHub Desktop.
Dev Proxy CRUD API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v1.0/crudapi.schema.json", | |
"baseUrl": "https://api.contoso.com/v1/customers", | |
"dataFile": "customers-data.json", | |
"actions": [ | |
{ | |
"action": "getAll" | |
}, | |
{ | |
"action": "getOne", | |
"url": "/{customer-id}", | |
"query": "$.[?(@.id == {customer-id})]" | |
}, | |
{ | |
"action": "create" | |
}, | |
{ | |
"action": "merge", | |
"url": "/{customer-id}", | |
"query": "$.[?(@.id == {customer-id})]" | |
}, | |
{ | |
"action": "update", | |
"url": "/{customer-id}", | |
"query": "$.[?(@.id == {customer-id})]" | |
}, | |
{ | |
"action": "delete", | |
"url": "/{customer-id}", | |
"query": "$.[?(@.id == {customer-id})]" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": 1, | |
"firstName": "ted", | |
"lastName": "james", | |
"gender": "male", | |
"address": "1234 Anywhere St.", | |
"city": " Phoenix ", | |
"state": { | |
"abbreviation": "AZ", | |
"name": "Arizona" | |
}, | |
"orders": [ | |
{ "productName": "Basketball", "itemCost": 7.99 }, | |
{ "productName": "Shoes", "itemCost": 199.99 } | |
], | |
"latitude": 33.299, | |
"longitude": -111.963 | |
}, | |
{ | |
"id": 2, | |
"firstName": "Michelle", | |
"lastName": "Thompson", | |
"gender": "female", | |
"address": "345 Cedar Point Ave.", | |
"city": "Encinitas ", | |
"state": { | |
"abbreviation": "CA", | |
"name": "California" | |
}, | |
"orders": [ | |
{ "productName": "Frisbee", "itemCost": 2.99 }, | |
{ "productName": "Hat", "itemCost": 5.99 } | |
], | |
"latitude": 33.037, | |
"longitude": -117.291 | |
}, | |
{ | |
"id": 3, | |
"firstName": "Zed", | |
"lastName": "Bishop", | |
"gender": "male", | |
"address": "1822 Long Bay Dr.", | |
"city": " Seattle ", | |
"state": { | |
"abbreviation": "WA", | |
"name": "Washington" | |
}, | |
"orders": [ | |
{ "productName": "Boomerang", "itemCost": 29.99 }, | |
{ "productName": "Helmet", "itemCost": 19.99 }, | |
{ "productName": "Kangaroo Saddle", "itemCost": 179.99 } | |
], | |
"latitude": 47.596, | |
"longitude": -122.331 | |
}, | |
{ | |
"id": 4, | |
"firstName": "Tina", | |
"lastName": "Adams", | |
"gender": "female", | |
"address": "79455 Pinetop Way", | |
"city": "Chandler", | |
"state": { | |
"abbreviation": "AZ", | |
"name": " Arizona " | |
}, | |
"orders": [ | |
{ "productName": "Budgie Smugglers", "itemCost": 19.99 }, | |
{ "productName": "Swimming Cap", "itemCost": 5.49 } | |
], | |
"latitude": 33.299, | |
"longitude": -111.963 | |
}, | |
{ | |
"id": 5, | |
"firstName": "Igor", | |
"lastName": "Minar", | |
"gender": "male", | |
"address": "576 Crescent Blvd.", | |
"city": " Dallas", | |
"state": { | |
"abbreviation": "TX", | |
"name": "Texas" | |
}, | |
"orders": [ | |
{ "productName": "Bow", "itemCost": 399.99 }, | |
{ "productName": "Arrows", "itemCost": 69.99 } | |
], | |
"latitude": 32.782927, | |
"longitude": -96.806191 | |
}, | |
{ | |
"id": 6, | |
"firstName": "Brad", | |
"lastName": "Green", | |
"gender": "male", | |
"address": "9874 Center St.", | |
"city": "Orlando ", | |
"state": { | |
"abbreviation": "FL", | |
"name": "Florida" | |
}, | |
"orders": [ | |
{ "productName": "Baseball", "itemCost": 9.99 }, | |
{ "productName": "Bat", "itemCost": 19.99 } | |
], | |
"latitude": 28.384238, | |
"longitude": -81.564103 | |
}, | |
{ | |
"id": 7, | |
"firstName": "Misko", | |
"lastName": "Hevery", | |
"gender": "male", | |
"address": "9812 Builtway Appt #1", | |
"city": "Carey ", | |
"state": { | |
"abbreviation": "NC", | |
"name": "North Carolina" | |
}, | |
"orders": [ | |
{ "productName": "Surfboard", "itemCost": 299.99 }, | |
{ "productName": "Wax", "itemCost": 5.99 }, | |
{ "productName": "Shark Repellent", "itemCost": 15.99 } | |
], | |
"latitude": 35.727985, | |
"longitude": -78.797594 | |
}, | |
{ | |
"id": 8, | |
"firstName": "Heedy", | |
"lastName": "Wahlin", | |
"gender": "female", | |
"address": "4651 Tuvo St.", | |
"city": "Anaheim", | |
"state": { | |
"abbreviation": "CA", | |
"name": "California" | |
}, | |
"orders": [ | |
{ "productName": "Saddle", "itemCost": 599.99 }, | |
{ "productName": "Riding cap", "itemCost": 79.99 } | |
], | |
"latitude": 33.809898, | |
"longitude": -117.918757 | |
}, | |
{ | |
"id": 9, | |
"firstName": "John", | |
"lastName": "Papa", | |
"gender": "male", | |
"address": "66 Ray St.", | |
"city": " Orlando", | |
"state": { | |
"abbreviation": "FL", | |
"name": "Florida" | |
}, | |
"orders": [ | |
{ "productName": "Baseball", "itemCost": 9.99 }, | |
{ "productName": "Bat", "itemCost": 19.99 } | |
], | |
"latitude": 28.384238, | |
"longitude": -81.564103 | |
}, | |
{ | |
"id": 10, | |
"firstName": "Tonya", | |
"lastName": "Smith", | |
"gender": "female", | |
"address": "1455 Chandler Blvd.", | |
"city": " Atlanta", | |
"state": { | |
"abbreviation": "GA", | |
"name": "Georgia" | |
}, | |
"orders": [ | |
{ "productName": "Surfboard", "itemCost": 299.99 }, | |
{ "productName": "Wax", "itemCost": 5.99 }, | |
{ "productName": "Shark Repellent", "itemCost": 7.99 } | |
], | |
"latitude": 33.762297, | |
"longitude": -84.392953 | |
}, | |
{ | |
"id": 11, | |
"firstName": "ward", | |
"lastName": "bell", | |
"gender": "male", | |
"address": "888 Central St.", | |
"city": "Los Angeles", | |
"state": { | |
"abbreviation": "CA", | |
"name": "California" | |
}, | |
"latitude": 34.042552, | |
"longitude": -118.266429 | |
}, | |
{ | |
"id": 12, | |
"firstName": "Marcus", | |
"lastName": "Hightower", | |
"gender": "male", | |
"address": "1699 Atomic St.", | |
"city": "Dallas", | |
"state": { | |
"abbreviation": "TX", | |
"name": "Texas" | |
}, | |
"latitude": 32.782927, | |
"longitude": -96.806191 | |
}, | |
{ | |
"id": 13, | |
"firstName": "Thomas", | |
"lastName": "Martin", | |
"gender": "male", | |
"address": "98756 Center St.", | |
"city": "New York", | |
"state": { | |
"abbreviation": "NY", | |
"name": "New York City" | |
}, | |
"orders": [ | |
{ "productName": "Car", "itemCost": 42999.99 }, | |
{ "productName": "Wax", "itemCost": 5.99 }, | |
{ "productName": "Shark Repellent", "itemCost": 7.99 } | |
], | |
"latitude": 40.725037, | |
"longitude": -74.004903 | |
}, | |
{ | |
"id": 14, | |
"firstName": "Jean", | |
"lastName": "Martin", | |
"gender": "female", | |
"address": "98756 Center St.", | |
"city": "New York City", | |
"state": { | |
"abbreviation": "NY", | |
"name": "New York" | |
}, | |
"latitude": 40.725037, | |
"longitude": -74.004903 | |
}, | |
{ | |
"id": 15, | |
"firstName": "Pinal", | |
"lastName": "Dave", | |
"gender": "male", | |
"address": "23566 Directive Pl.", | |
"city": "White Plains", | |
"state": { | |
"abbreviation": "NY", | |
"name": "New York" | |
}, | |
"latitude": 41.028726, | |
"longitude": -73.758261 | |
}, | |
{ | |
"id": 16, | |
"firstName": "Robin", | |
"lastName": "Cleark", | |
"gender": "female", | |
"address": "35632 Richmond Circle Apt B", | |
"city": "Las Vegas", | |
"state": { | |
"abbreviation": "NV", | |
"name": "Nevada" | |
}, | |
"latitude": 36.091824, | |
"longitude": -115.174247 | |
}, | |
{ | |
"id": 17, | |
"firstName": "Fred", | |
"lastName": "Roberts", | |
"gender": "male", | |
"address": "12 Ocean View St.", | |
"city": "Houston", | |
"state": { | |
"abbreviation": "TX", | |
"name": "Texas" | |
}, | |
"latitude": 29.750163, | |
"longitude": -95.362769 | |
}, | |
{ | |
"id": 18, | |
"firstName": "Robyn", | |
"lastName": "Flores", | |
"gender": "female", | |
"address": "23423 Adams St.", | |
"city": "Seattle", | |
"state": { | |
"abbreviation": "WA", | |
"name": "Washington" | |
}, | |
"latitude": 47.596, | |
"longitude": -122.331 | |
}, | |
{ | |
"id": 19, | |
"firstName": "Elaine", | |
"lastName": "Jones", | |
"gender": "female", | |
"address": "98756 Center St.", | |
"city": "Barcelona", | |
"state": { | |
"abbreviation": "CAT", | |
"name": "Catalonia" | |
}, | |
"latitude": 41.386444, | |
"longitude": 2.111988 | |
}, | |
{ | |
"id": 20, | |
"firstName": "Lilija", | |
"lastName": "Arnarson", | |
"gender": "female", | |
"address": "23423 Adams St.", | |
"city": "Reykjavik", | |
"state": { | |
"abbreviation": "IS", | |
"name": "Iceland" | |
}, | |
"latitude": 64.120278, | |
"longitude": -21.830471 | |
}, | |
{ | |
"id": 21, | |
"firstName": "Laurent", | |
"lastName": "Bugnion", | |
"gender": "male", | |
"address": "9874 Lake Blvd.", | |
"city": "Zurich", | |
"state": { | |
"abbreviation": "COZ", | |
"name": "Canton of Zurick" | |
}, | |
"orders": [ | |
{ "productName": "Baseball", "itemCost": 9.99 }, | |
{ "productName": "Bat", "itemCost": 19.99 } | |
], | |
"latitude": 47.341337, | |
"longitude": 8.582503 | |
}, | |
{ | |
"id": 22, | |
"firstName": "Gabriel", | |
"lastName": "Flores", | |
"gender": "male", | |
"address": "2543 Cassiano", | |
"city": "Rio de Janeiro", | |
"state": { | |
"abbreviation": "WA", | |
"name": "Rio de Janeiro" | |
}, | |
"latitude": -22.919369, | |
"longitude": -43.181836 | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v1.0/rc.schema.json", | |
"plugins": [ | |
{ | |
"name": "CrudApiPlugin", | |
"enabled": true, | |
"pluginPath": "plugins\\dev-proxy-plugins.dll", | |
"configSection": "customersApi" | |
} | |
], | |
"urlsToWatch": [ | |
"https://api.contoso.com/*" | |
], | |
"customersApi": { | |
"apiFile": "customers-api.json" | |
}, | |
"rate": 50, | |
"labelMode": "text", | |
"logLevel": "info" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment