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

# getSamplesGPSBatch samplegps

Get a Batch of New Samples GPS

# 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": {
    "/sample/gps/batch": {
      "get": {
        "tags": [
          "samplegps"
        ],
        "summary": "getSamplesGPSBatch samplegps",
        "description": "Get a Batch of New Samples GPS",
        "operationId": "samplegps#getSamplesGPSBatch",
        "parameters": [
          {
            "name": "enableAck",
            "in": "query",
            "description": "If set to false, then the internal last delivered sample GPS id value is set to the last sample GPS ID in the batch sent in response to this call. If set to true, then the internal last delivered sample GPS id remains untouched by this call. We recommend setting this parameter to 'true' and calling ackSamplesGPSBatch to update the last delivered sample GPS id field",
            "allowEmptyValue": true,
            "schema": {
              "type": "boolean",
              "description": "If set to false, then the internal last delivered sample GPS id value is set to the last sample GPS ID in the batch sent in response to this call. If set to true, then the internal last delivered sample GPS id remains untouched by this call. We recommend setting this parameter to 'true' and calling ackSamplesGPSBatch to update the last delivered sample GPS id field",
              "default": true,
              "example": true
            },
            "example": false
          },
          {
            "name": "sampleID",
            "in": "query",
            "description": "Specifies to send samples GPS with an ID number strictly higher than the sampleID. For example, if the sampleID value is 1234, the response could include samples GPS with IDs such as [1235, 1240, 1241]",
            "allowEmptyValue": true,
            "schema": {
              "type": "integer",
              "description": "Specifies to send samples GPS with an ID number strictly higher than the sampleID. For example, if the sampleID value is 1234, the response could include samples GPS with IDs such as [1235, 1240, 1241]",
              "example": 123,
              "minimum": 1,
              "format": "int64"
            },
            "example": 123
          },
          {
            "name": "backfillHours",
            "in": "query",
            "description": "Specifies to send samples GPS starting this many hours ago. For example, if the backfillHours value is 24, this is a request to provide all samples GPS of the past 24 hours",
            "allowEmptyValue": true,
            "schema": {
              "type": "integer",
              "description": "Specifies to send samples GPS starting this many hours ago. For example, if the backfillHours value is 24, this is a request to provide all samples GPS of the past 24 hours",
              "example": 24
            },
            "example": 24
          }
        ],
        "responses": {
          "200": {
            "description": "OK response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoredSampleGPSBatch"
                },
                "example": {
                  "hasMore": true,
                  "samples": [
                    {
                      "gps": {
                        "altitude": 745.2,
                        "date": "2008-12-29T06:49:51Z",
                        "dilution_of_precision": 2.2,
                        "latitude": 31.771959,
                        "longitude": 35.217018,
                        "number_of_satellites": 4
                      },
                      "id": 123,
                      "stream_id": 24
                    },
                    {
                      "gps": {
                        "altitude": 745.2,
                        "date": "2008-12-29T06:49:51Z",
                        "dilution_of_precision": 2.2,
                        "latitude": 31.771959,
                        "longitude": 35.217018,
                        "number_of_satellites": 4
                      },
                      "id": 123,
                      "stream_id": 24
                    }
                  ]
                }
              }
            }
          },
          "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: SampleGPS 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": {
      "AkapiStoredSampleGps": {
        "type": "object",
        "properties": {
          "gps": {
            "$ref": "#/components/schemas/GPS"
          },
          "id": {
            "type": "integer",
            "description": "ID is the unique id of the sample GPS.",
            "example": 123,
            "format": "int64"
          },
          "stream_id": {
            "type": "integer",
            "description": "Stream ID",
            "example": 24,
            "minimum": 1,
            "format": "int64"
          }
        },
        "example": {
          "gps": {
            "altitude": 745.2,
            "date": "2006-12-24T14:09:24Z",
            "dilution_of_precision": 2.2,
            "latitude": 31.771959,
            "longitude": 35.217018,
            "number_of_satellites": 4
          },
          "id": 123,
          "stream_id": 24
        },
        "required": [
          "id",
          "stream_id",
          "gps"
        ]
      },
      "GPS": {
        "type": "object",
        "properties": {
          "altitude": {
            "type": "number",
            "description": "Altitude",
            "example": 745.2,
            "format": "float"
          },
          "date": {
            "type": "string",
            "description": "Date of sample",
            "example": "1991-01-17T17:35:25Z",
            "format": "date-time"
          },
          "dilution_of_precision": {
            "type": "number",
            "description": "Dilution of precision",
            "example": 2.2,
            "format": "float"
          },
          "latitude": {
            "type": "number",
            "description": "Latitude",
            "example": 31.771959,
            "minimum": -90,
            "maximum": 90
          },
          "longitude": {
            "type": "number",
            "description": "Longitude",
            "example": 35.217018,
            "minimum": -180,
            "maximum": 180
          },
          "number_of_satellites": {
            "type": "integer",
            "description": "Number of satellites",
            "example": 4
          }
        },
        "example": {
          "altitude": 745.2,
          "date": "2006-05-30T15:23:20Z",
          "dilution_of_precision": 2.2,
          "latitude": 31.771959,
          "longitude": 35.217018,
          "number_of_satellites": 4
        },
        "required": [
          "latitude",
          "longitude",
          "altitude",
          "dilution_of_precision",
          "number_of_satellites",
          "date"
        ]
      },
      "StoredSampleGPSBatch": {
        "type": "object",
        "properties": {
          "hasMore": {
            "type": "boolean",
            "description": "The value is set to true if there is more samples GPS to retrieve",
            "example": false
          },
          "samples": {
            "$ref": "#/components/schemas/StoredSampleGPSCollection"
          }
        },
        "example": {
          "hasMore": true,
          "samples": [
            {
              "gps": {
                "altitude": 745.2,
                "date": "2008-12-29T06:49:51Z",
                "dilution_of_precision": 2.2,
                "latitude": 31.771959,
                "longitude": 35.217018,
                "number_of_satellites": 4
              },
              "id": 123,
              "stream_id": 24
            },
            {
              "gps": {
                "altitude": 745.2,
                "date": "2008-12-29T06:49:51Z",
                "dilution_of_precision": 2.2,
                "latitude": 31.771959,
                "longitude": 35.217018,
                "number_of_satellites": 4
              },
              "id": 123,
              "stream_id": 24
            }
          ]
        },
        "required": [
          "hasMore",
          "samples"
        ]
      },
      "StoredSampleGPSCollection": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/AkapiStoredSampleGps"
        },
        "example": [
          {
            "gps": {
              "altitude": 745.2,
              "date": "2008-12-29T06:49:51Z",
              "dilution_of_precision": 2.2,
              "latitude": 31.771959,
              "longitude": 35.217018,
              "number_of_satellites": 4
            },
            "id": 123,
            "stream_id": 24
          },
          {
            "gps": {
              "altitude": 745.2,
              "date": "2008-12-29T06:49:51Z",
              "dilution_of_precision": 2.2,
              "latitude": 31.771959,
              "longitude": 35.217018,
              "number_of_satellites": 4
            },
            "id": 123,
            "stream_id": 24
          },
          {
            "gps": {
              "altitude": 745.2,
              "date": "2008-12-29T06:49:51Z",
              "dilution_of_precision": 2.2,
              "latitude": 31.771959,
              "longitude": 35.217018,
              "number_of_satellites": 4
            },
            "id": 123,
            "stream_id": 24
          },
          {
            "gps": {
              "altitude": 745.2,
              "date": "2008-12-29T06:49:51Z",
              "dilution_of_precision": 2.2,
              "latitude": 31.771959,
              "longitude": 35.217018,
              "number_of_satellites": 4
            },
            "id": 123,
            "stream_id": 24
          }
        ]
      },
      "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": "samplegps"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```