> ## Documentation Index
> Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Application Versions

> SDK methods to list and inspect deployment versions for a TrueFoundry application.

## Methods

<Accordion title="list">
  Fetch all deployments for a given application ID with optional filters such as deployment ID or version. Supports pagination.

  #### Parameters

  <ParamField body="id" type="str" required>
    Id of the application
  </ParamField>

  <ParamField body="limit" type="typing.Optional[int]">
    Number of items per page
  </ParamField>

  <ParamField body="offset" type="typing.Optional[int]">
    Number of items to skip
  </ParamField>

  <ParamField body="version" type="typing.Optional[str]">
    Deployment version. Filter deployments by version.
  </ParamField>

  <ParamField body="deployment_id" type="typing.Optional[str]">
    Deployment ID. Filter deployments by a specific ID.
  </ParamField>

  #### Returns

  <ResponseField name="SyncPager[Deployment, ListApplicationDeploymentsResponse]" type="SyncPager[Deployment, ListApplicationDeploymentsResponse]">
    [🔗 ListApplicationDeploymentsResponse](/docs/truefoundry_sdk/types#listapplicationdeploymentsresponse)

    List of deployments matching the provided filters.
  </ResponseField>

  #### Usage

  ```python lines theme={"dark"}
  from truefoundry import TrueFoundry

  client = TrueFoundry(
      api_key="YOUR_API_KEY",
      base_url="https://yourhost.com/path/to/api",
  )

  client.application_versions.list(
      id="id_value",
      limit=10,
      offset=10,
      version="value",
      deployment_id="value",
  )

  # Iterate through results
  for item in response:
      print(item.name)

  # Or paginate page by page
  for page in response.iter_pages():
      for item in page:
          print(item.name)
  ```
</Accordion>

<Accordion title="get">
  Get Deployment associated with the provided application ID and deployment ID.

  #### Parameters

  <ParamField body="id" type="str" required>
    Application id of the application
  </ParamField>

  <ParamField body="deployment_id" type="str" required>
    Deployment id of the deployment
  </ParamField>

  #### Returns

  <ResponseField name="GetApplicationDeploymentResponse" type="GetApplicationDeploymentResponse">
    [🔗 GetApplicationDeploymentResponse](/docs/truefoundry_sdk/types#getapplicationdeploymentresponse)

    Deployment details returned successfully.
  </ResponseField>

  #### Usage

  ```python lines theme={"dark"}
  from truefoundry import TrueFoundry

  client = TrueFoundry(
      api_key="YOUR_API_KEY",
      base_url="https://yourhost.com/path/to/api",
  )

  client.application_versions.get(
      id="id_value",
      deployment_id="value",
  )
  ```
</Accordion>
