---
title: "Discover workloads from a source"
method: POST
path: "/imports/discover"
tags: ["Imports"]
---

# Discover workloads from a source

`POST /imports/discover`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/imports/discover`
- Auth: HTTP bearer

## Request body

- DiscoverRequest: Request to discover workloads
  - `credentials` ImportCredentials: Platform credentials (required for cloud platforms like Vercel, Railway)
    - `base_url` string, nullable: Base URL override (for self-hosted platforms like Coolify, Dokploy) Example: `https://coolify.example.com`
    - `extra` object: Additional platform-specific parameters
    - `team_id` string, nullable: Team or organization ID (for platforms with team scoping like Vercel)
    - `token` string, nullable: API token / bearer token for the source platform
  - `selector` ImportSelector: Optional selector to filter workloads
    - `label_filter` object, nullable: Filter by labels/tags
    - `limit` integer, nullable: Limit number of results
    - `name_pattern` string, nullable: Filter by name pattern (glob/regex)
    - `status_filter` string[], nullable: Filter by status (running, stopped, deployed, etc.)
    - `workload_type_filter` string[], nullable: Filter by workload type (container, function, static-site, etc.)
  - `source` 'docker' | 'coolify' | 'dokploy' | 'vercel' | 'netlify' | 'railway' | 'render' | 'fly' | 'kubernetes' | 'caprover' | 'portainer' | 'kamal' | 'custom', required: Source to discover from

## Response `200`

List of discovered workloads

- DiscoverResponse: Response with discovered workloads
  - `workloads` WorkloadDescriptor[], required: Discovered workloads
    - `created_at` string, date-time, nullable: Creation timestamp
    - `id` string, required: Unique ID in source system
    - `image` string, nullable: Image/build reference (for containers)
    - `labels` object, required: Labels/tags from source system
    - `name` string, nullable: Workload name (if any)
    - `status` 'running' | 'paused' | 'stopped' | 'exited' | 'failed' | 'deployed' | 'building' | 'unknown', required: Current status
    - `workload_type` 'container' | 'function' | 'static-site' | 'server-side-app' | 'worker' | 'database' | 'message-queue' | 'cache' | 'cron-job' | 'other', required: Workload type (container, function, static-site, etc.)

## Other responses

- `400`: Invalid request
- `401`: Unauthorized
- `403`: Insufficient permissions

## Changes

- **2026-07-27** `1b060c0a4ba3`: 4 info
  - added the new `caprover` enum value to the request property `source`
  - added the new `kamal` enum value to the request property `source`
  - added the new `kubernetes` enum value to the request property `source`
  - added the new `portainer` enum value to the request property `source`
- **2026-04-25** `774be20905f2`: 1 warning, 1 info
  - added the new `cron-job` enum value to the `workloads/items/workload_type` response property for the response status `200`
  - added the new optional request property `credentials`

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/imports/discover/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
