File tree Expand file tree Collapse file tree 3 files changed +62
-25
lines changed
app/nebula/api-reference/update-session Expand file tree Collapse file tree 3 files changed +62
-25
lines changed Original file line number Diff line number Diff line change 1+ export const sessionEndpointData = {
2+ title : "Update Session" ,
3+ method : "GET" ,
4+ description : "Fetches details of a specific session using the session ID." ,
5+ endpointUrl : "/session/{session_id}" ,
6+ parameters : [
7+ {
8+ name : "session_id" ,
9+ required : true ,
10+ description : "The unique identifier of the session to retrieve." ,
11+ type : "string" ,
12+ } ,
13+ ] ,
14+ headers : [
15+ {
16+ name : "x-secret-key" ,
17+ required : true ,
18+ description : "Your thirdweb secret key for authentication." ,
19+ type : "string" ,
20+ } ,
21+ ] ,
22+ bodyParameters : [ ] ,
23+ codeExamples : [
24+ {
25+ language : "curl" ,
26+ code : `curl -X GET https://nebula-api.thirdweb.com/session/{session_id} \\
27+ -H "x-secret-key: YOUR_THIRDWEB_SECRET_KEY"` ,
28+ } ,
29+ {
30+ language : "JavaScript" ,
31+ code : "test" ,
32+ } ,
33+ ] ,
34+ apiResponses : [
35+ {
36+ status : "200" ,
37+ description : "Session details retrieved successfully." ,
38+ code : `{
39+ "session_id": "abc123",
40+ "created_at": "2024-01-01T00:00:00Z",
41+ "last_active": "2024-01-02T12:34:56Z",
42+ "messages": [
43+ "message_id": "msg1",
44+ "content": "Hello, how can I assist you?",
45+ "timestamp": "2024-01-01T01:23:45Z"
46+ // Additional messages...
47+ ]
48+ }` ,
49+ } ,
50+ {
51+ status : "404" ,
52+ description : "Session not found." ,
53+ code : `{
54+ "error": "Session with ID 'abc123' not found."
55+ }` ,
56+ } ,
57+ ] ,
58+ } ;
Original file line number Diff line number Diff line change 1- #### Update Session
1+ import { ApiEndpoint } from ' @doc' ;
2+ import { sessionEndpointData } from ' ./data' ;
23
3- Update an existing session.
4-
5- ``` bash
6- PUT /session/{session_id}
7- ```
8-
9- ** Example curl:**
10- ``` bash
11- curl -X PUT https://nebula-api.thirdweb.com/session/abc123 \
12- -H " Content-Type: application/json" \
13- -H " x-secret-key: YOUR_THIRDWEB_SECRET_KEY" \
14- -d ' {
15- "title": "Updated Title",
16- "is_public": true
17- }'
18- ```
19-
20- ** Request Body:**
21- ``` tsx
22- {
23- " title" : " string" ,
24- " is_public" : boolean
25- }
26- ```
4+ <ApiEndpoint { ... sessionEndpointData } />
Original file line number Diff line number Diff line change @@ -27,3 +27,4 @@ export { ConnectCard } from "./Cards/ConnectCard";
2727export { AAChainList } from "./AAChainList" ;
2828export { AuthList } from "./AuthList" ;
2929export { FeatureCard } from "./FeatureCard" ;
30+ export { ApiEndpoint } from "./ApiEndpointComponent" ;
You can’t perform that action at this time.
0 commit comments