> 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/sesar-codes.md).

# SESAR Codes

## SESAR codes by sample permission

> Returns SESAR codes on which the authenticated user may perform the selected sample-related action.\
> \
> \*\*Query: \`permission\` (required)\*\* — one of the enum values below. \`read\_sample\` is an alias for viewing samples (same as \`view\_sample\`). Short forms (\`view\`, \`read\`, \`create\`, \`edit\`, \`deactivate\`) are equivalent to the corresponding \`\*\_sample\` names where applicable.

```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":{"SesarCodeList":{"type":"object","properties":{"sesar_user":{"type":"string","nullable":true,"readOnly":true},"sesar_user_display":{"type":"string","readOnly":true},"team":{"type":"string","readOnly":true},"sesar_code":{"type":"string","readOnly":true},"doi_prefix":{"type":"string","readOnly":true},"igsn_count":{"type":"integer","readOnly":true,"nullable":true}},"required":["doi_prefix","igsn_count","sesar_code","sesar_user","sesar_user_display","team"]}}},"paths":{"/api/sesar-codes/by-permission/":{"get":{"operationId":"sesar_codes_by_permission_list","description":"Returns SESAR codes on which the authenticated user may perform the selected sample-related action.\n\n**Query: `permission` (required)** — one of the enum values below. `read_sample` is an alias for viewing samples (same as `view_sample`). Short forms (`view`, `read`, `create`, `edit`, `deactivate`) are equivalent to the corresponding `*_sample` names where applicable.","summary":"SESAR codes by sample permission","parameters":[{"in":"query","name":"permission","schema":{"type":"string","enum":["create","create_sample","deactivate","deactivate_sample","edit","edit_sample","read","read_sample","view","view_sample"]},"description":"Sample action key; matched case-insensitively to a permission codename for filtering SESAR codes.","required":true}],"tags":["SESAR codes"],"responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SesarCodeList"}}}},"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 dynamically by asking a question.

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

```
GET https://docs.geosamples.org/api/sesar-codes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
