> ## 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/interfaces > Creates an interface. ## OpenAPI ````json POST /api/stations/v1/interfaces { "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/interfaces": { "post": { "operationId": "createInterface", "description": "Creates an interface.", "tags": [ "stations" ], "x-tulip-visibility": "public", "requestBody": { "description": "The fields to create an interface.", "required": "true", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInterface" } } } }, "parameters": [ { "name": "replaceInterfaceAtStation", "description": "If set to true, indicates that if there is already an interface at the station it will be replaced.", "in": "query", "required": "false", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "The interface was successfully created.\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Interface" } } } }, "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" ] } ] } } } }, "409": { "description": "An error occurred. The Tulip error codes `stations.interfaceAlreadyAssignedAtStation` and `stations.resourceWithThisNameAlreadyExists` both use the 409 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": "Attempts to assign an interface to a station that already has an interface.\nPlease specify replaceInterfaceAtStation parameter if you wish to replace the existing interface.\n\nThis error is not automatically retryable.", "properties": { "errorCode": { "enum": [ "stations.interfaceAlreadyAssignedAtStation" ] }, "details": { "type": "object", "properties": { "stationId": { "$ref": "#/components/schemas/StationId" } }, "required": [ "stationId" ] }, "retryable": { "enum": [ "false" ] } }, "required": [ "errorCode", "retryable", "details" ] } ] }, { "allOf": [ { "$ref": "#/components/schemas/ApiError" }, { "type": "object", "description": "Resource with this name already exists in the workspace.\n\nThis error is not automatically retryable.", "properties": { "errorCode": { "enum": [ "stations.resourceWithThisNameAlreadyExists" ] }, "details": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string" } }, "required": [ "name", "type" ] }, "retryable": { "enum": [ "false" ] } }, "required": [ "errorCode", "retryable", "details" ] } ] } ] } } } }, "422": { "description": "An error occurred. The Tulip error codes `generic.resourceLimitInWorkspaceReached`, `stations.instanceDoesNotSupportReusableLinks`, `stations.invalidResourceName`, and `stations.referencedStationDoesNotExist` all use the 422 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 number of resources of the resource type in a workspace has reached the allowed limit.\n\nThis error is not automatically retryable.", "properties": { "errorCode": { "enum": [ "generic.resourceLimitInWorkspaceReached" ] }, "details": { "type": "object", "properties": { "workspaceId": { "type": "string" }, "resourceType": { "type": "string" }, "limit": { "type": "number", "description": "The limit of how many resources of the type can be in the workspace." }, "current": { "type": "number", "description": "The current number of resource of the type in the workspace." } }, "required": [ "workspaceId", "resourceType" ] }, "retryable": { "enum": [ "false" ] } }, "required": [ "errorCode", "retryable", "details" ] } ] }, { "allOf": [ { "$ref": "#/components/schemas/ApiError" }, { "type": "object", "description": "This Tulip instance does not support reusable registration links.\n\nThis error is not automatically retryable.", "properties": { "errorCode": { "enum": [ "stations.instanceDoesNotSupportReusableLinks" ] }, "retryable": { "enum": [ "false" ] } }, "required": [ "errorCode", "retryable" ] } ] }, { "allOf": [ { "$ref": "#/components/schemas/ApiError" }, { "type": "object", "description": "The resource name is not valid.\n\nThis error is not automatically retryable.", "properties": { "errorCode": { "enum": [ "stations.invalidResourceName" ] }, "details": { "type": "object", "properties": { "reason": { "type": "string" } }, "required": [ "reason" ] }, "retryable": { "enum": [ "false" ] } }, "required": [ "errorCode", "retryable", "details" ] } ] }, { "allOf": [ { "$ref": "#/components/schemas/ApiError" }, { "type": "object", "description": "Station referenced in this request does not exist\n\nThis error is not automatically retryable.", "properties": { "errorCode": { "enum": [ "stations.referencedStationDoesNotExist" ] }, "details": { "type": "object", "properties": { "stationId": { "$ref": "#/components/schemas/StationId" } }, "required": [ "stationId" ] }, "retryable": { "enum": [ "false" ] } }, "required": [ "errorCode", "retryable", "details" ] } ] } ] } } } }, "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 internal server error occurred. Please contact [support@tulip.co](mailto:support@tulip.co)\nif the error persists.\n\nThis error is not automatically retryable.", "content": { "application/json": { "schema": { "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" ] } ] } } } } } } } }, "components": { "schemas": { "CreateInterface": { "type": "object", "description": "Used to create an interface.\n", "properties": { "name": { "type": "string", "description": "The name of the interface.\n", "maxLength": "500" }, "stationId": { "allOf": [ { "$ref": "#/components/schemas/StationId" }, { "description": "The ID of the station this interface should be assigned to.\n" } ] }, "isRegistrationLinkReusable": { "type": "boolean", "description": "Flag indicating whether the registration link for this interface can be used more than once.\nOnly valid on Tulip instances using SAML or LDAP based logins.\nSetting this flag to true on a badge ID site will result in an error.\n", "default": "false" } }, "required": [ "name", "stationId" ], "example": { "name": "iPad 5", "stationId": "78M2aGebq5MjhKafN" } }, "Interface": { "type": "object", "description": "Represents an interface.\n", "properties": { "id": { "$ref": "#/components/schemas/InterfaceId" }, "name": { "type": "string", "description": "The name of the interface.\n" }, "type": { "type": "string", "enum": [ "computer", "mobile" ], "description": "The type of the interface.\n" }, "stationId": { "allOf": [ { "$ref": "#/components/schemas/StationId" }, { "description": "The ID of the station this interface is assigned to.\n" } ] }, "registration": { "$ref": "#/components/schemas/InterfaceRegistration" }, "clientInfo": { "$ref": "#/components/schemas/InterfaceClientInfo" }, "created": { "$ref": "#/components/schemas/Created" }, "lastModified": { "$ref": "#/components/schemas/LastModified" }, "archived": { "$ref": "#/components/schemas/Archived" }, "workspaces": { "$ref": "#/components/schemas/WorkspaceMembership" } }, "required": [ "id", "name", "type", "uuid", "registration", "created", "workspaces" ], "example": { "id": "swM2aGebq5MjhKafN", "name": "iPad 5", "type": "computer", "stationId": "78M2aGebq5MjhKafN", "registration": { "status": "pending", "mode": "link", "link": { "player": "http://acme.tulip.co/open-player?tulip-player=eyJhY3Rpb24iOiJyZWdpc3RlclVzaW5nUmVnaXM0cmF0aW9uSWRl", "browser": "http://acme.tulip.co/w/DEFAULT/player?registrationIdentifier=Ak72m5fU6_o1E16ARx-ewh-5x2CmmfBLoBkk0KFcUBI" } }, "created": { "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" ] }, "StationId": { "allOf": [ { "$ref": "#/components/schemas/RandomId" }, { "description": "The id of a station.\n" } ] }, "InterfaceId": { "allOf": [ { "$ref": "#/components/schemas/RandomId" }, { "description": "The ID of an interface.\n" } ] }, "InterfaceRegistration": { "type": "object", "description": "The registration information for the interface.\n", "properties": { "status": { "type": "string", "enum": [ "pending", "registered" ], "description": "The status of this registration.\n" }, "mode": { "type": "string", "enum": [ "manual", "link" ], "description": "The mode of this registration.\n" }, "token": { "type": "object", "description": "The token used to register the interface.\n", "properties": { "value": { "type": "string", "description": "The value of the token.\n" }, "isActive": { "type": "boolean", "description": "Flag indicating whether the token is active.\n" }, "isAutoGenerated": { "type": "boolean", "description": "Flag indicating whether the token was auto-generated.\n" }, "isReusable": { "type": "boolean", "description": "Flag indicating whether the registration link can be re-used.\n" } }, "required": [ "value", "isActive", "isAutoGenerated", "isReusable" ] }, "link": { "type": "object", "description": "The link used to register the interface.\n", "properties": { "player": { "type": "string", "description": "Registration link to be used in player.\n" }, "browser": { "type": "string", "description": "Registration link to be used in browser.\n" } }, "required": [ "player", "browser" ] } }, "required": [ "status", "mode" ] }, "InterfaceClientInfo": { "type": "object", "description": "The client information for the interface.\n", "properties": { "platform": { "type": "string", "description": "The client's platform.\n" }, "playerVersion": { "type": "string", "description": "The Tulip player version for this client.\n" }, "releaseChannel": { "type": "string", "description": "The client's release channel.\n" }, "deviceInfo": { "type": "object", "description": "Information about the physical device or hardware running the Player application.\n", "properties": { "os": { "type": "string", "description": "The operating system name.\n" }, "osVersion": { "type": "string", "description": "The operating system version.\n" }, "osBuild": { "type": "string", "description": "The operating system build number.\n" }, "manufacturer": { "type": "string", "description": "Manufacturer name.\n" }, "model": { "type": "string", "description": "Model name.\n" }, "hardwareSerialNumber": { "type": "string", "description": "Hardware serial number.\n" } } }, "browserInfo": { "type": "object", "description": "Information about the browser running the Player application. Only present for browser\nplatform.\n", "properties": { "name": { "type": "string", "description": "The browser name.\n" }, "version": { "type": "string", "description": "The browser version.\n" } } } }, "required": [ "platform" ] }, "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" ] } }, "RandomId": { "description": "A randomly generated unique identifier.\n\nTypically has ~98 bits of entropy.\n", "example": "g56RCoZCtzv7borvp", "type": "string", "pattern": "^[a-zA-Z0-9_]+$" }, "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" ] }, "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" } ] } } } } ````