1. Home
  2. Explore
  3. Computer Science
  4. Understanding REST APIs

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Understanding REST APIs

  • 28Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: API Fundamentals
An API is essentially a
provided by one piece of software to another, typically involving a structured request and response.

28 questions

  1. 1
    An API is essentially a
    _____
    provided by one piece of software to another, typically involving a structured request and response.
    Hint

    Think about an agreement between two parties specifying what will be provided and how.

    Answer

    contract

  2. 2
    The analogy of a waiter in a restaurant serves to explain an API's role as a
    _____
    between the client (you) and the server (kitchen).
    Hint

    Consider the primary function of a waiter in facilitating communication and delivery.

    Answer

    messenger

  3. 3
    An API typically requires requests to be formatted in a specific way, similar to a toy box that only accepts certain
    _____
    like circles, squares, or triangles.
    Hint

    Think about the physical form that the toy box is designed to receive.

    Answer

    shapes

  4. 4
    REST stands for Representational State Transfer and is an
    _____
    style for designing networked applications.
    Hint

    Consider the overall blueprint or design approach for building software systems.

    Answer

    architecture

  5. 5
    REST relies on a
    _____
    client-server communication protocol, which is almost always HTTP.
    Hint

    Think about a communication model where each request from client to server contains all the information needed to understand the request, and the server doesn't store client context between requests.

    Answer

    stateless

  6. 6
    The primary communication protocol used for REST, which is the foundation of the internet, is
    _____
    .
    Hint

    This is the protocol your browser uses every time you load a webpage.

    Answer

    HTTP

  7. 7
    In the context of REST, server-side objects like a blog post in a database are treated as
    _____
    .
    Hint

    Think about what entities or items are managed and manipulated by a REST API.

    Answer

    resources

  8. 8
    A 'restful API' is essentially the same as a 'REST API' and refers to an API that conforms to the REST
    _____
    .
    Hint

    Think about the rules or guidelines that define the REST architectural style.

    Answer

    constraints

  9. 9
    The most common HTTP request, used by web browsers daily to retrieve data, is a
    _____
    request.
    Hint

    This method is used when you simply want to 'fetch' information from a server.

    Answer

    GET

  10. 10
    When you fill out a web form to submit new information, you are typically making a
    _____
    request.
    Hint

    This method is used to 'send' or 'create' new data on the server.

    Answer

    POST

  11. 11
    To update a specified resource on a server, such as a blog post or product, you would use a
    _____
    request.
    Hint

    This method implies replacing or modifying an existing resource entirely.

    Answer

    PUT

  12. 12
    A
    _____
    request is used to remove a specified resource from a server.
    Hint

    This method is self-explanatory in its purpose for resource management.

    Answer

    DELETE

  13. 13
    The HEAD request is similar to GET but only returns the
    _____
    information in the response, without the body.
    Hint

    Think about which part of an HTTP response typically contains metadata.

    Answer

    head

  14. 14
    The OPTIONS request method can be used to determine the
    _____
    methods supported by a server for a given URL.
    Hint

    This method helps clients understand what actions they can perform on a resource.

    Answer

    supported

  15. 15
    Endpoints are the URI or
    _____
    that HTTP requests are sent to.
    Hint

    Think about the address where a web resource can be found.

    Answer

    URL

  16. 16
    A GET request to /api/users would typically return a
    _____
    of all users.
    Hint

    Consider what kind of collection you would expect when requesting general information about multiple items.

    Answer

    list

  17. 17
    Using the same endpoint, like /api/users, for both GET and POST requests is acceptable because they use different
    _____
    .
    Hint

    Think about the HTTP verb that specifies the action to be performed.

    Answer

    methods

  18. 18
    APIs that don't require any form of authentication are referred to as public or
    _____
    APIs.
    Hint

    Think about the accessibility of the API to any user without prior verification.

    Answer

    open

  19. 19
    A common authentication method for APIs is
    _____
    , which involves obtaining an access token to send with requests.
    Hint

    This is a popular open standard for access delegation.

    Answer

    OAuth

  20. 20
    If a request is made to an authenticated API without the necessary token, the server will typically return an
    _____
    error.
    Hint

    Think about the status that indicates permission to access a resource was denied.

    Answer

    unauthorized

  21. 21
    One way to send an authentication token is by including it inside the HTTP
    _____
    with a value for 'Authorization'.
    Hint

    This is a part of the HTTP message that contains metadata about the request.

    Answer

    header

  22. 22
    Another common way to authenticate is by sending a generated client ID and
    _____
    as parameters with your request.
    Hint

    This pair of credentials is often used to identify and authenticate an application.

    Answer

    secret

  23. 23
    Most public APIs provide
    _____
    that explains available endpoints, methods, and authentication requirements.
    Hint

    Think about the comprehensive guide or manual for using a software system.

    Answer

    documentation

  24. 24
    In API documentation, a colon in front of a part of the URI, like /users/:username, usually indicates a
    _____
    .
    Hint

    This signifies a dynamic part of the URL that needs to be replaced with an actual value.

    Answer

    placeholder

  25. 25
    A 200
    _____
    in an API response typically means everything is okay and the request was successful.
    Hint

    This numerical code indicates the outcome of an HTTP request.

    Answer

    status

  26. 26
    When making requests to the GitHub API, the response body for user information is typically formatted in
    _____
    .
    Hint

    This is a common lightweight data-interchange format used for web services.

    Answer

    JSON

  27. 27
    Tools like
    _____
    (a Chrome extension) allow developers to easily test API endpoints by sending various HTTP requests.
    Hint

    This is a popular platform for API development, testing, and collaboration.

    Answer

    Postman

  28. 28
    When sending data with a POST request using a tool like Postman, you can send it in different formats, such as a form or raw
    _____
    .
    Hint

    This is a very common text-based format for representing structured data.

    Answer

    JSON

1 of 28
Question 1 of 28

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent