CS计算机代考程序代写 scheme data structure chain case study cache SE457 Week 6 – REST (Continued)

SE457 Week 6 – REST (Continued)
Steven Engelhardt
DePaul University
Spring 2021
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 1 / 51

Table of Contents
1 Last Week
Last Week Review
Quiz 3 Review
2 REST
GitHub REST API Case Study Stripe REST API Case Study Okta API Case Study
Stack Exchange API Case Study Case Study Comparison
3 REST Relatives OData
4 Wrap-Up
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 2 / 51

Table of Contents
1 Last Week
Last Week Review
Quiz 3 Review
2 REST
GitHub REST API Case Study Stripe REST API Case Study Okta API Case Study
Stack Exchange API Case Study Case Study Comparison
3 REST Relatives OData
4 Wrap-Up
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 3 / 51

Last Week
• Discussed various considerations when designing a RESTful API such as handling collections, authentication, safety and idempotency, caching, versioning, etc.
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 4 / 51

Table of Contents
1 Last Week
Last Week Review
Quiz 3 Review
2 REST
GitHub REST API Case Study Stripe REST API Case Study Okta API Case Study
Stack Exchange API Case Study Case Study Comparison
3 REST Relatives OData
4 Wrap-Up
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 5 / 51

Question 1
(1 point(s)) SOA governance is concerned with which of the following?
1 Creating chains of responsibility and authority.
2 Providing policy and control mechanisms.
3 Enable people to make decisions within the service lifecycle.
4 All of the above.
5 None of the above.
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 6 / 51

Question 1
(1 point(s)) SOA governance is concerned with which of the following?
1 Creating chains of responsibility and authority.
2 Providing policy and control mechanisms.
3 Enable people to make decisions within the service lifecycle.
4 All of the above.
5 None of the above.
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 6 / 51

Question 2
(1 point(s)) Which of the following are benefits of effective SOA governance?
1 Improved ability to realize business benefits of SOA.
2 Mitigate business risks by improving quality and consistency of service.
3 Improve team effectiveness by measuring the right things and improving communication between IT and the business.
4 All of the above.
5 None of the above.
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 7 / 51

Question 2
(1 point(s)) Which of the following are benefits of effective SOA governance?
1 Improved ability to realize business benefits of SOA.
2 Mitigate business risks by improving quality and consistency of service.
3 Improve team effectiveness by measuring the right things and improving communication between IT and the business.
4 All of the above.
5 None of the above.
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 7 / 51

Question 3
(1 point(s)) Service governance addresses which of the following?
1 Funding and ownership.
2 Who pays for new services.
3 Who is the owner if a service and their role in driving adoption and SLAs.
4 All of the above.
5 None of the above.
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 8 / 51

Question 3
(1 point(s)) Service governance addresses which of the following?
1 Funding and ownership.
2 Who pays for new services.
3 Who is the owner if a service and their role in driving adoption and SLAs.
4 All of the above.
5 None of the above.
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 8 / 51

Question 4
(1 point(s)) Three of the below XML documents are equivalent, one is different. Which XML document is unlike the other? Hint: You may need to review Internet documentation on XML namespaces carefully.
1 StevenEngelhardt

243 S Wabash AveChicagoIL60604
2 StevenEngelhardt243 S Wabash AveChicagoIL60604
3 StevenEngelhardt243 S Wabash AveChicagoIL60604 4 StevenEngelhardt

< street>243 S Wabash AveChicagoIL60604

Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 9 / 51

Question 4
(1 point(s)) Three of the below XML documents are equivalent, one is different. Which XML document is unlike the other? Hint: You may need to review Internet documentation on XML namespaces carefully.
1 StevenEngelhardt

243 S Wabash AveChicagoIL60604
2 StevenEngelhardt243 S Wabash AveChicagoIL60604
3 StevenEngelhardt243 S Wabash AveChicagoIL60604 4 StevenEngelhardt

< street>243 S Wabash AveChicagoIL60604

Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 9 / 51

Question 5
(1 point(s)) What is the purpose of an XML schema?
1 To determine whether an XML document is well-formed.
2 To provide constraints on the structure and content of documents, above and beyond the basic syntactical constraints imposed by XML itself.
3 To resolve ambiguity between identically named elements or attributes from different XML vocabularies.
4 To act as a processing instruction that identifies the document as being XML.
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 10 / 51

