Retrieve puzzle metadata
GET/api/v1/puzzles
Retrieves puzzle metadata based on specific criteria. Supports two mutually exclusive request types:
1. Specific/Multiple Puzzles Request: Returns metadata for one or more specific puzzles.
- Requires
series
andpuzzleIds
(comma-separated list). - Maximum 30 puzzle IDs allowed per request.
2. Time Range Request: Returns a list of puzzles within a given time range, sorted by publish time in descending order (newest first).
- Requires
series
. from
andto
define the time range (both must be in ISO 8601 format with a timezone offset).limit
andoffset
can be used for pagination.hasMore
is a boolean indicating if there are more puzzles available for pagination.
Puzzle Type Support:
- Grid Games (Crossword, Codeword, KrissKross, Sudoku): Grid dimensions and word count
- Quiz Games: Number of questions
Pagination and Ordering:
Results are paginated with the limit
and offset
query parameters and are ordered by publicationTime
in descending order (newest first).
Parameter limit
(integer) specifies the maximum number of records to return per request and offset
denotes the number of records to skip (in the descending order of publicationTime
) before starting to return results. To retrieve all the puzzles using this endpoint:
- Call the endpoint with
offset=0
. - Process the returned puzzles.
- If the
hasMore
field is set totrue
, request the next page by increasingoffset
bylimit
. - Repeat step 3 until a response returns
hasMore
field as false, indicating there are no more results.
Use Cases:
- Puzzle Discovery: Browse available puzzles in a series by publication date
- Content Management: Retrieve metadata for specific puzzles by ID
Examples:
Specific Puzzle Request:
curl -L 'http://localhost:8080/pmm-dev/api/v1/puzzles?series=api-demo-crossword&puzzleIds=82e56966' \
-H 'Accept: application/json'
Multiple Puzzles Request:
curl -L 'http://localhost:8080/pmm-dev/api/v1/puzzles?series=api-demo-crossword&puzzleIds=82e56966,50a2ab68,a7b2b0e0' \
-H 'Accept: application/json'
Time Range Request (Last 30 days):
curl -L 'http://localhost:8080/pmm-dev/api/v1/puzzles?series=api-demo-crossword&from=2024-01-01T00:00:00Z&to=2024-01-31T23:59:59Z&limit=10&offset=0' \
-H 'Accept: application/json'
Request
Responses
- 200
- 400
- 401
- 403
Successful response with puzzle metadata
Bad request (missing/invalid parameters)
Unauthorized (invalid or missing API token)
Forbidden (no access to series)