Google News
logo
Rest API - Quiz(MCQ)
A)
1996
B)
1998
C)
2000
D)
2003

Correct Answer :   2000


Explanation : It's hard to believe, but Roy Fielding delivered his dissertation on REST in 2000, predating the SOA craze, microservices and cloud-native computing. But more than 20 years later, the RESTful architectural style remains prominent in the world of software development.

A)
Represent State Transfer
B)
Representational State Transfer
C)
Represent State Transform
D)
Representational State Transform

Correct Answer :   Representational State Transfer

A)
James Gosling
B)
Linus Torvalds
C)
Roy Fielding
D)
Kohsuke Kawaguchi

Correct Answer :   Roy Fielding


Explanation : The term REST was originally defined in Roy Fielding's doctoral dissertation, "Architectural Styles and the Design of Network-based Software Architectures." Kohsuke Kawaguchi created Jenkins. James Gosling invented Java. Linus Torvalds devised Linux and Git.

A)
URI
B)
VERB
C)
HTTP Version
D)
Request Header

Correct Answer :   Request Header


Explanation : Request Header − Contains metadata for the HTTP Request message as key-value pairs. For example, client ( or browser) type, format supported by client, format of message body, cache settings etc.

A)
Each resource in REST architecture is identified by its URI.
B)
Purpose of an URI is to locate a resource(s) on the server hosting the web service.
C)
Both (A) and (B)
D)
None of the above

Correct Answer :   Both (A) and (B)


Explanation : Each resource in REST architecture is identified by its URI. Purpose of an URI is to locate a resource(s) on the server hosting the web service.

A)
HTTP
B)
FTP
C)
SFTP
D)
FTPS

Correct Answer :   HTTP

A)
Success
B)
Failure
C)
Warning
D)
Completed

Correct Answer :   Success

A)
409 Conflict
B)
400 Bad Request
C)
406 Not Acceptable
D)
405 Method Not Allowed

Correct Answer :   405 Method Not Allowed

A)
Stateless
B)
Uniform Interface
C)
Chacheable
D)
Client-Server

Correct Answer :   Uniform Interface

A)
ssh
B)
bash
C)
curl
D)
powerShell

Correct Answer :   curl

A)
WRITE
B)
POST
C)
CREATE
D)
SUBMIT

Correct Answer :   POST

A)
REST supports only JSON representation.
B)
Each resource can be identified by multiple URIs.
C)
In REST Services, the client gets access to resources and the server provides access to them.
D)
All of the above.

Correct Answer :   In REST Services, the client gets access to resources and the server provides access to them.

A)
GET
B)
HEAD
C)
DELETE
D)
OPTION

Correct Answer :   OPTION

A)
idempotency
B)
cacheability
C)
a uniform interface
D)
stateless architecture

Correct Answer :   idempotency

A)
a modern replacement for API keys
B)
the new name for SAML 3.0
C)
an SSO competitor for OAuth 2.0
D)
an identify layer on top of OAuth 2.0

Correct Answer :   an identify layer on top of OAuth 2.0

A)
GET
B)
DELETE
C)
POST
D)
OPTIONS

Correct Answer :   DELETE


Explanation : DELETE opearations should be used to delete resource using RESTful web service.

A)
Public
B)
Private
C)
max-age
D)
no-cache/no-store

Correct Answer :   no-cache/no-store

A)
200
B)
201
C)
304
D)
204

Correct Answer :   304


Explanation : HTTP Status Code 304 means NOT MODIFIED, used to reduce network bandwidth usage in case of conditional GET requests.

A)
CORS
B)
SSL
C)
Headers
D)
Cache control

Correct Answer :   CORS


Explanation : By default, a RESTful web service will not allow requests from clients outside of the domain and port on which it is hosted. To allow this, cross-origin resource sharing, or CORS, must be enabled.

A)
PUT
B)
POST
C)
OPTION
D)
CREATE

Correct Answer :   PUT


Explanation : When the resource identifier is supplied as part of the URL, along with metadata to be used to create the object, the correct HTTP method to use is PUT.

A)
Uniformity
B)
Idempotence
C)
Immutability
D)
Statefulness

Correct Answer :   Idempotence

A)
Code on demand
B)
The use of a client-server model
C)
Service orchestration
D)
A stateless request-response cycle

Correct Answer :   Service orchestration


