-
Notifications
You must be signed in to change notification settings - Fork 716
Expand file tree
/
Copy pathBasicODataWebApiExample.http
More file actions
46 lines (35 loc) · 1.39 KB
/
BasicODataWebApiExample.http
File metadata and controls
46 lines (35 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
###
# BasicODataWebApiExample - ASP.NET OData Web API with Versioning
# This example demonstrates basic OData endpoints with API versioning for legacy ASP.NET Web API
###
@baseUrl = http://localhost:52667
### People - Get All - Version 1.0
# Get all people using OData query
GET {{baseUrl}}/api/people?api-version=1.0
### People - Get All with $select - Version 1.0
# Get all people with specific fields
GET {{baseUrl}}/api/people?api-version=1.0&$select=FirstName,LastName
### People - Get All with $filter - Version 1.0
# Get filtered people
GET {{baseUrl}}/api/people?api-version=1.0&$filter=Id eq 1
### People - Get by Key - Version 1.0
# Get a specific person by ID
GET {{baseUrl}}/api/people/1?api-version=1.0
### People - Get All - Version 2.0
# Get all people using OData query
GET {{baseUrl}}/api/people?api-version=2.0
### People - Get All with $select - Version 2.0
# Get all people with specific fields
GET {{baseUrl}}/api/people?api-version=2.0&$select=FirstName,LastName,Email
### People - Get by Key - Version 2.0
# Get a specific person by ID
GET {{baseUrl}}/api/people/1?api-version=2.0
### Orders - Get All - Version 1.0
# Get all orders
GET {{baseUrl}}/api/v1/orders
### Orders - Get All with $select - Version 1.0
# Get orders with specific fields
GET {{baseUrl}}/api/v1/orders?$select=Id,Customer
### Orders - Get by Key - Version 1.0
# Get a specific order by ID
GET {{baseUrl}}/api/v1/orders/1