cherry-studio/tests/apis/agents/sessions.http
Vaayne 8836663c35 🧪 test: add HTTP test files for agents and sessions APIs
- Add agents.http with comprehensive API endpoint tests
- Add sessions.http for session management testing
- Include authentication setup and request examples
- Support testing of CRUD operations for both agents and sessions

These files enable easy API testing and validation during development.
2025-09-14 10:17:45 +08:00

41 lines
1.1 KiB
HTTP

@host=http://localhost:23333
@token=cs-sk-af798ed4-7cf5-4fd7-ae4b-df203b164194
@agent_id=agent_1757663884173_4tyeh3vqq
### List Sessions
GET {{host}}/v1/agents/{{agent_id}}/sessions
Authorization: Bearer {{token}}
Content-Type: application/json
### Create Session
POST {{host}}/v1/agents/{{agent_id}}/sessions
Authorization: Bearer {{token}}
Content-Type: application/json
{
"name": "Code Review Session",
"user_goal": "Review the newly implemented feature for bugs and improvements"
}
### Get Session Details
GET {{host}}/v1/agents/{{agent_id}}/sessions/session_1757815281790_q4yxgdk74
Authorization: Bearer {{token}}
Content-Type: application/json
### Delete Session
DELETE {{host}}/v1/agents/{{agent_id}}/sessions/session_1757815245456_tfs6oogl0
Authorization: Bearer {{token}}
Content-Type: application/json
### Update Session
PUT {{host}}/v1/agents/{{agent_id}}/sessions/session_1757815281790_q4yxgdk74
Authorization: Bearer {{token}}
Content-Type: application/json
{
"name": "Code Review Session 1",
"user_goal": "Review the newly implemented feature for bugs and improvements"
}