Question 5
(1 point(s)) What is the purpose of an XML schema?
1 To determine whether an XML document is well-formed.
2 To provide constraints on the structure and content of documents, above and beyond the basic syntactical constraints imposed by XML itself.
3 To resolve ambiguity between identically named elements or attributes from different XML vocabularies.
4 To act as a processing instruction that identifies the document as being XML.
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 10 / 51

Question 6
(1 point(s)) What is the purpose of WSDL?
1 To provide a machine-readable description of how the service can be called, what parameters it expects, and what data structures it returns.
2 To allow developers to invoke processes running on disparate operating systems.
3 To act as the enclosing element of an XML message and identify it as a SOAP message.
4 To process SOAP header blocks targeted at it and to forward a SOAP message towards an ultimate SOAP receiver.
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 11 / 51

Question 6
(1 point(s)) What is the purpose of WSDL?
1 To provide a machine-readable description of how the service can be called, what parameters it expects, and what data structures it returns.
2 To allow developers to invoke processes running on disparate operating systems.
3 To act as the enclosing element of an XML message and identify it as a SOAP message.
4 To process SOAP header blocks targeted at it and to forward a SOAP message towards an ultimate SOAP receiver.
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 11 / 51

Question 7a
(2 point(s)) Match the following HTTP status code ranges to their meaning.
100-199
1 Information
2 Success
3 Redirection
4 Client-Side Error
5 Server-Side Error
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 12 / 51

Question 7a
(2 point(s)) Match the following HTTP status code ranges to their meaning.
100-199
1 Information
2 Success
3 Redirection
4 Client-Side Error
5 Server-Side Error
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 12 / 51

Question 7b
(2 point(s)) Match the following HTTP status code ranges to their meaning.
200-299
1 Information
2 Success
3 Redirection
4 Client-Side Error
5 Server-Side Error
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 13 / 51

Question 7b
(2 point(s)) Match the following HTTP status code ranges to their meaning.
200-299
1 Information
2 Success
3 Redirection
4 Client-Side Error
5 Server-Side Error
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 13 / 51

Question 7c
(2 point(s)) Match the following HTTP status code ranges to their meaning.
300-399
1 Information
2 Success
3 Redirection
4 Client-Side Error
5 Server-Side Error
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 14 / 51

Question 7c
(2 point(s)) Match the following HTTP status code ranges to their meaning.
300-399
1 Information
2 Success
3 Redirection
4 Client-Side Error
5 Server-Side Error
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 14 / 51

Question 7d
(2 point(s)) Match the following HTTP status code ranges to their meaning.
400-499
1 Information
2 Success
3 Redirection
4 Client-Side Error
5 Server-Side Error
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 15 / 51

Question 7d
(2 point(s)) Match the following HTTP status code ranges to their meaning.
400-499
1 Information
2 Success
3 Redirection
4 Client-Side Error
5 Server-Side Error
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 15 / 51

Question 7e
(2 point(s)) Match the following HTTP status code ranges to their meaning.
500-599
1 Information
2 Success
3 Redirection
4 Client-Side Error
5 Server-Side Error
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 16 / 51

Question 7e
(2 point(s)) Match the following HTTP status code ranges to their meaning.
500-599
1 Information
2 Success
3 Redirection
4 Client-Side Error
5 Server-Side Error
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 16 / 51

Question 8a
(3 point(s)) In a RESTful API, match each of the following verbs to its CRUD operation
GET
1 Read
2 Create
3 Update
4 Delete
5 Partial Update
6 List allowed operations on a resource
7 Return only the response headers and no response body
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 17 / 51

Question 8a
(3 point(s)) In a RESTful API, match each of the following verbs to its CRUD operation
GET
1 Read
2 Create
3 Update
4 Delete
5 Partial Update
6 List allowed operations on a resource
7 Return only the response headers and no response body
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 17 / 51

Question 8b
(3 point(s)) In a RESTful API, match each of the following verbs to its CRUD operation
POST
1 Read
2 Create
3 Update
4 Delete
5 Partial Update
6 List allowed operations on a resource
7 Return only the response headers and no response body
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 18 / 51

