Create a Session
put
/sessions/{sessionName}
Create a session with the name
sessionName
.Request
Path Parameters
-
sessionName: string
The name of the session.
Query Parameters
-
ackMode(optional): string
Optional
-
connection: string
Required. The name of the connection to use to create the session.
-
transacted(optional): string
Optional. Whether the session is transacted. If present, it must have value
true
orfalse
; default is false.
Response
201 Response
Session created.
400 Response
Error Codes
missingParameter
:Theconnection
parameter was not supplied.badParameter
:The value of thetransacted
parameter had a value other thantrue
orfalse
, or the value of theackMode
parameter had a value other than the allowed ones.connectionParameterNotFound
:No connection exists with name which is specified for theconnection
parameter.
409 Response
Error Codes
sessionAlreadyExists
:A session with the specified name already exists.
500 Response
Error Codes
operationFailed
:A low-level exception occurred in attempting to create the session.
Examples
cURL Command
cookie=/tmp/messaging-cookie curl -s -u $USER:$PASS -c $cookie -b $cookie \ -H "X-OC-ID-TOKEN-STATUS: disabled" \ -X PUT "https://messaging.us2.oraclecloud.com/myService-myTenant/api/v1/sessions/myFirstSession?connection=myFirstConnection"
There is no request body to submit with the HTTP request and there is no response body.
Back to Top