get site.md

Get Site

Infra API · Sites

GET https://app.mk.io/api/v1/projects/{project_name}/infra/sites/{name}

Get a site by name. To learn more about sites, read Site Concept.

RBAC Capability Required: infra.site.get

Authentication

Path parameters

Name Type Required Description
project_name string Yes
name string Yes

Example request

curl -X GET "https://app.mk.io/api/v1/projects/{project_name}/infra/sites/{name}" \
  -H "Authorization: Bearer <token>"

Responses

200 — A single site

Example:

{
  "kind": "string",
  "metadata": {
    "created": "2024-01-01T00:00:00Z",
    "createdBy": "00000000-0000-0000-0000-000000000000",
    "createdByEmail": "string",
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "labels": {
      "label1": "value1",
      "label2": "value2"
    },
    "name": "string",
    "updated": "2024-01-01T00:00:00Z",
    "updatedBy": "00000000-0000-0000-0000-000000000000",
    "updatedByEmail": "string"
  },
  "spec": {
    "geolocation": {
      "coordinates": [
        0
      ]
    },
    "routes": [
      {
        "defaultTransport": {
          "cidr": "239.0.0.1/24",
          "type": "UDP"
        },
        "networkName": "internet"
      }
    ]
  },
  "status": {
    "locationDisplayName": "string",
    "locationName": "string",
    "owner": "User"
  }
}

400 — Bad Request

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

401 — Unauthorized

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

403 — Forbidden

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

404 — Not Found

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

429 — Too Many Requests

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

500 — Internal Server Error

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

Source spec: infrastructure-api · operationId: [get]_/api/v1/projects/{project_name}/infra/sites/{name}