Get all action runs
GET/v1/actions/runs
This route allows you to fetch all action runs in your Port account. The route will perform a logical AND between all query parameters below, and return all action runs that match the criteria.
Pagination: Results are sorted by creation time (newest first). Use the next token from the response to fetch subsequent pages. When next is absent, there are no more results. Note that RBAC filtering may cause a page to contain fewer items than limit, or even return an empty runs array while next is still present — always use the absence of next as the signal that there are no more results.
To learn more about action runs, check out the documentation.
Request
Parameters (JSON)
{
"parameters": [
{
"schema": {
"type": "string"
},
"in": "query",
"name": "entity",
"required": false,
"description": "The identifier of the entity associated with the action run."
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "blueprint",
"required": false,
"description": "The identifier of the blueprint associated with the action run."
},
{
"schema": {
"type": "boolean"
},
"in": "query",
"name": "active",
"required": false,
"description": "If `true`, only running action runs will be fetched."
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "user_email",
"required": false,
"description": "The email of the user who initiated the action run."
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "user_id",
"required": false,
"description": "The id of the user who initiated the action run."
},
{
"schema": {
"type": "number",
"minimum": 1,
"maximum": 1000
},
"in": "query",
"name": "limit",
"required": false,
"description": "The maximum number of action runs to fetch."
},
{
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"in": "query",
"name": "exclude",
"required": false,
"description": "The fields to exclude from the response",
"style": "form",
"explode": true
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "external_run_id",
"required": false,
"description": "The run id of your backend, for example the id that GitHub gives the workflow. This can be used to identify the action run instead of the `run_id`."
},
{
"schema": {
"type": "string",
"enum": [
"v1",
"v2"
]
},
"in": "query",
"name": "version",
"required": false,
"description": "Specifies the API version to use. Please use `v2` for the latest version of the API."
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "action",
"required": false
},
{
"schema": {
"type": "array",
"items": {
"type": "string",
"enum": [
"UI",
"API",
"AUTOMATION"
]
}
},
"in": "query",
"name": "source",
"required": false,
"style": "form",
"explode": true
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "next",
"required": false,
"description": "An opaque cursor for pagination. Pass the `next` value from the previous response to fetch the next page of results."
}
]
}Request body schema (JSON)
{
"title": "Body"
}Responses
- 200
- 401
- 404
Retrieved successfully.
Default Response
A resource with the provided identifier was not found
Responses (JSON)
{
"responses": {
"200": {
"description": "Retrieved successfully.",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"enum": [
true
]
},
"runs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"blueprint": {
"type": "object",
"properties": {
"identifier": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
},
"icon": {
"type": [
"string",
"null"
]
},
"deleted": {
"type": "boolean"
}
},
"required": [
"identifier"
]
},
"entity": {
"type": "object",
"properties": {
"identifier": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
},
"icon": {
"type": [
"string",
"null"
]
},
"deleted": {
"type": "boolean"
}
},
"required": [
"identifier"
]
},
"action": {
"type": "object",
"properties": {
"identifier": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
},
"icon": {
"type": [
"string",
"null"
]
},
"deleted": {
"type": "boolean"
}
},
"required": [
"identifier"
]
},
"properties": {
"type": "object"
},
"rawProperties": {
"type": "object"
},
"endedAt": {
"type": "string",
"format": "date-time"
},
"source": {
"type": [
"string",
"object"
]
},
"requiredApproval": {
"type": [
"boolean",
"object"
],
"properties": {
"type": {
"type": "string",
"enum": [
"ALL",
"ANY"
]
}
},
"required": [
"type"
]
},
"status": {
"type": "string"
},
"statusLabel": {
"type": [
"string",
"null"
]
},
"link": {
"type": [
"array",
"string"
],
"items": {
"type": "string"
}
},
"summary": {
"type": "string"
},
"approval": {
"type": [
"object",
"null"
],
"properties": {
"description": {
"type": "string"
},
"userId": {
"type": [
"string",
"null"
]
},
"impersonatedUserId": {
"type": [
"string",
"null"
]
},
"state": {
"type": "string"
}
}
},
"payload": {
"type": [
"object",
"null"
],
"properties": {
"type": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri"
},
"agent": {
"type": "boolean"
},
"synchronized": {
"type": "boolean"
},
"method": {
"type": "string"
},
"headers": {
"type": "object",
"properties": {
"RUN_ID": {
"type": "string"
}
}
},
"body": {
"type": "object",
"properties": {
"port_context": {
"type": "object",
"properties": {
"runId": {
"type": "string"
}
}
}
}
}
}
},
"response": {
"type": [
"string",
"array",
"object"
],
"items": {}
},
"pendingExecution": {
"type": "boolean"
},
"claimedUntil": {
"type": "string",
"format": "date-time"
},
"installationId": {
"type": "string"
},
"createdBy": {
"type": "string"
},
"impersonatedBy": {
"type": "string"
},
"impersonatedUserId": {
"type": "string"
},
"updatedBy": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"action",
"properties",
"requiredApproval",
"source",
"status"
]
}
},
"next": {
"type": "string",
"description": "An opaque cursor for fetching the next page. Absent when there are no more results."
}
},
"required": [
"ok"
],
"additionalProperties": false,
"description": "Retrieved successfully."
}
}
}
},
"401": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error"
],
"additionalProperties": false
}
}
}
},
"404": {
"description": "A resource with the provided identifier was not found",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error",
"message"
],
"additionalProperties": false,
"description": "A resource with the provided identifier was not found"
}
}
}
}
}
}