> ## Documentation Index > Fetch the complete documentation index at: https://support.tulip.co/llms.txt > Use this file to discover all available pages before exploring further. # /api/stations/v1/stations/{stationId}/archive > Archives a station. Restore is not supported at the moment. ## OpenAPI ````json POST /api/stations/v1/stations/{stationId}/archive { "openapi": "3.0.3", "info": { "title": "Tulip API", "version": "v1" }, "tags": [ { "name": "machines", "description": "An API for managing machines and their types" }, { "name": "stations", "description": "An API for managing and updating stations." }, { "name": "users", "description": "An API for managing users and their roles/permissions." } ], "paths": { "/api/stations/v1/stations/{stationId}/archive": { "post": { "operationId": "archiveStation", "description": "Archives a station. Restore is not supported at the moment.\n", "tags": [ "stations" ], "x-tulip-visibility": "public", "parameters": [ { "name": "stationId", "description": "The id of the station to archive.", "in": "path", "required": "true", "schema": { "$ref": "#/components/schemas/StationId" } } ], "responses": { "200": { "description": "The station was successfully archived.\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Station" } } } }, "400": { "description": "An error occurred. The Tulip error codes `generic.customerIdRequired`, `generic.workspaceIdRequired`, `generic.invalidParams`, `http.invalidBodyJson`, `http.invalidHeaders`, and `http.multiValueHeader` all use the 400 HTTP status code. See the documentation of the response content schema for details on these specific Tulip errors that could result in this status code.", "content": { "application/json": { "schema": { "oneOf": [ { "allOf": [ { "$ref": "#/components/schemas/ApiError" }, { "type": "object", "description": "The request was missing information about the Tulip customer context.\n\nThis error is not automatically retryable.", "properties": { "errorCode": { "enum": [ "generic.customerIdRequired" ] }, "retryable": { "enum": [ "false" ] } }, "required": [ "errorCode", "retryable" ] } ] }, { "allOf": [ { "$ref": "#/components/schemas/ApiError" }, { "type": "object", "description": "The request was missing information about the Tulip workspace context.\n\nThis error is not automatically retryable.", "properties": { "errorCode": { "enum": [ "generic.workspaceIdRequired" ] }, "retryable": { "enum": [ "false" ] } }, "required": [ "errorCode", "retryable" ] } ] }, { "allOf": [ { "$ref": "#/components/schemas/ApiError" }, { "type": "object", "description": "The request parameters were invalid.\n\nThis error is not automatically retryable.", "properties": { "errorCode": { "enum": [ "generic.invalidParams" ] }, "retryable": { "enum": [ "false" ] } }, "required": [ "errorCode", "retryable" ] } ] }, { "allOf": [ { "$ref": "#/components/schemas/ApiError" }, { "type": "object", "description": "The HTTP request body could not be decoded as JSON.\n\nThis error is not automatically retryable.", "properties": { "errorCode": { "enum": [ "http.invalidBodyJson" ] }, "retryable": { "enum": [ "false" ] } }, "required": [ "errorCode", "retryable" ] } ] }, { "allOf": [ { "$ref": "#/components/schemas/ApiError" }, { "type": "object", "description": "The HTTP request headers were invalid.\n\nThis error is not automatically retryable.", "properties": { "errorCode": { "enum": [ "http.invalidHeaders" ] }, "retryable": { "enum": [ "false" ] } }, "required": [ "errorCode", "retryable" ] } ] }, { "allOf": [ { "$ref": "#/components/schemas/ApiError" }, { "type": "object", "description": "An HTTP request header contained multiple values.\n\nThis error is not automatically retryable.", "properties": { "errorCode": { "enum": [ "http.multiValueHeader" ] }, "details": { "type": "object", "properties": { "headerName": { "description": "The name of the given HTTP header which had multiple values.\n", "type": "string" } }, "required": [ "headerName" ] }, "retryable": { "enum": [ "false" ] } }, "required": [ "errorCode", "retryable", "details" ] } ] } ] } } } }, "401": { "description": "The request was missing required authentication information.\n\nThis error is not automatically retryable.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ApiError" }, { "type": "object", "description": "The request was missing required authentication information.\n\nThis error is not automatically retryable.", "properties": { "errorCode": { "enum": [ "generic.authRequired" ] }, "retryable": { "enum": [ "false" ] } }, "required": [ "errorCode", "retryable" ] } ] } } } }, "404": { "description": "The requested resource was not found.\n\nThis error is not automatically retryable.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ApiError" }, { "type": "object", "description": "The requested resource was not found.\n\nThis error is not automatically retryable.", "properties": { "errorCode": { "enum": [ "generic.notFound" ] }, "retryable": { "enum": [ "false" ] } }, "required": [ "errorCode", "retryable" ] } ] } } } }, "422": { "description": "This operation is not permitted on the requested resource because it is archived.\n\nThis error is not automatically retryable.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ApiError" }, { "type": "object", "description": "This operation is not permitted on the requested resource because it is archived.\n\nThis error is not automatically retryable.", "properties": { "errorCode": { "enum": [ "generic.archivedResourceUnsupportedOperation" ] }, "retryable": { "enum": [ "false" ] } }, "required": [ "errorCode", "retryable" ] } ] } } } }, "429": { "description": "Too many requests have been made to this endpoint in a short time period.\n\nThis error is not automatically retryable.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ApiError" }, { "type": "object", "description": "Too many requests have been made to this endpoint in a short time period.\n\nThis error is not automatically retryable.", "properties": { "errorCode": { "enum": [ "http.endpointRateLimitExceeded" ] }, "details": { "type": "object", "properties": { "details": { "description": "Additional details about this endpoint's rate limits.\n", "type": "string" } } }, "retryable": { "enum": [ "false" ] } }, "required": [ "errorCode", "retryable", "details" ] } ] } } } }, "500": { "description": "An error occurred. The Tulip error codes `generic.internal` and `stations.internalTypeValidationError` both use the 500 HTTP status code. See the documentation of the response content schema for details on these specific Tulip errors that could result in this status code.", "content": { "application/json": { "schema": { "oneOf": [ { "allOf": [ { "$ref": "#/components/schemas/ApiError" }, { "type": "object", "description": "An internal server error occurred. Please contact [support@tulip.co](mailto:support@tulip.co)\nif the error persists.\n\nThis error is not automatically retryable.", "properties": { "errorCode": { "enum": [ "generic.internal" ] }, "retryable": { "enum": [ "false" ] } }, "required": [ "errorCode", "retryable" ] } ] }, { "allOf": [ { "$ref": "#/components/schemas/ApiError" }, { "type": "object", "description": "A resource failed internal type validation.\n\nThis error is not automatically retryable.", "properties": { "errorCode": { "enum": [ "stations.internalTypeValidationError" ] }, "details": { "type": "object", "properties": { "resourceName": { "description": "The name of the resource that failed validation.\n", "type": "string" }, "resourceId": { "description": "The id of the resource that failed validation.\n", "type": "string" } }, "required": [ "resourceName" ] }, "retryable": { "enum": [ "false" ] } }, "required": [ "errorCode", "retryable", "details" ] } ] } ] } } } } } } } }, "components": { "schemas": { "StationId": { "allOf": [ { "$ref": "#/components/schemas/RandomId" }, { "description": "The id of a station.\n" } ] }, "Station": { "type": "object", "description": "Represents a station.\n", "properties": { "id": { "$ref": "#/components/schemas/StationId" }, "name": { "type": "string", "description": "The name of the station.\n" }, "description": { "type": "string", "description": "A short description of the station.\n" }, "appExecutionState": { "allOf": [ { "$ref": "#/components/schemas/AppExecutionState" }, { "description": "The station's current app execution. If the station is not currently running an app, this\nfield is not included.\n" } ] }, "stationGroupId": { "allOf": [ { "$ref": "#/components/schemas/StationGroupId" }, { "description": "The station's group. If the station has no group, this field is not included.\n" } ] }, "operatorId": { "allOf": [ { "$ref": "#/components/schemas/UserId" }, { "description": "The user currently logged into the station.\n" } ] }, "timezone": { "allOf": [ { "$ref": "#/components/schemas/TimezoneId" }, { "description": "The timezone the station operates in.\n" } ] }, "created": { "allOf": [ { "$ref": "#/components/schemas/Created" }, { "description": "When and by whom the station was created. This field may be absent if the\nstation was not created via the API.\n" } ] }, "lastModified": { "allOf": [ { "$ref": "#/components/schemas/LastModified" }, { "description": "When and by whom the station was last modified. This field may be absent\nif the station was not created via the API.\n" } ] }, "archived": { "$ref": "#/components/schemas/Archived" }, "workspaces": { "$ref": "#/components/schemas/WorkspaceMembership" } }, "required": [ "id", "name", "workspaces" ], "example": { "id": "swM2aGebq5MjhKafN", "name": "Boston Line 1", "description": "Station for line 1 at the Boston location.", "stationGroupId": "12M453ebq5MjhKafN", "operatorId": "234M2aGebq5MjhKafN", "timezone": "America/New_York", "appExecutionState": { "stepId": "7psyeGebq5MjhKafN", "appVersionId": "58H1aGebp8DqkPaeV" }, "created": { "at": "2023-03-08T12:17:24Z", "by": { "id": "90M2aGebq5MjhKafN", "type": "user" } }, "lastModified": { "at": "2023-03-08T12:17:24Z", "by": { "id": "90M2aGebq5MjhKafN", "type": "user" } }, "workspaces": { "scope": "specific", "workspaceIds": [ "56M2aGebq5MjhKafN" ] } } }, "ApiError": { "description": "An error response returned by a Tulip API.\n", "type": "object", "properties": { "errorCode": { "description": "A machine-readable code identifying the type of error.\n", "type": "string", "pattern": "^[a-zA-Z0-9.]$" }, "message": { "description": "A human-readable description of the error intended for debugging purposes only.\n\nThe exact content of this message is not stable.\n", "type": "string" }, "retryable": { "description": "Whether the request can be automatically retried by the client.\n", "type": "boolean" } }, "required": [ "errorCode", "retryable" ] }, "RandomId": { "description": "A randomly generated unique identifier.\n\nTypically has ~98 bits of entropy.\n", "example": "g56RCoZCtzv7borvp", "type": "string", "pattern": "^[a-zA-Z0-9_]+$" }, "AppExecutionState": { "type": "object", "description": "Contains context about a station's current app execution.\n", "properties": { "appVersionId": { "allOf": [ { "$ref": "#/components/schemas/AppVersionId" }, { "description": "If the station is running an app, this field contains the id of the specific\napp version.\n" } ] }, "stepId": { "allOf": [ { "$ref": "#/components/schemas/AppStepId" }, { "description": "If the station is running an app and is on a step, this field contains the\nid of the specific app step.\n" } ] } }, "required": [ "appVersionId" ], "example": { "appVersionId": "614M2uGrbq5BjhKrpQ", "stepId": "9834aGebq5MjhKafN" } }, "StationGroupId": { "allOf": [ { "$ref": "#/components/schemas/RandomId" }, { "description": "The id of a station group.\n" } ] }, "UserId": { "allOf": [ { "$ref": "#/components/schemas/RandomId" }, { "description": "The ID of a Tulip User.\n" }, { "$ref": "#/components/schemas/RandomId" }, { "description": "A random string which uniquely identifies a user.\n" } ] }, "TimezoneId": { "type": "string", "description": "A canonical IANA time zone identifier.\n", "example": "America/New_York" }, "Created": { "allOf": [ { "$ref": "#/components/schemas/CRUDMetadata" }, { "description": "When and by whom a resource was created.\n", "required": [ "at" ] } ] }, "LastModified": { "allOf": [ { "$ref": "#/components/schemas/CRUDMetadata" }, { "description": "When and by whom a resource was last modified.\n", "required": [ "at", "by" ] } ] }, "Archived": { "allOf": [ { "$ref": "#/components/schemas/CRUDMetadata" }, { "description": "When and by whom a resource was archived. This field will be absent if and only if the\nresource is not currently archived.\n", "required": [ "at", "by" ] } ] }, "WorkspaceMembership": { "description": "A description of the workspaces of which a resource is a member. Workspace membership can\nhave one of two `scope` values. A `scope` of `all` means that a resource is a member of all\ncurrent and future workspaces. A `scope` of the value `specific` means that a resource is a\nmember of a set of particular workspaces as described by the `workspaceIds` property.\n", "type": "object", "required": [ "scope" ], "properties": { "scope": { "description": "Whether or not a resource is a member of a set of specific workspaces or all current and future workspaces.\n", "type": "string", "enum": [ "all", "specific" ] } }, "oneOf": [ { "$ref": "#/components/schemas/AllWorkspacesMembership" }, { "$ref": "#/components/schemas/SpecificWorkspacesMembership" } ], "discriminator": { "propertyName": "scope", "mapping": { "all": "#/components/schemas/AllWorkspacesMembership", "specific": "#/components/schemas/SpecificWorkspacesMembership" } }, "example": { "scope": "specific", "workspaceIds": [ "DEFAULT" ] } }, "AppVersionId": { "allOf": [ { "$ref": "#/components/schemas/RandomId" }, { "description": "The unique identifier for an app version.\n" }, { "$ref": "#/components/schemas/RandomId" }, { "description": "The id of an app version.\n" } ] }, "AppStepId": { "allOf": [ { "$ref": "#/components/schemas/RandomId" }, { "description": "The id of an app's step.\n" } ] }, "CRUDMetadata": { "description": "When and by whom an action was performed on a resource.\n", "type": "object", "properties": { "at": { "$ref": "#/components/schemas/DateTime" }, "by": { "$ref": "#/components/schemas/ActorMetadata" } } }, "AllWorkspacesMembership": { "type": "object", "properties": { "scope": { "description": "Describes a resource as a member of all current and future workspaces.\n", "type": "string", "enum": [ "all" ], "example": "all" } }, "required": [ "scope" ] }, "SpecificWorkspacesMembership": { "type": "object", "properties": { "scope": { "description": "Describes a resource as a member of a set of specific workspaces.\n", "type": "string", "enum": [ "specific" ], "example": "specific" }, "workspaceIds": { "description": "The workspaces in which a resource is a member.\n", "type": "array", "items": { "$ref": "#/components/schemas/WorkspaceId" } } }, "required": [ "scope", "workspaceIds" ] }, "DateTime": { "description": "A date-time string as defined by\n[RFC 3339 ยง5.6](https://tools.ietf.org/html/rfc3339#section-5.6).\n", "example": "2022-11-21T19:59:10+00:00", "type": "string", "format": "date-time" }, "ActorMetadata": { "description": "Represents a user, api-token, or device.\n", "type": "object", "properties": { "type": { "$ref": "#/components/schemas/ActorType" }, "id": { "$ref": "#/components/schemas/UserId" } }, "required": [ "type", "id" ] }, "WorkspaceId": { "allOf": [ { "$ref": "#/components/schemas/RandomId" }, { "description": "The ID of a Tulip Workspace.\n", "example": "DEFAULT", "type": "string" } ] }, "ActorType": { "description": "The type of actor performing an action.\n", "type": "string", "enum": [ "user", "client", "api-token", "app-exchange-api-token", "celosx-api-token", "automation", "instance-init", "scim", "unknown" ] } } } } ````