CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/api-design-patterns

REST API design patterns — response envelopes, pagination, filtering, status codes, and resource naming

87

1.78x
Quality

83%

Does it follow best practices?

Impact

98%

1.78x

Average score across 4 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

criteria.jsonevals/scenario-1/

{
  "context": "Tests whether the agent applies REST API design patterns when building an inventory management API: response envelopes, pagination, filtering, correct status codes, bulk operations, and resource naming.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "success-response-envelope",
      "description": "Success responses wrap the resource or resource array in a { data: ... } envelope",
      "max_score": 10
    },
    {
      "name": "error-response-envelope",
      "description": "Error responses use a consistent { error: { code: '...', message: '...' } } structure",
      "max_score": 8
    },
    {
      "name": "list-endpoint-paginated",
      "description": "The list inventory items endpoint supports pagination via query parameters",
      "max_score": 10
    },
    {
      "name": "filtering-support",
      "description": "The list endpoint supports filtering by warehouse, category, and/or stock level via query parameters",
      "max_score": 8
    },
    {
      "name": "plural-noun-resource-paths",
      "description": "Resource URLs use plural nouns (e.g., /items, /inventory, /warehouses) with no verbs in the path",
      "max_score": 6
    },
    {
      "name": "201-for-creation",
      "description": "Endpoints that create new inventory records return 201 Created",
      "max_score": 8
    },
    {
      "name": "bulk-receiving-endpoint",
      "description": "A bulk/batch endpoint exists for processing multiple items from a shipment manifest in a single request",
      "max_score": 10
    },
    {
      "name": "bulk-max-size",
      "description": "The bulk endpoint enforces a maximum batch size",
      "max_score": 4
    },
    {
      "name": "bulk-per-item-results",
      "description": "The bulk endpoint reports per-item success or failure so the caller knows which items succeeded",
      "max_score": 6
    },
    {
      "name": "transfer-validation",
      "description": "Transfer endpoint validates that the source warehouse has sufficient quantity and returns an appropriate error (409 or 422) if not",
      "max_score": 6
    },
    {
      "name": "404-for-not-found",
      "description": "Requests for a non-existent inventory item return 404 with an error envelope",
      "max_score": 6
    },
    {
      "name": "pagination-metadata",
      "description": "Paginated responses include pagination metadata alongside the data array",
      "max_score": 6
    },
    {
      "name": "safe-defaults",
      "description": "List endpoint has safe defaults — default page size and maximum limit",
      "max_score": 6
    },
    {
      "name": "validation-error-status",
      "description": "Validation errors return 422 or 400 with an error envelope containing details about what failed",
      "max_score": 6
    }
  ]
}

evals

scenario-1

criteria.json

task.md

tile.json