{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/instana/json-schema/instana-action-instance-schema.json",
  "title": "ActionInstance",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/instana-action-history-api-openapi.yml#/components/schemas/ActionInstance",
  "type": "object",
  "properties": {
    "actionDescription": {
      "type": "string",
      "description": "Action description of the action to run."
    },
    "actionId": {
      "type": "string",
      "description": "Action identifier of the action to run."
    },
    "actionInstanceId": {
      "type": "string",
      "description": "Action run identifier.",
      "readOnly": true
    },
    "actionName": {
      "type": "string",
      "description": "Action name of the action to run."
    },
    "actionSnapshot": {
      "type": "string",
      "description": "Snapshot of the action definition.",
      "readOnly": true
    },
    "actorId": {
      "type": "string",
      "description": "User identifier, API token or the policy identifier that started the action run."
    },
    "actorName": {
      "type": "string",
      "description": "Name of the user, API token or the policy that started the action run."
    },
    "actorType": {
      "type": "string",
      "description": "Type of Actor. Valid values are listed in the enum definition.",
      "enum": [
        "ACTOR_UNKNOWN",
        "USER",
        "APITOKEN",
        "POLICY"
      ]
    },
    "createdDate": {
      "type": "integer",
      "format": "int64",
      "description": "Action run created timestamp. The timestamp at which the action run got submitted."
    },
    "endDate": {
      "type": "integer",
      "format": "int64",
      "description": "Action run end timestamp. The timestamp at which the action run ended on the agent host."
    },
    "errorMessage": {
      "type": "string",
      "description": "Error message, if any, of action run on the agent host."
    },
    "eventEntityType": {
      "type": "string",
      "description": "Event entity type set in the event that triggered this action run."
    },
    "eventId": {
      "type": "string",
      "description": "Event identifier of the event that triggered this action run."
    },
    "eventSpecificationId": {
      "type": "string",
      "description": "Event specification identifier of the event that triggered this action run."
    },
    "externalSourceType": {
      "type": "string",
      "description": "If the action type is external this field contains the name of the external source."
    },
    "hostSnapshotId": {
      "type": "string",
      "description": "Host snapshot identifier of the agent on which the action ran."
    },
    "inputParameters": {
      "type": "array",
      "description": "List of input parameters to this action run.",
      "items": {
        "$ref": "#/$defs/ActionInstanceParameter"
      }
    },
    "metadata": {
      "type": "array",
      "description": "List of metadata parameters set to this action run by sensors.",
      "items": {
        "$ref": "#/$defs/ActionInstanceMetadataEntry"
      }
    },
    "output": {
      "type": "string",
      "description": "Action run output."
    },
    "policyId": {
      "type": "string",
      "description": "Identifier of the policy that triggered this action run."
    },
    "problemText": {
      "type": "string",
      "description": "Event problem text of the event that triggered this action run."
    },
    "returnCode": {
      "type": "integer",
      "format": "int32",
      "description": "Return code of action run on the agent host."
    },
    "startDate": {
      "type": "integer",
      "format": "int64",
      "description": "Action run start timestamp. The timestamp at which the action run started on the agent host."
    },
    "status": {
      "type": "string",
      "description": "Action run status. Valid values are listed in the enum definition.",
      "enum": [
        "STATUS_UNKNOWN",
        "SUBMITTED",
        "IN_PROGRESS",
        "SUCCESS",
        "FAILED",
        "READY",
        "TIMEOUT"
      ]
    },
    "targetSnapshotId": {
      "type": "string",
      "description": "Action target entity identifier set in the event that triggered this action run. This is the identifier of the entity on which an incident or issue was raised."
    },
    "type": {
      "type": "string",
      "description": "Action type. Valid values are listed in the enum definition.",
      "enum": [
        "SCRIPT",
        "HTTP",
        "ANSIBLE",
        "EXTERNAL",
        "GITHUB",
        "GITLAB",
        "JIRA",
        "MANUAL",
        "DOC_LINK"
      ]
    }
  },
  "required": [
    "actionId",
    "actionName",
    "type"
  ],
  "$defs": {
    "ActionInstanceMetadataEntry": {
      "type": "object",
      "description": "List of metadata parameters set to this action run by sensors.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Metadata name."
        },
        "value": {
          "type": "string",
          "description": "Metadata value."
        }
      },
      "required": [
        "name"
      ]
    },
    "ActionInstanceParameter": {
      "type": "object",
      "description": "List of input parameters to this action run.",
      "properties": {
        "displayName": {
          "type": "string",
          "description": "Parameter display name."
        },
        "name": {
          "type": "string",
          "description": "Parameter name."
        },
        "type": {
          "type": "string",
          "description": "Parameter type. Valid values are `static`, `dynamic` or `vault`"
        },
        "value": {
          "type": "string",
          "description": "Parameter value."
        }
      },
      "required": [
        "displayName",
        "name"
      ]
    }
  }
}