Start, stop or restart HDR collection
put
                    https://{managementIp}/rest/{version}/statistics/collections
Executes Historical Data Records (HDR) collection command to start, stop or restart  collection on one or all collection groups. 
                This API is only available for SBC and ESBC.
Request
Path Parameters
                - 
                    version(required):  string
                    
                    REST API version string.
 Available values: v1.2
Query Parameters
                    - 
                            action(required): string
                            
                            Collection action to take on data collections.
 Available values: start, stop, restartAllowed Values:[ "start", "stop", "restart" ]
- 
                            collectionObject: string
                            
                            Optional parameter to specify the collection group. This parameter is only valid for the "start" and "stop" collection actions. If this parameter is not specified, action is taken on all collection groups. The "restart" action is always taken on all collection groups.
Header Parameters
                    - 
                            Authorization(required): 
                            
                            The value in the Authorization header must be the string "Bearer {access token}", where{access token}is a valid, unexpired token received in response to a prior/rest/{version}/auth/tokenrequest.
There's no request body for this operation.
Back to TopResponse
Supported Media Types
                - application/xml
200 Response
OK - Request successful
                            
                            
                                Nested Schema : data
    
    	Type: 
    	
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
objectNested Schema : links
    
    	Type: 
    	
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
objectNested Schema : messages
    
    	Type: 
    	
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        object- 
                
                    
                    message: string
                    
                    
                     
                    
                
                
                Allowed Values:[ "Collection process started", "Collection process stopped", "Collection process restarted", "Collection process purged" ]Example:Collection process started
400 Response
The request is malformed in some way or is missing required information and therefore cannot be processed.
                            
                            
                                Nested Schema : data
    
    	Type: 
    	
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
objectNested Schema : items
    
    	Type: 
    	
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        object- 
                
                    
                    link: string
                    
                    
                     
                    
                
                
                If available, a message with possible valid API URL(s) for the client to invokeExample:Available URL(s) message string
401 Response
Unauthorized - Request lacks valid authentication credentials.
                            
                            
                                Nested Schema : data
    
    	Type: 
    	
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
objectNested Schema : items
    
    	Type: 
    	
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        object- 
                
                    
                    link: string
                    
                    
                     
                    
                
                
                If available, a message with possible valid API URL(s) for the client to invokeExample:Available URL(s) message string
403 Response
This request requires the client credentials to have administrator privileges.
                            
                            
                                Nested Schema : data
    
    	Type: 
    	
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
objectNested Schema : items
    
    	Type: 
    	
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        object- 
                
                    
                    link: string
                    
                    
                     
                    
                
                
                If available, a message with possible valid API URL(s) for the client to invokeExample:Available URL(s) message string
404 Response
Resource not found
                            
                            
                                Nested Schema : data
    
    	Type: 
    	
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
objectNested Schema : links
    
    	Type: 
    	
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
objectNested Schema : messages
    
    	Type: 
    	
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        object- 
                
                    
                    errorMessage: string
                    
                    
                     
                    
                
                
                Example:Collection action is invalid
Examples
Examples of Accessing the API
See Authenticate for how to acquire a token.
The following example shows how to start, stop or restart HDR collection using curl.
curl -X PUT \
    --header "Accept: application/xml" \
    --header "Authorization: Bearer $TOKEN" \
    "https://${SBCIP}/rest/v1.2/statistics/collections?action=start&collectionObject=fan"The following example shows how to start, stop or restart HDR collection using Python.
import requests
headers = { "Accept":"application/xml", "Authorization":"Bearer " + token }
url  = "https://" + sbcip + "/rest/v1.2/statistics/collections?action=start&collectionObject=fan"
resp = requests.put(url, headers=headers)Example of the Response Body
The following example shows the contents of the response body in XML.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
  <data>Collection process started</data>
  <messages/>
  <links/>
</response>