---
updatedAt: 2025-05-19T20:07:39.000Z
agentTools:
  projectIndex: https://developer.ayyeka.com/llms.txt
---

# getSiteById site

Get Site by ID

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "RESTAPI Service",
    "description": "RESTful API",
    "version": "2.0"
  },
  "servers": [
    {
      "url": "https://restapi.ayyeka.com/v2.0"
    }
  ],
  "paths": {
    "/site/{siteId}": {
      "get": {
        "tags": [
          "site"
        ],
        "summary": "getSiteById site",
        "description": "Get Site by ID",
        "operationId": "site#getSiteById",
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "description": "ID of the site whose recent samples should be returned",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "ID of the site whose recent samples should be returned",
              "example": 123,
              "minimum": 1,
              "format": "int64"
            },
            "example": 123
          }
        ],
        "responses": {
          "200": {
            "description": "OK response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AkapiStoredSite"
                },
                "example": {
                  "account_organization_id": 13,
                  "creation_date": "1999-06-28T02:39:56Z",
                  "display_name": "Northern",
                  "id": 123,
                  "latitude": "Sit ratione quos sequi officia.",
                  "longitude": "Facere nisi neque qui.",
                  "status": "Active"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Site not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "429": {
            "description": "too_many_requests: Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "internal_server_error: System error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt_header_Authorization": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AkapiStoredSite": {
        "type": "object",
        "properties": {
          "account_organization_id": {
            "type": "integer",
            "description": "Account organization ID",
            "example": 13,
            "minimum": 1,
            "format": "int64"
          },
          "creation_date": {
            "type": "string",
            "description": "Creation date",
            "example": "1999-06-20T02:06:07Z",
            "format": "date-time"
          },
          "display_name": {
            "type": "string",
            "description": "Display name",
            "example": "Northern",
            "maxLength": 256
          },
          "id": {
            "type": "integer",
            "description": "ID is the unique id of the site.",
            "example": 123,
            "format": "int64"
          },
          "latitude": {
            "type": "string",
            "description": "Site's Latitude",
            "example": "Aliquid eum delectus et dicta."
          },
          "longitude": {
            "type": "string",
            "description": "Site's Longitude",
            "example": "Explicabo quo asperiores odio dolores voluptate molestias."
          },
          "status": {
            "type": "string",
            "description": "Status display name",
            "example": "Active",
            "maxLength": 64
          }
        },
        "example": {
          "account_organization_id": 13,
          "creation_date": "1996-03-26T07:17:58Z",
          "display_name": "Northern",
          "id": 123,
          "latitude": "Dolores ratione debitis.",
          "longitude": "Sunt atque sed quis occaecati et suscipit.",
          "status": "Active"
        },
        "required": [
          "id",
          "creation_date",
          "display_name",
          "status",
          "longitude",
          "latitude"
        ]
      },
      "Unauthorized": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Message of error",
            "example": "incorrect credentials"
          },
          "request_id": {
            "type": "string",
            "description": "Request ID",
            "example": "uGv69FKl"
          }
        },
        "description": "Unauthorized",
        "example": {
          "message": "incorrect credentials",
          "request_id": "uGv69FKl"
        },
        "required": [
          "request_id",
          "message"
        ]
      }
    },
    "securitySchemes": {
      "jwt_header_Authorization": {
        "type": "http",
        "description": "Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint.",
        "scheme": "bearer"
      }
    }
  },
  "tags": [
    {
      "name": "site"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```