Explanation : Code on demand, the client-server model and a stateless request-response cycle are all RESTful constraints described in Roy Fielding's dissertation on RESTful web services. Service orchestration, which is most commonly associated with cloud-native Kubernetes clusters, is not a RESTful constraint.

A)
catch error faster
B)
log additional data
C)
improve error logging
D)
notify other systems of an event

Correct Answer :   notify other systems of an event

A)
It improves uptime.
B)
Mobile app work better.
C)
It offers better security.
D)
It reduce load on servers.

Correct Answer :   It reduce load on servers.

A)
GET /books/{id}
B)
GET /{id}/books/
C)
GET /book?id={id}
D)
GET /books?id={id}

Correct Answer :   GET /books/{id}


Explanation : RESTful URLs preferably identify resources through URL parameters as opposed to query parameters. Furthermore, the name of the collection type should precede the unique identifier of the resource, which makes GET /books/{id}

A)
405
B)
404
C)
403
D)
402

Correct Answer :   404

A)
Error
B)
Warning
C)
Success
D)
Completed

Correct Answer :   Success

A)
401
B)
500
C)
501
D)
502

Correct Answer :   500

A)
TRUE
B)
FALSE
C)
Can not say
D)
--

Correct Answer :   FALSE

30 .
The side-effects of N > 0 identical requests are the same as for a single request. This is________
A)
APIance
B)
RESTFullness
C)
Equivalence
D)
Idempotency

Correct Answer :   Idempotency

A)
Kebab case
B)
Studly caps
C)
Camel case
D)
Caesar cipher

Correct Answer :   Kebab case

A)
The RESTful naming convention
B)
The RESTful consistency constraint
C)
The uniform interface constraint
D)
The RESTful pattern matching convention

Correct Answer :   The uniform interface constraint


Explanation : The uniform interface constraint demands that URLs and URIs be designed in a predictable and consistent manner that is easily navigated and consumed by RESTful clients.

A)
@PathParam
B)
@QueryParam
C)
@PathVariable
D)
@HeaderParam

Correct Answer :   @HeaderParam

A)
Warning
B)
Server Error
C)
Client Error
D)
Redirection

Correct Answer :   Server Error

A)
more stable APIs
B)
more secure by default
C)
flexible querying/responses
D)
compatible with more gateways

Correct Answer :   flexible querying/responses

A)
/companies/{id} and/companies
B)
/company/{id} and/company
C)
/companies/{id} and/company
D)
/company/{id} and/companies

Correct Answer :   /companies/{id} and/companies

A)
to move infrastructure to the cloud.
B)
to share features and functionality with other system.
C)
to appease the latest digital transformation effort.
D)
to add new technologies to an organization's infrastructure.

Correct Answer :   to share features and functionality with other system.

A)
text/html
B)
application/json
C)
application/json_version2
D)
application/vnd.myapp.v2+json

Correct Answer :   application/vnd.myapp.v2+json

A)
No
B)
Yes
C)
Can not say
D)
Depends on situation

Correct Answer :   No

A)
no-store
B)
no-cache
C)
must-revalidate
D)
None of the above

Correct Answer :   must-revalidate

A)
TCP is stateless
B)
TCP is faster than UDP
C)
TCP supports broadcasting
D)
TCP guarantees delivery of data

Correct Answer :   TCP guarantees delivery of data

A)
path
B)
scheme
C)
protocol
D)
authority

Correct Answer :   scheme

A)
bits
B)
octets
C)
hextets
D)
musketeers

Correct Answer :   octets

A)
OWASP
B)
Smartbear Specification
C)
OpenAPI Specification
D)
RESTful API Specification

Correct Answer :   OpenAPI Specification

A)
GET
B)
Accept
C)
User-Agent
D)
Content-Type

Correct Answer :   Accept


Explanation : The Accept header can be configured to tell the server how to format the exchanged data. The Content-Type header informs the client of the format of the data being delivered. The User-Agent property describes the browser type. GET is an HTTP method, not a standard HTTP header.

A)
Authentication
B)
Authorization
C)
Can not say
D)
--

Correct Answer :   Authentication

A)
REST is a web service standard
B)
REST is a cloud-native API framework
C)
REST is a microservices-based protocol
D)
REST is an architectural style

Correct Answer :   REST is an architectural style


