CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

pubnub/pubnub-functions

Develop serverless edge functions with PubNub Functions 2.0

Agent Success

Agent success rate when using this tile

93%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.79x

Baseline

Agent success rate without this tile

52%

Overview
Eval results
Skill reviews
Files

task.mdevals/scenario-2/

User Profile API Endpoint

Context

You are building a simple user profile API as a PubNub Function that will be called from a web browser frontend. The API stores and retrieves user profiles from the function's key-value store. The frontend is hosted on a different domain than the PubNub Function endpoint, so browser security restrictions apply.

Task

Write a PubNub On Request function (user-api.js) that implements a RESTful user profile API supporting:

  1. Retrieving a user profile by ID
  2. Creating or updating a user profile with name and email fields
  3. Deleting a user profile
  4. Proper error responses for missing users or invalid input
  5. Compatibility with browser-based clients on different domains

User IDs are provided via URL path parameters.

Expected Outputs

  • A user-api.js file containing a complete PubNub On Request function implementing the user profile API.
tessl i pubnub/pubnub-functions@0.1.4

evals

SKILL.md

tile.json