Link environment to server

createServerEnvironmentLink(input: ServerEnvironmentLinkInput!): Server!

Requires project.runtime.manage.

Arguments

ArgumentTypeRequired
inputServerEnvironmentLinkInput!Yes

Input fields

input

ServerEnvironmentLinkInput

FieldTypeRequiredDescription
serverIdID!YesID of a server you own. Linking and unlinking require project.runtime.manage on every project currently linked to the server. If none are linked, no project capability is required. Linking also requires project.runtime.manage on the environment’s project. Unlinking also requires API-key delete scope.
environmentIdID!Yes

Response

Returns Server!. Open the type for its fields and nested types.

FieldType
idID!
shortIdString!
userIdID!
environmentIds[ID!]!
hostnameString!
statusString!
createdAtDateTime!
updatedAtDateTime!

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
mutation CreateServerEnvironmentLink($input: ServerEnvironmentLinkInput!) {
  createServerEnvironmentLink(input: $input) {
    id
    status
    createdAt
    updatedAt
    environmentIds
  }
}
json
{
  "input": {
    "serverId": "00000000-0000-4000-8000-000000000001",
    "environmentId": "00000000-0000-4000-8000-000000000001"
  }
}