-
Notifications
You must be signed in to change notification settings - Fork 99
feat(api): add functions API endpoints #1625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Dec 10, 2025
Merged
Merged
b8d82c0 to
b2aca9e
Compare
fa6d716 to
5db2b9b
Compare
b2aca9e to
85c86f3
Compare
5db2b9b to
b2d02a9
Compare
willbakst
approved these changes
Jan 6, 2026
85c86f3 to
0e3d42a
Compare
b2d02a9 to
f359a06
Compare
0e3d42a to
76bc724
Compare
f359a06 to
ff17581
Compare
76bc724 to
b41aa73
Compare
ff17581 to
3278d72
Compare
b41aa73 to
6127227
Compare
2436928 to
34b23f8
Compare
98dc5cc to
76402ed
Compare
74533de to
510e73a
Compare
76402ed to
445c6d1
Compare
510e73a to
053104a
Compare
- Use Authentication.requireApiKey like traces.handlers.ts - Remove explicit return type annotation like api-keys.handlers.ts - Import PublicFunction from db/schema
053104a to
51fbdc1
Compare
Collaborator
Merge activity
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TL;DR
Added API endpoints for managing serverless functions with authentication, registration, retrieval, and listing capabilities.
What changed?
Created two new files to implement a Functions API:
functions.schemas.ts- Defines the schema types and API endpoints:functions.handlers.ts- Implements the handler logic:registerFunctionHandler- Registers or retrieves a function with code, hash, signature, etc.getFunctionByHashHandler- Retrieves a function by its hashgetFunctionHandler- Retrieves a function by its IDlistFunctionsHandler- Lists functions with optional filtering by name and tagsAll handlers include API key authentication and proper error handling.
How to test?
Test function registration:
with a valid API key and function payload
Test retrieving a function by hash:
Test retrieving a function by ID:
Test listing functions with optional filters:
Ensure all requests include a valid API key in the X-API-Key header or as a Bearer token.
Why make this change?
This implementation provides a complete API for managing serverless functions, allowing clients to register, retrieve, and list functions with proper authentication and error handling. The API supports versioning, tagging, and metadata for functions, enabling a robust serverless function ecosystem.