Get Remediation Ticket Details by Ticket Number
Use this API to retrieve the details of a
Control Compliance Suite
remediation ticket. To retrieve ticket details, provide the display number of the ticket in input request.Authentication
To grant access to users to view or execute
Control Compliance Suite
RESTful APIs, you must generate an authentication token.Authorization requirements
You must be in the Remediation Administrator role to use the Get Remediation Ticket Details by Ticket Number API.
You must have permission on the standard and the assets that are mentioned in the ticket to use the Get Remediation Ticket Details by Ticket Number API:
Request method
To retrieve the details of a
Control Compliance Suite
remediation ticket, create a GET
request. HTTPS request components for Get Remediation Ticket Details by Ticket Number API
Create a GET request by using the following components:
Request component | Value |
|---|---|
URL |
You can also use the Fully Qualified Domain Name (FQDN) as the hostname. You can configure the port number from the Integration Services Endpoint Configuration dialog box from Settings > Deployment View on the Control Compliance Suite console. You must restart the Symantec Application Server Service after you configure the port. If you do not configure the port, the default port is considered in the request. The default port is 12431. |
Content type | application/json |
HTTPS request parameters for Get Remediation Ticket Details by Ticket Number API
The following table contains the description of the HTTPS request parameter for the Get Remediation Ticket Details by Ticket Number API:
Field name | Field type | Data type | Description |
|---|---|---|---|
TicketNumber | Mandatory | String | This is the unique identifier of a Control Compliance Suite ticket of which you want to retrieve the details. This number is displayed in the Ticket Number column in the Remediation workspace. |
Response body for Get Remediation Ticket Details by Ticket Number API
The GET request for the Get Remediation Ticket Details by Ticket Number API returns the response body in the following structure:
Success Response: { "RemediationTicket": {"CreatedBy":, "CreatorAdamJobID":, "AssignedTo":, "CreatedOn":, "ModifiedOn":, "Priority":, "Status":, "TicketNumber":, "ticketDescription":, "ticketID":, "TicketImpact":, "ticketState":, "TicketUrgency":, "AdditionalDataAsXML": } }
In the response body, the
AdditionalDataAsXML
field contains remediation context details.Sample HTTPS request for Get Remediation Ticket Details by Ticket Number API
The following is a sample HTTPS request for your reference.
Request component | Value |
|---|---|
URL |
|
Content type | application/json |
Sample HTTPS response for Get Remediation Ticket Details by Ticket Number API
The sample HTTPS request that you created earlier returns the following response:
{"RemediationTicket": {"CreatedBy":"<domain name>\\<user name>","JobID":"1f3f0678-2c9a-46af-9530-40789f72ed97","AssignedTo":"", "CreatedOn":"2018-11-14T05:51:12.59","ModifiedOn":null,"Priority":"High","Status":"Open","TicketNumber":"INCA0000001", "ticketDescription":"","ticketID":"a5e911a4-0b13-45a2-b472-82fa1c655d0f","TicketImpact":2,"ticketState":1,"TicketUrgency":1, "AdditionalDataAsXML":"<RemediationContextDetails xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"> <RemediationTicketSummary><Description>This is a remediation ticket created for the standard CIS Microsoft Windows Server 2012 R2 v2.2.1 in Control Compliance Suite.</Description> <Standard name=\"CIS Microsoft Windows Server 2012 R2 v2.2.1\" version=\"1.2.0\"> <StandardID>96025bd1-0e6f-4ac3-9e1f-8715f7739f02</StandardID><TotalChecks>329</TotalChecks></Standard><TotalFailedChecksInThisStandard>210</TotalFailedChecksInThisStandard> <TotalFailedChecksInThisTicket>18</TotalFailedChecksInThisTicket></RemediationTicketSummary> <FailedCheckDetails><Check name=\"18.9.24.2 Is the 'Default Action and Mitigation Settings' parameter set to 'Enabled' (plus subsettings)?\" version=\"1.0.0\"> <CheckId>06e603b7-5ef7-4e8e-bb8c-a3cbecb83fea</CheckId> <RemediationDetails>To establish the recommended configuration via GP, set the following UI path to Enabled: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\EMET\\Default Action and Mitigation SettingsNOTE: This Group Policy path does not exist by default. An additional Group Policy template (EMET.admx/adml) is required - it is included with Microsoft Enhanced Mitigation Experience Toolkit (EMET). Impact:</RemediationDetails> <AssetDetails><Asset name=\"<domain name>\\<IP address>\"><AssetId>e696a8e0-623f-4585-aceb-1f3c8ecc2779</AssetId></Asset></AssetDetails></Check> <Check name=\"18.9.61.1 Is the 'Turn off Automatic Download and Install of updates' parameter set to 'Disabled'?\" version=\"1.0.0\"> <CheckId>0fc6c986-1f16-4bb6-b06c-0630ac5fbe75</CheckId> <RemediationDetails>To establish the recommended configuration via GP, set the following UI path to Disabled:Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Store\\Turn off Automatic Download and Install of updates Impact:If you disable this setting, the automatic download and installation of app updates is turned on. </RemediationDetails><AssetDetails><Asset name=\"<domain name>\\<IP address>\"><AssetId>e696a8e0-623f-4585-aceb-1f3c8ecc2779</AssetId></Asset></AssetDetails> </Check><Check name=\"18.9.24.8 Is the 'System SEHOP' parameter set to 'Enabled: Application Opt-Out'?\" version=\"1.0.0\"> <CheckId>18d8a97a-c11a-4fe6-ada6-f6f07c006662</CheckId> <RemediationDetails>To establish the recommended configuration via GP, set the following UI path to Enabled: Application Opt-Out: Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\EMET\\System SEHOPNOTE: This Group Policy path does not exist by default. An additional Group Policy template (EMET.admx/adml) is required - it is included with Microsoft Enhanced Mitigation Experience Toolkit (EMET). Impact:</RemediationDetails> <AssetDetails><Asset name=\"<domain name>\\<IP address>\"><AssetId>e696a8e0-623f-4585-aceb-1f3c8ecc2779</AssetId></Asset> </AssetDetails></Check><Check name=\"18.9.24.1 Is the 'EMET 5.51' or later installed?\" version=\"1.0.0\"> <CheckId>1efcfb85-a62b-44ae-97e3-1df62f2915bb</CheckId><RemediationDetails>Install EMET 5.51 or higher. Impact:</RemediationDetails> <AssetDetails><Asset name=\"ccsdev\\10.211.105.4\"><AssetId>e696a8e0-623f-4585-aceb-1f3c8ecc2779</AssetId> </Asset></AssetDetails></Check><Check name=\"18.9.24.7 Is...}
HTTPS response codes for Get Remediation Ticket Details by Ticket Number API
Depending on the success or the failure of your API request, you see the following response codes for the Get Remediation Ticket Details by Ticket Number API:
Response Code | Response Type | Description |
|---|---|---|
200 | OK | The following remediation ticket details are retrieved:
|
403 | Forbidden | The following error message is displayed: You are not authorized to perform this operation. Access is denied. |
404 | Not Found | This code is returned because of one of the following reasons:
|
401 | Unauthorized | This may be because of one of the following reasons:
|
400 | Bad Request (Client Error) | This may be because of one of the following reasons:
|
500 | Internal Server Error (Server Error) | The following error message is displayed:
|
Sample Python script for Get Remediation Ticket Details by Ticket Number API
Click to view a sample Python script for Get Remediation Ticket Details by Ticket Number API
# Script to search remediation ticket details based on ticket ID import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning # Variable # Replace the <hostname> with CCS application server host name # Replace the <port number> with the configured port number for REST API, Default Port Number : 12431 # Replace the <user name> and <password> with valid CCS user name and password for example: UserName = domain1\\administrator, password = <Base64 encoded> HostName = '<hostname>' PortNumber = '<port number>' UserName = '<user name>' Password = '<password>' #<Base64 encoded> # Function to generate CCS REST API access token def getToken(): urlToken = "https://" + HostName + ":" + PortNumber + "/ccs/api/v1/oauth/tokens" payload = "grant_type=password&username=" + UserName + "&password=" + Password +"" headers = {'Content-Type': "application/json"} responseToken = requests.request("POST", urlToken, data=payload, headers=headers, verify=False) autheticationresult = responseToken.status_code if (autheticationresult!=200) : print("\nToken Generation Failed. Please check if the REST API is enabled and User name and password is correct\n") exit() tokenDict = responseToken.json() token = tokenDict['access_token'] refreshToken = tokenDict['refresh_token'] print("bearer Token is:\n") print(token) print("\n Refresh Token is:\n") print(refreshToken) return token # Remediation ticket details URI url = "https://" + HostName + ":" + PortNumber + "/ccs/api/v1/RemediationTickets" # provide the ticket ID in the query string like-INCA0000001 querystring = {"TicketNumber":"INCA0000001"} requests.packages.urllib3.disable_warnings(InsecureRequestWarning) bearertoken = "Bearer " + getToken() headers = { 'Authorization': bearertoken , 'Content-Type': "application/json" } response = requests.request("GET", url, headers=headers, params=querystring, verify=False) print(response.text) print(response.json)