Skip to content

Conversation

@cyclotruc
Copy link
Member

@cyclotruc cyclotruc commented Mar 7, 2025

This PR is an attempt at implementing a single REST endpoint for ingests from url

atyrode and others added 7 commits March 4, 2025 18:01
Implement content negotiation to return plain text by default for API clients
while preserving HTML responses for browser requests. This improves API
usability for non-browser clients while maintaining the existing user
experience for web users.

- Add browser detection via User-Agent header
- Return PlainTextResponse for API clients
- Preserve HTML template responses for browser requests
This commit enhances the API functionality by allowing programmatic access
with customizable parameters through URL query strings. The changes include:

- Add support for max_size, pattern_type, and pattern query parameters
  in non-browser GET requests to /{repository_path}
- Create comprehensive API documentation in docs/api.md with:
  * Detailed endpoint descriptions
  * Parameter specifications
  * Response format documentation
  * Usage examples
  * Best practices
- Update API web interface (api.jinja) to reflect new capabilities
  and provide clear usage instructions

These changes enable API consumers to filter repositories by file patterns
and size limits without using the web interface, making the API more
flexible for integration with external tools and scripts.
This commit enhances the API functionality by allowing programmatic access
with JSON response format through URL query parameters or Accept headers.
The changes include:

- Add support for format parameter in non-browser GET requests
- Implement JSON response format in query processor
- Update API documentation with format options and examples
- Add comprehensive tests for format detection and response handling

This change maintains backward compatibility while providing a more
structured response format for API consumers.
@filipchristiansen filipchristiansen marked this pull request as draft June 21, 2025 23:18
@filipchristiansen filipchristiansen changed the title Feat/api feat(api): add REST endpoint with JSON/plain-text & filter params Jun 23, 2025
@cyclotruc
Copy link
Member Author

Closing because outdated, will be implemented again from a more recent version

@cyclotruc cyclotruc closed this Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants