# Scans

## Get user scans

> Get all scans for the authenticated user with pagination and sorting

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 base URL"}],"security":[{"SessionToken":[]}],"components":{"securitySchemes":{"SessionToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Session token in Bearer format: Bearer <token>"}},"schemas":{"GetUserScansResponse":{"type":"object","required":["scans","pagination"],"properties":{"scans":{"type":"array","items":{"$ref":"#/components/schemas/ScanSchema"},"description":"List of user scans"},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}}},"ScanSchema":{"type":"object","required":["id","timestamp","status"],"properties":{"id":{"type":"string","description":"Unique scan identifier"},"lat":{"type":"number","nullable":true,"description":"Latitude coordinate"},"long":{"type":"number","nullable":true,"description":"Longitude coordinate"},"scanUrl":{"type":"string","nullable":true,"description":"URL to the scan file"},"timestamp":{"type":"string","format":"date-time","description":"Scan timestamp"},"status":{"type":"string","description":"Scan processing status"},"title":{"type":"string","nullable":true,"description":"Scan title"},"category":{"type":"string","nullable":true,"description":"Scan category"},"location":{"type":"string","nullable":true,"description":"Scan location description"},"fileType":{"type":"string","nullable":true,"description":"Scan file type"},"previewImageUrl":{"type":"string","nullable":true,"description":"URL to scan preview image"},"timeOfDay":{"type":"string","nullable":true,"description":"Time of day when scan was taken"},"weather":{"type":"string","nullable":true,"description":"Weather conditions during scan"}}},"PaginationInfo":{"type":"object","required":["total","page","limit","totalPages"],"properties":{"total":{"type":"integer","description":"Total number of items"},"page":{"type":"integer","description":"Current page number"},"limit":{"type":"integer","description":"Items per page"},"totalPages":{"type":"integer","description":"Total number of pages"}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"oneOf":[{"type":"string","description":"Error message"},{"type":"array","items":{"type":"object","required":["code","message","path"],"properties":{"code":{"type":"string","description":"Error code"},"message":{"type":"string","description":"Error message"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"description":"Error path"}}}}]}}}}},"paths":{"/user/scans":{"get":{"summary":"Get user scans","description":"Get all scans for the authenticated user with pagination and sorting","tags":["Scans"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1},"description":"Page number for pagination"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":10},"description":"Number of items per page"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Sort order by timestamp"}],"responses":{"200":{"description":"User scans retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserScansResponse"}}}},"401":{"description":"Unauthorized - invalid or missing session token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Get public scans

> Get all public scans with pagination

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 base URL"}],"security":[{"AppAPIKey":[]}],"components":{"securitySchemes":{"AppAPIKey":{"type":"apiKey","in":"header","name":"x-app-api-key","description":"App API key in format: <key>"}},"schemas":{"ScanSchema":{"type":"object","required":["id","timestamp","status"],"properties":{"id":{"type":"string","description":"Unique scan identifier"},"lat":{"type":"number","nullable":true,"description":"Latitude coordinate"},"long":{"type":"number","nullable":true,"description":"Longitude coordinate"},"scanUrl":{"type":"string","nullable":true,"description":"URL to the scan file"},"timestamp":{"type":"string","format":"date-time","description":"Scan timestamp"},"status":{"type":"string","description":"Scan processing status"},"title":{"type":"string","nullable":true,"description":"Scan title"},"category":{"type":"string","nullable":true,"description":"Scan category"},"location":{"type":"string","nullable":true,"description":"Scan location description"},"fileType":{"type":"string","nullable":true,"description":"Scan file type"},"previewImageUrl":{"type":"string","nullable":true,"description":"URL to scan preview image"},"timeOfDay":{"type":"string","nullable":true,"description":"Time of day when scan was taken"},"weather":{"type":"string","nullable":true,"description":"Weather conditions during scan"}}},"PaginationInfo":{"type":"object","required":["total","page","limit","totalPages"],"properties":{"total":{"type":"integer","description":"Total number of items"},"page":{"type":"integer","description":"Current page number"},"limit":{"type":"integer","description":"Items per page"},"totalPages":{"type":"integer","description":"Total number of pages"}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"oneOf":[{"type":"string","description":"Error message"},{"type":"array","items":{"type":"object","required":["code","message","path"],"properties":{"code":{"type":"string","description":"Error code"},"message":{"type":"string","description":"Error message"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"description":"Error path"}}}}]}}}}},"paths":{"/scans/public-scans":{"get":{"summary":"Get public scans","description":"Get all public scans with pagination","tags":["Scans"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1},"description":"Page number for pagination"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":10},"description":"Number of items per page"}],"responses":{"200":{"description":"Public scans retrieved successfully","content":{"application/json":{"schema":{"type":"object","required":["scans","pagination"],"properties":{"scans":{"type":"array","items":{"$ref":"#/components/schemas/ScanSchema"},"description":"List of public scans"},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}}}}}},"401":{"description":"Unauthorized - invalid or missing session token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.meshmap.com/api/core/scans.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
