> For the complete documentation index, see [llms.txt](https://docs.geosamples.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.geosamples.org/api/archives.md).

# Archives

## Search archives

> Returns up to \`limit\` archives whose label, alt label, or city matches \`query\` (case-insensitive substring). When \`query\` is omitted, returns archives ordered by label.

```json
{"openapi":"3.0.3","info":{"title":"SESAR API","version":"1.0.0"},"security":[{"tokenAuth":[]},{"jwtAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""},"jwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ArchiveListSuccess":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Archive"},"description":"Matching archives (up to `limit`)."}},"required":["data"]},"Archive":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"label":{"type":"string","maxLength":200},"alt_label":{"type":"string","nullable":true,"maxLength":200},"description":{"type":"string","nullable":true},"country":{"type":"string","readOnly":true},"country_subdivision":{"type":"string","nullable":true,"maxLength":255},"city":{"type":"string","nullable":true,"maxLength":255},"url":{"type":"string","nullable":true,"maxLength":200},"uri":{"type":"string","nullable":true,"maxLength":36},"parent_institution":{"allOf":[{"$ref":"#/components/schemas/Institution"}],"readOnly":true}},"required":["country","id","label","parent_institution"]},"Institution":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"institution_type":{"type":"string","readOnly":true},"label":{"type":"string","maxLength":200},"alt_label":{"type":"string","nullable":true,"maxLength":200},"description":{"type":"string","nullable":true},"country":{"type":"string","readOnly":true},"country_subdivision":{"type":"string","nullable":true,"maxLength":255},"city":{"type":"string","nullable":true,"maxLength":255},"ror":{"type":"string","nullable":true,"maxLength":25},"parent_institutions":{"type":"string","readOnly":true},"can_edit":{"type":"string","readOnly":true},"created_by":{"type":"integer","nullable":true}},"required":["can_edit","country","id","institution_type","label","parent_institutions"]}}},"paths":{"/api/archives/":{"get":{"operationId":"archives_retrieve","description":"Returns up to `limit` archives whose label, alt label, or city matches `query` (case-insensitive substring). When `query` is omitted, returns archives ordered by label.","summary":"Search archives","parameters":[{"in":"query","name":"limit","schema":{"type":"integer"},"description":"Maximum rows to return (clamped between 1 and 100, default 10)."},{"in":"query","name":"query","schema":{"type":"string"},"description":"Case-insensitive substring filter on label, alt label, or city."}],"tags":["Archives"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveListSuccess"}}},"description":""}}}}}}
```

## Create archive

> Creates a new archive record for sample registration and batch defaults.

```json
{"openapi":"3.0.3","info":{"title":"SESAR API","version":"1.0.0"},"security":[{"tokenAuth":[]},{"jwtAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""},"jwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ArchiveWrite":{"type":"object","properties":{"label":{"type":"string","maxLength":200},"alt_label":{"type":"string","nullable":true,"maxLength":200},"description":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"country_subdivision":{"type":"string","nullable":true,"maxLength":255},"city":{"type":"string","nullable":true,"maxLength":255},"url":{"type":"string","nullable":true,"maxLength":200},"uri":{"type":"string","nullable":true,"maxLength":36},"parent_institution":{"type":"integer","nullable":true},"created_by":{"type":"integer","readOnly":true,"nullable":true}},"required":["created_by","label"]},"ArchiveCreateSuccess":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Archive"}},"required":["data"]},"Archive":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"label":{"type":"string","maxLength":200},"alt_label":{"type":"string","nullable":true,"maxLength":200},"description":{"type":"string","nullable":true},"country":{"type":"string","readOnly":true},"country_subdivision":{"type":"string","nullable":true,"maxLength":255},"city":{"type":"string","nullable":true,"maxLength":255},"url":{"type":"string","nullable":true,"maxLength":200},"uri":{"type":"string","nullable":true,"maxLength":36},"parent_institution":{"allOf":[{"$ref":"#/components/schemas/Institution"}],"readOnly":true}},"required":["country","id","label","parent_institution"]},"Institution":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"institution_type":{"type":"string","readOnly":true},"label":{"type":"string","maxLength":200},"alt_label":{"type":"string","nullable":true,"maxLength":200},"description":{"type":"string","nullable":true},"country":{"type":"string","readOnly":true},"country_subdivision":{"type":"string","nullable":true,"maxLength":255},"city":{"type":"string","nullable":true,"maxLength":255},"ror":{"type":"string","nullable":true,"maxLength":25},"parent_institutions":{"type":"string","readOnly":true},"can_edit":{"type":"string","readOnly":true},"created_by":{"type":"integer","nullable":true}},"required":["can_edit","country","id","institution_type","label","parent_institutions"]}}},"paths":{"/api/archives/":{"post":{"operationId":"archives_create","description":"Creates a new archive record for sample registration and batch defaults.","summary":"Create archive","tags":["Archives"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveWrite"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/ArchiveWrite"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ArchiveWrite"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveCreateSuccess"}}},"description":""}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.geosamples.org/api/archives.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
