Remediation Get Action

Remediation Get Action

action name.

Request
URI
GET
https://{api_host}/tcsa.host.com/actions/{action_name}
COPY
Path Parameters
string
action_name
Required

action name.


Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns RemediationAction of type(s) application/json
{
    "action_name": "slack_action",
    "created_on": "21 Nov, 2022, 00:42:45 UTC",
    "description": "slack action",
    "file_data": "import json\nfrom datetime import datetime\nfrom airflow.models import DAG\nfrom airflow.models import Variable\nfrom airflow.models.param import Param\nfrom airflow.operators.python import PythonOperator\nfrom airflow.providers.slack.operators.slack import SlackAPIPostOperator\nimport logging\nfrom Success import *\nfrom Failure import *\n\nmyParams = {\n    \"Acknowledged\": 'false',\n    \"Active\": 'true',\n    \"AuditTrail\": [\n        {\n        \"User\": \"\",\n        \"ActionType\": \"\",\n        \"SerialNumber\": 0,\n        \"Text\": \"\",\n        \"Timestamp\": 0\n        }\n    ],\n    \"Category\": \"\",\n    \"CausedBy\": [],\n    \"Causes\": [\n        \"\"\n    ],\n    \"Certainty\": 0.0,\n    \"ClassDisplayName\": \"\",\n    \"ClassName\": \"\",\n    \"ClearOnAcknowledge\": 'false',\n    \"ClosedAt\": 0,\n    \"ElementClassName\": \"\",\n    \"ElementName\": \"\",\n    \"EventDisplayName\": \"\",\n    \"EventName\": \"\",\n    \"EventState\": \"\",\n    \"EventText\": \"\",\n    \"EventType\": \"\",\n    \"FirstNotifiedAt\": 0,\n    \"Impact\": 0,\n    \"InMaintenance\": 'false',\n    \"InstanceDisplayName\": \"\",\n    \"InstanceName\": \"66999f1a-9ef1-4840-a427-b18e04998f49\",\n    \"IsProblem\": 'true',\n    \"IsRoot\": 'true',\n    \"LastChangedAt\": 0,\n    \"Name\": \"NOTIFICATION-Interface_IF-qa-npmpe5/4_Down\",\n    \"OccurrenceCount\": 1,\n    \"OpenedAt\": 0,\n    \"Owner\": \"\",\n    \"PollingID\": 0,\n    \"PollingState\": \"\",\n    \"ProcessedTimeStamp\": 0,\n    \"Severity\": 1,\n    \"Source\": \"$Source:INCHARGE-SA-PRES$\",\n    \"SourceDomainName\": \"\",\n    \"SourceEventType\": \"\",\n    \"SourceInfo\": \"\",\n    \"SourceSpecific\": \"\",\n    \"TroubleTicketID\": \"\",\n    \"UserDefined1\": \"\",\n    \"UserDefined10\": \"\",\n    \"UserDefined11\": \"\",\n    \"UserDefined12\": \"\",\n    \"UserDefined13\": \"\",\n    \"UserDefined14\": \"\",\n    \"UserDefined15\": \"\",\n    \"UserDefined16\": \"\",\n    \"UserDefined17\": \"\",\n    \"UserDefined18\": \"\",\n    \"UserDefined19\": \"\",\n    \"UserDefined2\": \"\",\n    \"UserDefined20\": \"\",\n    \"UserDefined3\": \"\",\n    \"UserDefined4\": \"\",\n    \"UserDefined5\": \"\",\n    \"UserDefined6\": \"\",\n    \"UserDefined7\": \"\",\n    \"UserDefined8\": \"\",\n    \"UserDefined9\": \"\",\n    \"tags\": {\n        \"customer\": \"\",\n        \"location\": \"\",\n        \"latitude\": \"\"\n    }\n}\n\nwith DAG(\n\tdag_id='slack_action',\n\tschedule_interval=None,\n\tstart_date=datetime(2022,5,16),\n    default_args={'slack_conn_id': 'slack_connection', 'channel': '#airflow-slack-integration'},\n    params=myParams,\n\tis_paused_upon_creation=False,\n\tcatchup=False,\n    on_success_callback =success,\n    on_failure_callback =failure\n) as dag:\n\n    # 1. send slack message with JIRA info and summary\n    task_post_slack = SlackAPIPostOperator(\n        task_id='task_post_slack',\n        text='TCSA Notification received\\n {{ params.Name }}\\n {{ params.Source }}',\n        channel='#airflow-slack-integration',\n        on_success_callback = success,\n        on_failure_callback =failure\n    )\n\n    task_post_slack",
    "file_type": "PYTHON",
    "last_updated": "21 Nov, 2022, 00:42:45 UTC"
}
string
action_name
Required

Name of the remediation action

file_type
Required

either PYTHON or YAML

Possible values are : PYTHON, YAML,
string
file_data
Optional

file content

string
created_on
Optional

action creation timestamp

string
last_updated
Optional

action last update timestamp


400

Invalid Request sent by the user

Returns ErrorDetails of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "detailedMessage": "string"
}
string
errorCode
Required

Error code for the failed request

string
message
Required

Short summary of the error occurred

string
detailedMessage
Optional

Detailed message with probable solution


404

Cannot find requested resource

Returns ErrorDetails of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "detailedMessage": "string"
}
string
errorCode
Required

Error code for the failed request

string
message
Required

Short summary of the error occurred

string
detailedMessage
Optional

Detailed message with probable solution


500

Internal server error

Returns ErrorDetails of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "detailedMessage": "string"
}
string
errorCode
Required

Error code for the failed request

string
message
Required

Short summary of the error occurred

string
detailedMessage
Optional

Detailed message with probable solution