mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-03 19:30:04 +08:00
- 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.
41 lines
1.1 KiB
HTTP
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"
|
|
}
|