environment_history
Creates, updates, deletes, gets or lists an environment_history resource.
Overview​
| Name | environment_history |
| Type | Resource |
| Id | railway.environments.environment_history |
Fields​
The following fields are returned by SELECT queries:
- list
One row per ProjectHistoryEntry. One settled change in an environment: a system event or a terminal operation (patch, deploy, …).
| Name | Datatype | Description |
|---|---|---|
id | string | |
workflow_id | string | |
action | string | |
activity_payload | object | Minimal payload for activity feed list rendering. Same trimming as Event.activityPayload. |
actor | object | ProjectOperationActor object |
changes | object | |
created_at | string (date-time) | When the change settled. |
object | string | |
operation_kind | string | '' for a plain event; e.g. 'patch', 'deploy' for operations. |
outcome | string | '' for a plain event; 'applied' or 'failed' for operations. |
parent_ref | string | |
payload | object | |
service_ids | array | |
severity | string | (CRITICAL, INFO, NOTICE, WARNING) |
source | string |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | environment_id | actions, objects, outcomes, service_ids | Settled history for an environment (system events + terminal operations), newest first. Cursor-paginated. Backed by the Railway GraphQL query environmentHistory. |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
environment_id | string | |
actions | string | GraphQL list literal, for example ["a", "b"]. |
objects | string | GraphQL list literal, for example ["a", "b"]. |
outcomes | string | Any of '', 'applied', 'failed'. GraphQL list literal, for example ["a", "b"]. |
service_ids | string | GraphQL list literal, for example ["a", "b"]. |
SELECT examples​
- list
Settled history for an environment (system events + terminal operations), newest first. Cursor-paginated. Backed by the Railway GraphQL query environmentHistory.
SELECT
id,
workflow_id,
action,
activity_payload,
actor,
changes,
created_at,
object,
operation_kind,
outcome,
parent_ref,
payload,
service_ids,
severity,
source
FROM railway.environments.environment_history
WHERE environment_id = '{{ environment_id }}' -- required
AND actions = '{{ actions }}'
AND objects = '{{ objects }}'
AND outcomes = '{{ outcomes }}'
AND service_ids = '{{ service_ids }}'
;