MENU
    /api/stations/v1/station-groups
    • 17 Oct 2024
    • 7 Minutes to read
    • Contributors

    /api/stations/v1/station-groups


    Article summary

    Post
    /api/stations/v1/station-groups

    Creates a station group.

    Body parameters

    The fields to create a station group.

    Collapse all
    object

    Used to create a station group.

    Example{ "name": "Boston", "description": "Contains all the stations in the Boston factory.", "appAssignments": [ { "type": "app-folder", "tag": "latest-published", "appFolderId": "swM2aGebq5MjhKafN" } ] }
    name
    string Required

    The name of the station group.

    Max length500
    description
    string

    A short description of the station group.

    Max length5000
    appAssignments
    Array of object (GenericAppAssignment)

    The station group's app assignments. Stations within this group will inherit these assignments.

    object

    Represents the contents of a single app assignment.

    Example{ "type": "app", "tag": "development", "appId": "swM2aGebq5MjhKafN" }
    #content#
    OneOf
    AllAppAssignment
    type
    string Required
    Valid values[ "all" ]
    Default"all"
    tag
    string Required

    The tag of an app assignment. Determines if the app assignment refers to the development version of an app or the latest production version.

    Valid values[ "development", "latest-published" ]
    FolderAppAssignment
    type
    string Required
    Valid values[ "app-folder" ]
    Default"app-folder"
    tag
    string Required

    The tag of an app assignment. Determines if the app assignment refers to the development version of an app or the latest production version.

    Valid values[ "development", "latest-published" ]
    appFolderId
    Exampleg56RCoZCtzv7borvp
    SpecificAppAssignment
    type
    string Required
    Valid values[ "app" ]
    Default"app"
    tag
    string Required

    The tag of an app assignment. Determines if the app assignment refers to the development version of an app or the latest production version.

    Valid values[ "development", "latest-published" ]
    appId
    Exampleg56RCoZCtzv7borvp
    VersionAppAssignment
    type
    string Required
    Valid values[ "app-version" ]
    Default"app-version"
    appVersionId
    Exampleg56RCoZCtzv7borvp
    Responses
    200

    The station group was successfully created.

    Collapse all
    object

    Represents a station group.

    Example{ "id": "swM2aGebq5MjhKafN", "name": "Boston", "description": "Contains all the stations in the Boston factory.", "appAssignments": [ { "id": "78M2aGebq5MjhKafN", "type": "app-folder", "tag": "latest-published", "appFolderId": "12M2aGebq5MjhKafN" } ], "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" ] } }
    id
    Exampleg56RCoZCtzv7borvp
    name
    string

    The name of the station group.

    parentId
    Exampleg56RCoZCtzv7borvp
    description
    string

    A short description of the station group.

    created
    at
    string (date-time)

    A date-time string as defined by RFC 3339 §5.6.

    Example2022-11-21T07:59:10Z
    by
    object (ActorMetadata)

    Represents a user, api-token, or device.

    lastModified
    archived
    workspaces
    object (WorkspaceMembership)

    A description of the workspaces of which a resource is a member. Workspace membership can have one of two scope values. A scope of all means that a resource is a member of all current and future workspaces. A scope of the value specific means that a resource is a member of a set of particular workspaces as described by the workspaceIds property.

    Example{ "scope": "specific", "workspaceIds": [ "DEFAULT" ] }
    400

    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.

    Collapse all
    OneOf
    object
    errorCode
    string

    A machine-readable code identifying the type of error.

    Pattern^[a-zA-Z0-9.]$
    message
    string

    A human-readable description of the error intended for debugging purposes only.

    The exact content of this message is not stable.

    retryable
    boolean

    Whether the request can be automatically retried by the client.

    object
    errorCode
    string

    A machine-readable code identifying the type of error.

    Pattern^[a-zA-Z0-9.]$
    message
    string

    A human-readable description of the error intended for debugging purposes only.

    The exact content of this message is not stable.

    retryable
    boolean

    Whether the request can be automatically retried by the client.

    object
    errorCode
    string

    A machine-readable code identifying the type of error.

    Pattern^[a-zA-Z0-9.]$
    message
    string

    A human-readable description of the error intended for debugging purposes only.

    The exact content of this message is not stable.

    retryable
    boolean

    Whether the request can be automatically retried by the client.

    object
    errorCode
    string

    A machine-readable code identifying the type of error.

    Pattern^[a-zA-Z0-9.]$
    message
    string

    A human-readable description of the error intended for debugging purposes only.

    The exact content of this message is not stable.

    retryable
    boolean

    Whether the request can be automatically retried by the client.

    object
    errorCode
    string

    A machine-readable code identifying the type of error.

    Pattern^[a-zA-Z0-9.]$
    message
    string

    A human-readable description of the error intended for debugging purposes only.

    The exact content of this message is not stable.

    retryable
    boolean

    Whether the request can be automatically retried by the client.

    object
    errorCode
    string

    A machine-readable code identifying the type of error.

    Pattern^[a-zA-Z0-9.]$
    message
    string

    A human-readable description of the error intended for debugging purposes only.

    The exact content of this message is not stable.

    retryable
    boolean

    Whether the request can be automatically retried by the client.

    details
    object
    headerName
    string

    The name of the given HTTP header which had multiple values.

    401

    The request was missing required authentication information.

    This error is not automatically retryable.

    object
    errorCode
    string

    A machine-readable code identifying the type of error.

    Pattern^[a-zA-Z0-9.]$
    message
    string

    A human-readable description of the error intended for debugging purposes only.

    The exact content of this message is not stable.

    retryable
    boolean

    Whether the request can be automatically retried by the client.

    404

    The requested resource was not found.

    This error is not automatically retryable.

    object
    errorCode
    string

    A machine-readable code identifying the type of error.

    Pattern^[a-zA-Z0-9.]$
    message
    string

    A human-readable description of the error intended for debugging purposes only.

    The exact content of this message is not stable.

    retryable
    boolean

    Whether the request can be automatically retried by the client.

    409

    Resource with this name already exists in the workspace.

    This error is not automatically retryable.

    Collapse all
    object
    errorCode
    string

    A machine-readable code identifying the type of error.

    Pattern^[a-zA-Z0-9.]$
    message
    string

    A human-readable description of the error intended for debugging purposes only.

    The exact content of this message is not stable.

    retryable
    boolean

    Whether the request can be automatically retried by the client.

    details
    object
    name
    string
    type
    string
    422

    An error occurred. The Tulip error codes generic.resourceLimitInWorkspaceReached, stations.invalidReferencedResourceId, stations.invalidResourceDescription, and stations.invalidResourceName 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.

    Collapse all
    OneOf
    object
    errorCode
    string

    A machine-readable code identifying the type of error.

    Pattern^[a-zA-Z0-9.]$
    message
    string

    A human-readable description of the error intended for debugging purposes only.

    The exact content of this message is not stable.

    retryable
    boolean

    Whether the request can be automatically retried by the client.

    details
    object
    workspaceId
    string
    resourceType
    string
    limit
    number

    The limit of how many resources of the type can be in the workspace.

    current
    number

    The current number of resource of the type in the workspace.

    object
    errorCode
    string

    A machine-readable code identifying the type of error.

    Pattern^[a-zA-Z0-9.]$
    message
    string

    A human-readable description of the error intended for debugging purposes only.

    The exact content of this message is not stable.

    retryable
    boolean

    Whether the request can be automatically retried by the client.

    details
    Array of object

    A list of invalid referenced resources.

    object
    resourceId
    string

    The id of the invalid resource.

    details
    string

    Details about why the resource was invalid.

    object
    errorCode
    string

    A machine-readable code identifying the type of error.

    Pattern^[a-zA-Z0-9.]$
    message
    string

    A human-readable description of the error intended for debugging purposes only.

    The exact content of this message is not stable.

    retryable
    boolean

    Whether the request can be automatically retried by the client.

    details
    object
    reason
    string
    object
    errorCode
    string

    A machine-readable code identifying the type of error.

    Pattern^[a-zA-Z0-9.]$
    message
    string

    A human-readable description of the error intended for debugging purposes only.

    The exact content of this message is not stable.

    retryable
    boolean

    Whether the request can be automatically retried by the client.

    details
    object
    reason
    string
    429

    Too many requests have been made to this endpoint in a short time period.

    This error is not automatically retryable.

    Collapse all
    object
    errorCode
    string

    A machine-readable code identifying the type of error.

    Pattern^[a-zA-Z0-9.]$
    message
    string

    A human-readable description of the error intended for debugging purposes only.

    The exact content of this message is not stable.

    retryable
    boolean

    Whether the request can be automatically retried by the client.

    details
    object
    details
    string

    Additional details about this endpoint's rate limits.

    500

    An internal server error occurred. Please contact support@tulip.co if the error persists.

    This error is not automatically retryable.

    object
    errorCode
    string

    A machine-readable code identifying the type of error.

    Pattern^[a-zA-Z0-9.]$
    message
    string

    A human-readable description of the error intended for debugging purposes only.

    The exact content of this message is not stable.

    retryable
    boolean

    Whether the request can be automatically retried by the client.


    Was this article helpful?