Question 8b
(3 point(s)) In a RESTful API, match each of the following verbs to its CRUD operation
POST
1 Read
2 Create
3 Update
4 Delete
5 Partial Update
6 List allowed operations on a resource
7 Return only the response headers and no response body
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 18 / 51

Question 8c
(3 point(s)) In a RESTful API, match each of the following verbs to its CRUD operation
PUT
1 Read
2 Create
3 Update
4 Delete
5 Partial Update
6 List allowed operations on a resource
7 Return only the response headers and no response body
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 19 / 51

Question 8c
(3 point(s)) In a RESTful API, match each of the following verbs to its CRUD operation
PUT
1 Read
2 Create
3 Update
4 Delete
5 Partial Update
6 List allowed operations on a resource
7 Return only the response headers and no response body
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 19 / 51

Question 8d
(3 point(s)) In a RESTful API, match each of the following verbs to its CRUD operation
DELETE
1 Read
2 Create
3 Update
4 Delete
5 Partial Update
6 List allowed operations on a resource
7 Return only the response headers and no response body
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 20 / 51

Question 8d
(3 point(s)) In a RESTful API, match each of the following verbs to its CRUD operation
DELETE
1 Read
2 Create
3 Update
4 Delete
5 Partial Update
6 List allowed operations on a resource
7 Return only the response headers and no response body
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 20 / 51

Question 8e
(3 point(s)) In a RESTful API, match each of the following verbs to its CRUD operation
PATCH
1 Read
2 Create
3 Update
4 Delete
5 Partial Update
6 List allowed operations on a resource
7 Return only the response headers and no response body
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 21 / 51

Question 8e
(3 point(s)) In a RESTful API, match each of the following verbs to its CRUD operation
PATCH
1 Read
2 Create
3 Update
4 Delete
5 Partial Update
6 List allowed operations on a resource
7 Return only the response headers and no response body
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 21 / 51

Question 8f
(3 point(s)) In a RESTful API, match each of the following verbs to its CRUD operation
OPTIONS
1 Read
2 Create
3 Update
4 Delete
5 Partial Update
6 List allowed operations on a resource
7 Return only the response headers and no response body
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 22 / 51

Question 8f
(3 point(s)) In a RESTful API, match each of the following verbs to its CRUD operation
OPTIONS
1 Read
2 Create
3 Update
4 Delete
5 Partial Update
6 List allowed operations on a resource
7 Return only the response headers and no response body
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 22 / 51

Question 8g
(3 point(s)) In a RESTful API, match each of the following verbs to its CRUD operation
HEAD
1 Read
2 Create
3 Update
4 Delete
5 Partial Update
6 List allowed operations on a resource
7 Return only the response headers and no response body
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 23 / 51

Question 8g
(3 point(s)) In a RESTful API, match each of the following verbs to its CRUD operation
HEAD
1 Read
2 Create
3 Update
4 Delete
5 Partial Update
6 List allowed operations on a resource
7 Return only the response headers and no response body
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 23 / 51

Table of Contents
1 Last Week
Last Week Review
Quiz 3 Review
2 REST
GitHub REST API Case Study Stripe REST API Case Study Okta API Case Study
Stack Exchange API Case Study Case Study Comparison
3 REST Relatives OData
4 Wrap-Up
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 24 / 51

Table of Contents
1 Last Week
Last Week Review
Quiz 3 Review
2 REST
GitHub REST API Case Study Stripe REST API Case Study Okta API Case Study
Stack Exchange API Case Study Case Study Comparison
3 REST Relatives OData
4 Wrap-Up
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 25 / 51

GitHub REST API v3
• GitHub is a web-based hosting service for version control using git
• The GitHub REST API allows full programmatic access to GitHub resources, including:
• Organizations • Users
• Repositories • Pull requests • Issues
• Gists • Etc.
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 26 / 51

GitHub REST API Example
GET /users/sengelha HTTP/1.1 Host: api.github.com
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8 Cache-Control: public, max-age=60, s-maxage=60 Vary: Accept
ETag: W/”2a42944dfddb4872644a3be056d690f7″ Last-Modified: Thu, 09 Apr 2015 19:42:52 GMT Access-Control-Allow-Origin: *
Content-Length: 1218
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 48
X-RateLimit-Reset: 1525799546
{
“login”: “sengelha”,
“id”: 482551,
“avatar_url”: “https://avatars0.githubusercontent.com/u/482551?v=4”, …
}
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 27 / 51

