QUESTION 1 OF 15

What does REST mean for API design?

Reveal the answer and explore the explanation.

01
EasyCore

What does REST mean for API design?

Answer
Answer

Architectural style centered on resources, stateless interactions and uniform interfaces.

Practical example

Expose a prediction resource with documented HTTP behavior.

PythonRelated concept example
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
class Input(BaseModel):
    value: float
@app.post('/predict')
def predict(data: Input):
    return {'prediction': data.value * 2}

Minimal typed endpoint; add authentication and operational controls for deployment.

Reference: Further reading ↗

Last 30 min revisionHigh-yield interview Q&As