|
6035 | 6035 | "x-fern-sdk-method-name": "create" |
6036 | 6036 | } |
6037 | 6037 | }, |
6038 | | - "/api/v1/sessions/get-or-create-by-external-id": { |
6039 | | - "post": { |
6040 | | - "description": "Idempotent get-or-create: returns the existing session for this tenant-scoped `external_id`, or creates one", |
6041 | | - "requestBody": { |
6042 | | - "content": { |
6043 | | - "application/json": { |
6044 | | - "schema": { |
6045 | | - "$ref": "#/components/schemas/GetOrCreateSessionByExternalIdRequest" |
6046 | | - } |
6047 | | - } |
6048 | | - }, |
6049 | | - "required": true |
6050 | | - }, |
6051 | | - "responses": { |
6052 | | - "200": { |
6053 | | - "content": { |
6054 | | - "application/json": { |
6055 | | - "schema": { |
6056 | | - "$ref": "#/components/schemas/GetSessionResponse" |
6057 | | - } |
6058 | | - } |
6059 | | - }, |
6060 | | - "description": "Session already existed for this external id." |
6061 | | - }, |
6062 | | - "201": { |
6063 | | - "content": { |
6064 | | - "application/json": { |
6065 | | - "schema": { |
6066 | | - "$ref": "#/components/schemas/GetSessionResponse" |
6067 | | - } |
6068 | | - } |
6069 | | - }, |
6070 | | - "description": "Session created." |
6071 | | - }, |
6072 | | - "400": { |
6073 | | - "content": { |
6074 | | - "application/json": { |
6075 | | - "schema": { |
6076 | | - "$ref": "#/components/schemas/RequestErrorResponse" |
6077 | | - } |
6078 | | - } |
6079 | | - }, |
6080 | | - "description": "Invalid request body." |
6081 | | - }, |
6082 | | - "403": { |
6083 | | - "content": { |
6084 | | - "application/json": { |
6085 | | - "schema": { |
6086 | | - "$ref": "#/components/schemas/RequestErrorResponse" |
6087 | | - } |
6088 | | - } |
6089 | | - }, |
6090 | | - "description": "Caller is not the session creator." |
6091 | | - }, |
6092 | | - "404": { |
6093 | | - "content": { |
6094 | | - "application/json": { |
6095 | | - "schema": { |
6096 | | - "$ref": "#/components/schemas/RequestErrorResponse" |
6097 | | - } |
6098 | | - } |
6099 | | - }, |
6100 | | - "description": "Named agent not found." |
6101 | | - }, |
6102 | | - "422": { |
6103 | | - "content": { |
6104 | | - "application/json": { |
6105 | | - "schema": { |
6106 | | - "$ref": "#/components/schemas/RequestErrorResponse" |
6107 | | - } |
6108 | | - } |
6109 | | - }, |
6110 | | - "description": "The agent spec is valid but references a resource this server does not provide (e.g. model, MCP server, skill, or sandbox)." |
6111 | | - } |
6112 | | - }, |
6113 | | - "summary": "Get or create a session by external id", |
6114 | | - "tags": [ |
6115 | | - "Agent Sessions" |
6116 | | - ], |
6117 | | - "x-fern-sdk-group-name": [ |
6118 | | - "sessions" |
6119 | | - ], |
6120 | | - "x-fern-sdk-method-name": "get_or_create_by_external_id" |
6121 | | - } |
6122 | | - }, |
6123 | 6038 | "/api/v1/sessions/{session_id}": { |
6124 | 6039 | "delete": { |
6125 | 6040 | "description": "Delete a session and all related turns, events, and internal state. Only the session creator (`created_by`) may delete it. Idempotent if already gone.", |
|
0 commit comments