-
Notifications
You must be signed in to change notification settings - Fork 716
Expand file tree
/
Copy pathSomeOpenApiODataWebApiExample.http
More file actions
34 lines (26 loc) · 1.15 KB
/
SomeOpenApiODataWebApiExample.http
File metadata and controls
34 lines (26 loc) · 1.15 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
###
# SomeOpenApiODataWebApiExample - ASP.NET OData Web API with Minimal OpenAPI
# This example demonstrates a simple OData controller with OpenAPI support for legacy ASP.NET Web API
###
@baseUrl = http://localhost:52667
### Books - Get All - Version 1.0
# Get all books
GET {{baseUrl}}/api/books?api-version=1.0
### Books - Get All with $select - Version 1.0
# Get books with specific fields
GET {{baseUrl}}/api/books?api-version=1.0&$select=Title,Author
### Books - Get All with $filter - Version 1.0
# Get filtered books by author
GET {{baseUrl}}/api/books?api-version=1.0&$filter=Author eq 'Leo Tolstoy'
### Books - Get All with $orderby - Version 1.0
# Get books ordered by publication year
GET {{baseUrl}}/api/books?api-version=1.0&$orderby=Published desc
### Books - Get All with $top - Version 1.0
# Get top 3 books
GET {{baseUrl}}/api/books?api-version=1.0&$top=3
### Books - Get by ID - Version 1.0
# Get a specific book by ISBN
GET {{baseUrl}}/api/books/9781847490599?api-version=1.0
### Books - Get by ID with $select - Version 1.0
# Get a specific book with selected fields
GET {{baseUrl}}/api/books/9781847490599?api-version=1.0&$select=Title,Published