# Get AGOL GeoJSON

Endpoint: GET /gis/agol/geojson/{serviceId}
Version: v2
Security: API-Key, Client-Code

## Security:

  - `API-Key` (unknown)
    apiKey in header Authorization

  - `Client-Code` (unknown)
    apiKey in header Client-Code

## Path parameters:

  - `serviceId` (string)

## Query parameters:

  - `layerId` (integer)

## Response 200:

  - `200` (unknown)
    Success.
Returns a GeoJSON object following the [RFC 7946](https://datatracker.ietf.org/doc/html/rfc7946) specification.

## Response 200 fields (application/json):

  - `type` (string, required)
    Enum: "FeatureCollection", "GeometryCollection"

  - `features` (array, required)

  - `features.type` (string, required)
    Enum: "Feature"

  - `features.geometry` (any)

  - `features.geometry.type` (string, required)
    Enum: "Point"

  - `features.geometry.coordinates` (array)

  - `features.geometry.type` (string, required)
    Enum: "MultiPoint"

  - `features.geometry.type` (string, required)
    Enum: "LineString"

  - `features.geometry.type` (string, required)
    Enum: "MultiLineString"

  - `features.geometry.type` (string, required)
    Enum: "Polygon"

  - `features.geometry.type` (string, required)
    Enum: "MultiPolygon"

  - `features.properties` (object | null)

  - `features.id` (string | number)

  - `properties` (object | null)

  - `geometries` (array)

## Response 4xx:

  - `4xx` (unknown)
    It happens when there is a request error.
The code will specify the type of error and the body of the response will contain a message indicating the reason for the error.

## Response 4xx fields (application/json):

  - `error` (string)

