Unsubscribe from an Event
delete
                    /restproxy/api/v2/channels/{channelName}/event-subscriptions
Unsubscribe from an event
                
                Request
Supported Media Types
                - application/json
Path Parameters
                - 
                    channelName(required): string
                    
                    ID of the channel
Query Parameters
                - 
                        role: string
                        
                        Which Hyperledger Fabric enrollment should be used
- 
                        subscription-id: string
                        
                        ID of the subscription when successful
- 
                        user-id: string
                        
                        User's name. It should be the same as user defined in basic auth.
Response
Supported Media Types
                - application/json
200 Response
Successful operation
                
                
                    Root Schema : schema
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    Show Source
        object- 
            error: 
            string
            
- 
            result: 
            array  result
            
            
- 
            returnCode(required): 
            string
            Allowed Values:[ "Success", "Failure" ]
Nested Schema : UnEventSubscription
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    Show Source
        object- 
            errorMessage: 
            string
            
- 
            status: 
            string
            
- 
            subid(required): 
            string
            ID of the subscription when successful
400 Response
Bad Request
                
                
                401 Response
Not authorized
                
                
                403 Response
Forbidden
                
                
                404 Response
Invalid parameters
                
                
                500 Response
Service unavailable
                
                
                Examples
This endpoint is used to unsubscribe from an event.
The following example shows how to unsubscribe from an event by submitting a DELETE request on the REST resource using cURL.
curl -v -X DELETE \ '<restproxy of your blockchain instance>/api/v2/channels/<channelName>/event-subscriptions?role=<role>&user-id=<username>&subscription-id=<subscription ID>&channelName=<channel_name>' \ -H "Authorization: Bearer <OAuth_access_ token>"
For example,
curl -v -X DELETE \ 'https://myvm.oracle.com:10000/restproxy/api/v2/channels/default/event-subscriptions?role=myinstance_defaultuser&user-id=user1&subscription-id=testuser1-dc28b77c-7e58-4b09-ae23-b2c01fa01b70&channelId=default' \ -H "Authorization: Bearer mF_9.B5f-4.1JqM"
Note:
You can find the REST proxy value of your blockchain instance from the Nodes tab of your instance console.Example of the Response Body
The following example shows the contents of the response body in JSON format:
{
   "returnCode": "Success",
   "error": "",
   "result": {
       "subid": "user1-dc28b77c-7e58-4b09-ae23-b2c01fa01b70",
       "status": 200
   }
}