Update Connection Properties

post

/connections/{connectionName}

Set a connection's client ID or start or stop the connection

If the clientIdparameter is present, the client ID of the connection is set to the specified value, provided that none of the following blocking conditions are true:

  • The client ID has already been set to a value for the connection.
  • The connection was started when it was created.
  • The connection has been used for any operation.
  • The client ID is in use by some other application.

Request

Path Parameters
Query Parameters
Back to Top

Response

200 Response

Connection properties updated.

400 Response

Error Codes

  • clientIdFailure: The value provided for the client ID was rejected by the JMS provider.  The value of the client ID may be in use by another application, including message push listeners.
  • clientIdUnsettable: An attempt was made to set the client ID on a connection on which it cannot be set, either because it has already been set or because an operation has been performed (for example, starting the connection, or creating a session) after which the client ID can no longer be set.

404 Response

Error Codes

  • connectionNotFound: The referenced connection does not exist.

500 Response

Error Codes

  • operationFailed: A low-level exception occurred in attempting to set the client ID or start or stop the connection.
Back to Top

Examples

cURL Commands

To start a previously created connection.

cookie=/tmp/messaging-cookie
curl -s -u $USER:$PASS -c $cookie -b $cookie \
     -H "X-OC-ID-TOKEN-STATUS: disabled" \
     -X POST "https://messaging.us2.oraclecloud.com/myService-myTenant/api/v1/connections/myFirstConnection?action=start"

There is no request body to submit with the HTTP request and there is no response body.

To stop a previously created connection.

cookie=/tmp/messaging-cookie
curl -s -u $USER:$PASS -c $cookie -b $cookie \
     -H "X-OC-ID-TOKEN-STATUS: disabled" \
     -X POST "https://messaging.us2.oraclecloud.com/myService-myTenant/api/v1/connections/myFirstConnection?action=stop"

There is no request body to submit with the HTTP request and there is no response body.

To set a client id on a previously created connection. Only succeeds if the original connection did not have a client id set on it and if the client id is not already in use by another connection.

cookie=/tmp/messaging-cookie
curl -s -u $USER:$PASS -c $cookie -b $cookie \
     -H "X-OC-ID-TOKEN-STATUS: disabled" \
     -X POST "https://messaging.us2.oraclecloud.com/myService-myTenant/api/v1/connections/myFirstConnection?clientId=myFirstClientId"

There is no request body to submit with the HTTP request and there is no response body.

Back to Top