GitHub REST API Documentation
• https://developer.github.com/v3/
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 28 / 51

GitHub REST API Design Decisions
• All access via HTTPS
• All data sent and received via JSON with github-specific
content-types
• Authentication supports HTTP basic, OAuth2 token (either as header or query-string parameter), and OAuth2 key/secret
• Some endpoints are unauthenticated (e.g. GET /users/xxx), some require authentication
• Versioning via content-negotiation (Accept: application/vnd.github.v3+json)
• All timestamps in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ), which also supports time zone specifications
• No locale support
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 29 / 51

GitHub REST API Design Decisions
• Fetching a list of resources returns summary descriptions. Fetching an individual resource returns a detailed representation.
• Many API methods take optional parameters, frequently used to filter collections (e.g. https://api.github.com/repos/vmg/ redcarpet/issues?state=closed)
• Requests that return multiple items will be paginated to 30 items by default, but this can be controlled with a ?per_page parameter (up to a maximum of 100)
• Multiple URL paths to collection of same noun (e.g. GET /user/repos, GET /users/:username/repos, GET /orgs/:org/repos)
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 30 / 51

GitHub REST API Design Decisions
• Requests are rate limited to 60 requests/hour (unauthenticated), 5000 requests/hour (authenticated)
• Caching, Etag, Last-Modified all supported
• CORS allowed from any origin
• Documentation appears largely handwritten, with much descriptive prose and inline examples
• GitHub provides a client-access library (Octokit) to make using API easier
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 31 / 51

GitHub REST API Design Decisions
• Nontrivial searching (e.g. find me all repositories with size > 10000) require the use of a separate search endpoint, distinct from the normal collection endpoint
• There is no obvious, programmatic way for retrieving the schema of a particular resource.
• No way to control what fields are returned from the collection summary or item detail view
• What if you want to show a table of repositories that has a column which isn’t in the collection summary?
• What if you’re displaying the information on a single item and only need a few fields?
• What if an item detail field is expensive to calculate?
• What if you want to be able to parameterize an item detail field (e.g.
give me the value in a different currency)?
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 32 / 51

Table of Contents
1 Last Week
Last Week Review
Quiz 3 Review
2 REST
GitHub REST API Case Study Stripe REST API Case Study Okta API Case Study
Stack Exchange API Case Study Case Study Comparison
3 REST Relatives OData
4 Wrap-Up
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 33 / 51

Stripe REST API
https://stripe.com/docs/api
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 34 / 51

Table of Contents
1 Last Week
Last Week Review
Quiz 3 Review
2 REST
GitHub REST API Case Study Stripe REST API Case Study Okta API Case Study
Stack Exchange API Case Study Case Study Comparison
3 REST Relatives OData
4 Wrap-Up
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 35 / 51

Okta API
https://developer.okta.com/docs/reference/api-overview/
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 36 / 51

Notable Observations
• HTTPS-only
• URL-based versioning
https://{yourOktaDomain}.com/api/{apiversion}
• Custom HTTP authentication scheme SWSS. Some endpoints support
OAuth 2.0 access tokens.
• Accept-Language for language negotation
• X-Device-Fingerprint for device fingerprinting
• Cursor-based pagination using before and after. Includes Link header in responses to tell clients how to paginate.
• Supports filtering expressions using filter keyword (e.g. filter=firstName eq “john”)
• Embraces HATEOAS
• Includes a request id X-Okta-Request-Id in every response
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 37 / 51

Table of Contents
1 Last Week
Last Week Review
Quiz 3 Review
2 REST
GitHub REST API Case Study Stripe REST API Case Study Okta API Case Study
Stack Exchange API Case Study Case Study Comparison
3 REST Relatives OData
4 Wrap-Up
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 38 / 51

Stack Exchange API
https://api.stackexchange.com/docs
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 39 / 51

Notable Observations
• Requires that all responses are compressed
• Uses OAuth 2.0 for authentication
• Supports batch get with semicolon delimiters (e.g. /users/1;2;3;4;5)
• Supports sorting with sort= and order= parameters
• Models filters as first-class resources
• Uses page and pagesize for paging
• Uses unix epoch time for all dates in the API (not ISO8601)
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 40 / 51

Table of Contents
1 Last Week
Last Week Review
Quiz 3 Review
2 REST
GitHub REST API Case Study Stripe REST API Case Study Okta API Case Study
Stack Exchange API Case Study Case Study Comparison
3 REST Relatives OData
4 Wrap-Up
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 41 / 51

Summary
Exchange Format Versioning
Encryption Authentication
Compression Collection Filtering
Pagination Rate Limiting
Client-Provided User-Agent Caching Dates/Times HATEOAS CORS
JSON-P
Response Expanding Batch GETs Idempotency IDs Request IDs
GitHub
JSON-only Content negotiation-based HTTPS-only HTTP Basic, OAuth2 Supported key=value
Index-based
X-RateLimit-*
headers Required
Extensive ISO 8601 Extensive Supported
Supported
Not Supported Not Supported Not Supported Not Supported
Stripe
JSON-only Date in custom HTTP header HTTPS-only API keys
Supported
key=value
Cursor-based 429 errors
Not Required
Unspecified
Unix timestamps Uncommon Supported
Supported Supported
Not Supported Supported Supported
Okta
JSON-only URL-based
HTTPS-only Custom (SSWS)
Supported
Full Boolean expressions in query string
Cursor-based X-Rate-Limit-* headers Recommended
Unspecified
ISO 8601 Extensive
On an API by API basis
Not Support Not Supported Not Supported Not Supported Supported
Stack Exchange
JSON-only URL-based
HTTP & HTTPS OAuth 2.0
Required
Filters as first-class resource
Index-based
429 errors with backoff responses Not Required
Extensive
Unix timestamps Uncommon Unspecified
Supported
Not Supported Supported
Not Supported Not Supported
Steven Engelhardt (DePaul University)
SE457 Week 6 – REST (Continued)
Spring 2021
42 / 51

Table of Contents
1 Last Week
Last Week Review
Quiz 3 Review
2 REST
GitHub REST API Case Study Stripe REST API Case Study Okta API Case Study
Stack Exchange API Case Study Case Study Comparison
3 REST Relatives OData
4 Wrap-Up
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 43 / 51

Table of Contents
1 Last Week
Last Week Review
Quiz 3 Review
2 REST
GitHub REST API Case Study Stripe REST API Case Study Okta API Case Study
Stack Exchange API Case Study Case Study Comparison
3 REST Relatives OData
4 Wrap-Up
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 44 / 51

Introduction to OData
• Problem: Different RESTful APIs which support filtering, sorting, etc. on collections would define their query languages slightly differently. There is no standardization or reuse across APIs and no discoverable metadata. This means that it’s impossible to built automated tooling (e.g. a query builder).
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 45 / 51

OData Key Ideas
• Embrace REST
• Standardize query language regardless of object type • Support discoverable metadata
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 46 / 51

OData Queries
• Sorting • GET
serviceRoot/People(‘scottketchum’)/Trips?$orderby=EndsAt
desc
• Filtering
• GET serviceRoot/People?$filter=FirstName eq ‘Scott’
• Pagination
• GET serviceRoot/People?$top=25&$skip=50
• Field Selection
• GET serviceRoot/Airports?$select=Name, IcaoCode
• Searching
• GET serviceRoot/People?$search=Boise
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 47 / 51

OData Also Supports…
• Discoverable metadata
• Retrieving collection counts
• Related item expansion
• Any/all operators
• Invoking custom actions and functions • (Much more)
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 48 / 51

OData Case Study
https://www.odata.org/odata-services/
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 49 / 51

Table of Contents
1 Last Week
Last Week Review
Quiz 3 Review
2 REST
GitHub REST API Case Study Stripe REST API Case Study Okta API Case Study
Stack Exchange API Case Study Case Study Comparison
3 REST Relatives OData
4 Wrap-Up
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 50 / 51

Next Steps
• HW 3 is due Tuesday, May 11 at 5:30PM.
• Be sure to spend some time on your research presentation!
Steven Engelhardt (DePaul University) SE457 Week 6 – REST (Continued) Spring 2021 51 / 51