Post Test Data This API endpoint allows you to post test data, recording the results of a test taken by a user.
testType
- Type of the test ("words", "time", "quote", etc)testLength
- Length of the test in number of items ortestTime
- Duration of the test in secondstestSeed
- Seed for generating randomized test contentquoteId
- Identifier for a specific quote, if applicablewpm
- Words per minute (typing speed)accuracy
- Accuracy of responses (e.g., percentage)userId
- Identifier of the user taking the testsecret
- Secret key for authentication and authorization200 OK
- The test has been added to the database sucessfully401 UNAUTHORIZED
- The user has not been authenticated correctly500 INTERNAL SERVER ERROR
- There has been a database error when attempting tocurl -X POST "https://example.com/api/post_test" \
-H "Content-Type: application/json" \
-d '{
"testType": "typing",
"testLength": 100,
"testTime": 600,
"testSeed": "random_seed_123",
"quoteId": "quote_456",
"wpm": 65.5,
"accuracy": 98.2,
"userId": "user_789",
"secret": "your_secret_key_here"
}'