# [BETA] Get action events for a specific action set. GET https://app.unleash-instance.example.com/api/admin/projects/{projectId}/actions/{id}/events **Enterprise feature** **[BETA]** This API is in beta state, which means it may change or be removed in the future. Returns a list of action events triggered by a specific action set, identified by its id. Reference: https://docs.getunleash.io/api/get-actions-events ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: admin-api version: 1.0.0 paths: /api/admin/projects/{projectId}/actions/{id}/events: get: operationId: get-actions-events summary: '[BETA] Get action events for a specific action set.' description: >- **Enterprise feature** **[BETA]** This API is in beta state, which means it may change or be removed in the future. Returns a list of action events triggered by a specific action set, identified by its id. tags: - subpackage_projects parameters: - name: projectId in: path required: true schema: type: string - name: id in: path required: true schema: type: string - name: limit in: query description: >- The number of results to return in a page. By default it is set to 50. required: false schema: type: string - name: offset in: query description: >- The number of results to skip when returning a page. By default it is set to 0. required: false schema: type: string - name: Authorization in: header description: API key needed to access this API required: true schema: type: string responses: '200': description: '#/components/schemas/actionSetEventsSchema' content: application/json: schema: $ref: '#/components/schemas/actionSetEventsSchema' '401': description: >- Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`. content: application/json: schema: $ref: '#/components/schemas/GetActionsEventsRequestUnauthorizedError' '403': description: >- The provided user credentials are valid, but the user does not have the necessary permissions to perform this operation content: application/json: schema: $ref: '#/components/schemas/GetActionsEventsRequestForbiddenError' '404': description: The requested resource was not found. content: application/json: schema: $ref: '#/components/schemas/GetActionsEventsRequestNotFoundError' servers: - url: https://app.unleash-instance.example.com components: schemas: ActionSetEventSchemaState: type: string enum: - started - success - failed description: >- The state of the action set event. Can be one of `started`, `success`, or `failed`. title: ActionSetEventSchemaState SignalSchemaPayload: type: object properties: {} description: The payload of the signal. title: SignalSchemaPayload SignalSchemaSource: type: string enum: - signal-endpoint description: >- The signal source type. Should be used along with `sourceId` to uniquely identify the resource that created this signal. title: SignalSchemaSource signalSchema: type: object properties: id: type: integer description: >- The signal's ID. Signal IDs are incrementing integers. In other words, a more recently created signal will always have a higher ID than an older one. payload: $ref: '#/components/schemas/SignalSchemaPayload' description: The payload of the signal. createdAt: type: string format: date-time description: The date and time of when the signal was created. source: $ref: '#/components/schemas/SignalSchemaSource' description: >- The signal source type. Should be used along with `sourceId` to uniquely identify the resource that created this signal. sourceId: type: integer description: >- The ID of the source that created this signal. Should be used along with `source` to uniquely identify the resource that created this signal. createdBySourceTokenId: type: - integer - 'null' description: >- The ID of the source token that created this signal. Only present if the signal was created by a signal endpoint. required: - id - createdAt - source - sourceId description: An object describing a signal. title: signalSchema ActionEventSchemaState: type: string enum: - not started - started - success - failed description: >- The state of the action. Can be one of `not started`, `started`, `success`, or `failed`. title: ActionEventSchemaState actionEventSchema: type: object properties: id: type: integer description: The id of the action set createdAt: type: string format: date-time description: The date and time of when the action was created. createdByUserId: type: integer description: The id of user that created this action set action: type: string description: The name of the action to execute sortOrder: type: integer description: The order in which the action should be executed executionParams: type: object additionalProperties: description: Any type description: A map of parameters to pass to the action state: $ref: '#/components/schemas/ActionEventSchemaState' description: >- The state of the action. Can be one of `not started`, `started`, `success`, or `failed`. details: type: - string - 'null' description: The details of the action event, if any. required: - id - createdAt - createdByUserId - action - sortOrder - state description: An object describing an action event. title: actionEventSchema ActionSetEventSchemaActionSetMatchSource: type: string enum: - signal-endpoint description: Match the source of the signal title: ActionSetEventSchemaActionSetMatchSource ActionSetEventSchemaActionSetMatch: type: object properties: source: $ref: '#/components/schemas/ActionSetEventSchemaActionSetMatchSource' description: Match the source of the signal sourceId: type: number format: double description: Match the source id of the signal payload: type: object additionalProperties: description: Any type description: Match the payload of the signal required: - source - sourceId - payload description: Defines a matching rule for the signal that will trigger the action set title: ActionSetEventSchemaActionSetMatch ActionSetEventSchemaActionSet: type: object properties: id: type: integer description: The ID of the action set. project: type: string description: The project that this action set belongs to. createdAt: type: string format: date-time description: The date and time of when the action set was created. createdByUserId: type: integer description: The ID of the user that created this action set. name: type: string description: The name of the action set description: type: - string - 'null' description: The description of the action set actorId: type: integer description: The id of the service account that will execute the action enabled: type: boolean default: true description: Whether this action set is enabled or not actions: type: array items: $ref: '#/components/schemas/actionEventSchema' description: >- The list of actions executed in sequential order when the action set was triggered, decorated with the individual action states. match: $ref: '#/components/schemas/ActionSetEventSchemaActionSetMatch' description: >- Defines a matching rule for the signal that will trigger the action set required: - id - project - createdAt - createdByUserId - name - actorId - actions - match description: >- The action set this action set event belongs to, where the individual actions are decorated with the respective action states. title: ActionSetEventSchemaActionSet actionSetEventSchema: type: object properties: id: type: integer description: >- The action set event's ID. Action set event IDs are incrementing integers. In other words, a more recently created action set event will always have a higher ID than an older one. actionSetId: type: integer description: The ID of the action set that the action set event belongs to. signalId: type: integer description: The ID of the signal that triggered this action set event. createdAt: type: string format: date-time description: >- The date and time of when the action set event was created. In other words, the date and time of when the action set started executing. state: $ref: '#/components/schemas/ActionSetEventSchemaState' description: >- The state of the action set event. Can be one of `started`, `success`, or `failed`. signal: $ref: '#/components/schemas/signalSchema' description: The signal that triggered this action set event. actionSet: $ref: '#/components/schemas/ActionSetEventSchemaActionSet' description: >- The action set this action set event belongs to, where the individual actions are decorated with the respective action states. required: - id - actionSetId - signalId - createdAt - state - signal - actionSet description: An object describing an action event. title: actionSetEventSchema actionSetEventsSchema: type: object properties: actionSetEvents: type: array items: $ref: '#/components/schemas/actionSetEventSchema' description: A list of action set events. required: - actionSetEvents description: A response model with a list of action set events. title: actionSetEventsSchema GetActionsEventsRequestUnauthorizedError: type: object properties: id: type: string description: The ID of the error instance name: type: string description: The name of the error kind message: type: string description: A description of what went wrong. title: GetActionsEventsRequestUnauthorizedError GetActionsEventsRequestForbiddenError: type: object properties: id: type: string description: The ID of the error instance name: type: string description: The name of the error kind message: type: string description: A description of what went wrong. title: GetActionsEventsRequestForbiddenError GetActionsEventsRequestNotFoundError: type: object properties: id: type: string description: The ID of the error instance name: type: string description: The name of the error kind message: type: string description: A description of what went wrong. title: GetActionsEventsRequestNotFoundError securitySchemes: apiKey: type: apiKey in: header name: Authorization description: API key needed to access this API bearerToken: type: http scheme: bearer description: API key needed to access this API, in Bearer token format ``` ## SDK Code Examples ```python import requests url = "https://app.unleash-instance.example.com/api/admin/projects/projectId/actions/id/events" headers = {"Authorization": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://app.unleash-instance.example.com/api/admin/projects/projectId/actions/id/events'; const options = {method: 'GET', headers: {Authorization: ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://app.unleash-instance.example.com/api/admin/projects/projectId/actions/id/events" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://app.unleash-instance.example.com/api/admin/projects/projectId/actions/id/events") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://app.unleash-instance.example.com/api/admin/projects/projectId/actions/id/events") .header("Authorization", "") .asString(); ``` ```php request('GET', 'https://app.unleash-instance.example.com/api/admin/projects/projectId/actions/id/events', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://app.unleash-instance.example.com/api/admin/projects/projectId/actions/id/events"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://app.unleash-instance.example.com/api/admin/projects/projectId/actions/id/events")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```