- LPU MCA Semester 1
- CAP470
- Unit 5
CAP470 · Unit 5: Cloud access, storage and file systems
Cloud access: platforms, web applications, web APIs and browsers
12 practice questions · in the ETE syllabus
Key points
- Browsers reach web applications; programs use web APIs
- REST uses URLs and HTTP methods on resources
- 2xx success, 4xx client error, 5xx server error
- JSON is the usual API data format
Cloud services are reached over a network. The most common client is a web browser, which uses web applications that run on the provider's servers, so nothing needs to be installed locally. Programs and scripts use web APIs (Application Programming Interfaces), which let software request and manage cloud resources automatically.
Most cloud APIs follow the REST style: resources are identified by URLs and operated on with standard HTTP methods.
| HTTP method | Typical use |
|---|---|
| GET | Read a resource without changing it |
| POST | Create a resource or submit data |
| PUT | Replace or update a resource |
| DELETE | Remove a resource |
HTTP status codes tell the outcome: 2xx success (200 OK), 3xx redirection, 4xx client error (404 not found) and 5xx server error (500). A URL such as https://api.example.com/v1/files?id=7 has a path (/v1/files) and a query string (id=7), and query values are URL-encoded (a space becomes +). Responses are usually JSON, a compact text format that maps to dictionaries and lists.
Exam trap: the first digit of an HTTP status code gives its class, so 404 is a client error and 500 a server error.
Try two questions
What does the HTTP status code 404 mean?
- The requested resource was not found
- The server crashed while handling the request
- The request was accepted and is being processed later
- The user was permanently redirected to a new address
Show the answer
A. 404 is a client-side error: the URL does not match any resource.
Why not B: A server failure is reported with a 5xx code such as 500.
Why not C: Accepted for later processing is 202.
Why not D: Permanent redirection is 301.
Why are APIs important for cloud services?
- They make it impossible for users to access resources manually
- They replace the need for a network connection to the provider
- They let programs request and manage cloud resources automatically
- They store the physical servers inside the user's computer
Show the answer
C. Cloud consoles and tools call the same APIs that scripts and applications use.
Why not A: APIs add a way to automate; they do not block manual access.
Why not B: APIs are used over a network connection.
Why not D: APIs are software interfaces, not hardware.