# server

```graphql
query Server($input: ServerInput!) {
  server(input: $input) {
    id
    shortId
    userId
    environmentIds
    hostname
    status
    createdAt
    updatedAt
  }
}
```

Get a server. Requires project.read.

## Arguments

| Name                     | Type         | Required | Description |
| ------------------------ | ------------ | -------- | ----------- |
| `input`                  | ServerInput! | Yes      |             |
| `input.id`               | ID!          | Yes      |             |
| `input.projectReference` | String       |          |             |

## Variables

```json
{
  "input": {
    "id": "string"
  }
}
```

## Responses

| Status | Description                |
| ------ | -------------------------- |
| 200    | The Server in data.server. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query Server($input: ServerInput!) {\n  server(input: $input) {\n    id\n    shortId\n    userId\n    environmentIds\n    hostname\n    status\n    createdAt\n    updatedAt\n  }\n}",
  "variables": {
    "input": {
      "id": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "server": {
      "id": "string",
      "shortId": "string",
      "userId": "string",
      "environmentIds": [
        "string"
      ],
      "hostname": "string",
      "status": "string",
      "createdAt": "2026-01-01T00:00:00Z",
      "updatedAt": "2026-01-01T00:00:00Z"
    }
  }
}
```
