# APIOperation

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/tools/openapi/utils/api_models/APIOperation)

A model for a single API operation.

## Signature

```python
APIOperation()
```

## Extends

- `BaseModel`

## Properties

- `operation_id`
- `description`
- `base_url`
- `path`
- `method`
- `properties`
- `request_body`
- `query_params`
- `path_params`
- `body_params`

## Methods

- [`from_openapi_url()`](https://reference.langchain.com/python/langchain-community/tools/openapi/utils/api_models/APIOperation/from_openapi_url)
- [`from_openapi_spec()`](https://reference.langchain.com/python/langchain-community/tools/openapi/utils/api_models/APIOperation/from_openapi_spec)
- [`ts_type_from_python()`](https://reference.langchain.com/python/langchain-community/tools/openapi/utils/api_models/APIOperation/ts_type_from_python)
- [`to_typescript()`](https://reference.langchain.com/python/langchain-community/tools/openapi/utils/api_models/APIOperation/to_typescript)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/tools/openapi/utils/api_models.py#L445)