Explanation : REST predates the common use of terms such as cloud-native and microservices by almost 20 years. It is certainly used for web services, but it is not actually a standard. Instead, REST is considered an architectural style.

A)
A web service is a collection of open protocols and standards used for exchanging data between applications or systems.
B)
Software applications written in various programming languages and running on various platforms can use web services to exchange data among them over computer networks like the Internet.
C)
Both (A) and (B)
D)
None of the above

Correct Answer :   Both (A) and (B)


Explanation : A web service is a collection of open protocols and standards used for exchanging data between applications or systems. Software applications written in various programming languages and running on various platforms can use web services to exchange data over computer networks like the Internet in a manner similar to inter-process communication on a single computer.

A)
It identifies the client application or SDK.
B)
It identifies the user ID.
C)
It identifies if the API should accept microservice traffic.
D)
It identifies if the API should expect a user authentication.

Correct Answer :   It identifies the client application or SDK.

A)
Ownership
B)
data in the token
C)
and integer
D)
a permission

Correct Answer :   data in the token

A)
OpenAPI
B)
API proxy
C)
API gateway
D)
OAuth authorization server

Correct Answer :   API proxy

A)
Redirection
B)
Client Error
C)
Server Error
D)
Informational

Correct Answer :   Informational

A)
HTTP Version
B)
Status Code
C)
Response Header
D)
Response Body

Correct Answer :   Response Header

A)
Code on Demand
B)
Stateless
C)
Client-Server
D)
Uniform Interface

Correct Answer :   Code on Demand

A)
WSDL
B)
WADL
C)
OAuth
D)
OpenAPI (Swagger)

Correct Answer :   OpenAPI (Swagger)

A)
@PUT
B)
@POST
C)
@GET
D)
@Path

Correct Answer :   @POST


Explanation : @POST − HTTP Get request, used to create/update resource.

A)
@Context
B)
@DefaultValue
C)
@FormParam
D)
@CookieParam

Correct Answer :   @DefaultValue


Explanation : @DefaultValue − Assigns a default value to a parameter passed to method.

A)
True
B)
False
C)
Can not say
D)
--

Correct Answer :   True


Explanation : RESTful web services use HTTP methods to implement the concept of REST architecture.

A)
Not Modified
B)
User can select among multiple links and go to different page.
C)
The resource requested has been found and moved temporarily to new URL location.
D)
The page requested is available only by means of proxy address given in the response.

Correct Answer :   The resource requested has been found and moved temporarily to new URL location.

A)
403
B)
404
C)
406
D)
409

Correct Answer :   403


Explanation : HTTP Status Code 403 means FORBIDDEN, states that user is not having access to method being used for example, delete access without admin rights

A)
Web services can treat each method request independently.
B)
Web services need not to maintain client's previous interactions. It simplifies application design.
C)
As HTTP is itself a statelessness protocol, RESTful Web services work seamlessly with HTTP protocol.
D)
All of the above.

Correct Answer :   All of the above.

A)
Public
B)
Private
C)
max-age
D)
no-cache/no-store

Correct Answer :   Private

A)
It also provides supports for creating clients for RESTful web services.
B)
JAX-RS makes heavy use of annotations available from Java SE 5 to simplify development of JAVA based web services creation and deployment.
C)
Both (A) and (B)
D)
None of the above

Correct Answer :   Both (A) and (B)

A)
@QueryParam
B)
@PathParam
C)
@MatrixParam
D)
@HeaderParam

Correct Answer :   @QueryParam


Explanation : @QueryParam − Binds the parameter passed to method to a query parameter in path.

A)
Implicit Grant
B)
Authentication Grant
C)
Authorization Code Grant
D)
Client Credentials Grant

Correct Answer :   Authorization Code Grant

A)
GET /users/{id}
B)
GET /user/{id}
C)
GET /user?id={id}
D)
GET /users?id={id}

Correct Answer :   GET /users/{id}

A)
user agents
B)
polling users
C)
Accept headers
D)
tracking downloads

Correct Answer :   tracking downloads

A)
resources
B)
subresources
C)
_links
D)
_embedded

Correct Answer :   subresources

A)
to link two resources together
B)
to describe a resource and its purpose
C)
to describe subresources related to the current one
D)
to describe relationships between resources or actions

Correct Answer :   to link two resources together

A)
access token
B)
refresh token
C)
ID token
D)
auth code token

Correct Answer :   ID token