List Workspaces and Projects
List workspaces, projects, versions, and trained models using the REST API, Python SDK, and CLI.
About
The workspace endpoint returns metadata about a workspace and every project it contains - including each project's type, image and annotation counts, versions, and dataset splits. Use it to enumerate the projects your API key can access (for example, to discover project IDs before uploading data or exporting a version) and to drill into a project's generated versions, trained models, and dataset exports. The same data is available through the REST API, the Python SDK, and the CLI.
HTTP API
The /:workspace endpoint gives you information about your workspace and its Projects. This endpoint lists all Projects in the Workspace your API key authenticates against, and you can dive deeper into any project to find information about its generated versions, models, and dataset exports.
The endpoint URL is:
curl "https://api.roboflow.com/roboflow?api_key=$ROBOFLOW_API_KEY"Here is an example of a response from the endpoint:
{
"workspace": {
"name": "Roboflow",
"url": "roboflow",
"members": 7,
"projects": [
{
"id": "roboflow/chess-sample-4ckfl",
"type": "object-detection",
"name": "Chess Sample",
"created": 1630335544.592,
"updated": 1630335741.988,
"images": 12,
"unannotated": 3,
"annotation": "pieces",
"versions": 3,
"public": false,
"splits": {
"train": 9,
"test": 1,
"valid": 2
},
"classes": {
"white-queen": 7,
"black-queen": 4,
"black-bishop": 8,
"white-knight": 10,
"white-bishop": 11,
"black-knight": 11,
"black-rook": 10,
"white-pawn": 34,
"black-pawn": 37,
"white-rook": 10,
"black-king": 8,
"white-king": 8
}
}
]
}
}Get a Project and List Versions
You can retrieve information about a project using the following REST endpoint:
This endpoint returns a JSON response with the following structure:
List Project Models
You can retrieve all trained models in a project using the /:workspace/:project/models endpoint. This returns both version-trained models and standalone models (such as NAS children).
With Sign In With Roboflow (Getting Started), use Authorization: Bearer and scope model:infer instead of api_key:
List All Models
Filter by NAS Group
To list only the models from a specific NAS run, pass the group query parameter:
The group value is the NAS run identifier returned on each model object. If the group doesn't match any models, the endpoint returns an empty array.
Response
The endpoint returns a JSON array of model objects:
NAS Model Fields
Models produced by Neural Architecture Search include additional fields:
nasFamily
string
"child" for NAS-discovered models, null for the baseline
group
string
NAS run identifier, shared by all models in the same run
favorites
object
Map of user IDs to favorite status
recommended
boolean
Present and true when this model is the recommended pick for at least one metric/hardware combination
metrics.map5095
number
mAP@50-95 score (percentage)
metrics.f1
number
F1 score (percentage)
metrics.hardware
string
Hardware target the model was benchmarked on (e.g. "gpu", "jetson-orin-nano")
metrics.latency
number
Inference latency in milliseconds on the target hardware
metrics.paretoOptimalFor
string[]
Hardware targets for which this model sits on the Pareto frontier
These fields are only present on NAS models. Standard trained models are not affected.
Python SDK
Get a Workspace handle for the workspace your API key authenticates against:
Each Roboflow API key is scoped to a single workspace. To work against a different workspace, use a different API key (or, for public Universe workspaces, pass the workspace slug):
Workspace properties
The returned Workspace exposes:
workspace.url- the workspace's URL slug (e.g.my-workspace).workspace.name- the workspace's display name.workspace.list_projects()- projects in the workspace, as a list of dicts.workspace.projects()- same data aslist_projects()but returned as aProjectobject list (older alias).workspace.list_folders()- see Manage Folders.workspace.list_workflows()- see Manage Workflows.workspace.get_plan()andworkspace.get_usage()- see Workspace Plan and Usage.
List Projects and Versions
List Projects
Get the projects in your workspace:
Each entry includes the project's id (URL slug), display name, project type, image count, and a few other metadata fields.
To work against a public Universe workspace, pass its slug:
Get a Project
Or use the top-level shortcut:
List Versions
project.versions() returns Version objects you can call methods on directly (download, train, delete, etc.). For a lightweight dict response, use project.list_versions() or project.get_version_information().
Get a Version
Numeric - versions are 1-indexed.
CLI
List Workspaces
You can retrieve a list of all Workspaces of which you are a member with the CLI.
To list Workspaces with the CLI, use the following command:
This will return a list of Workspaces with their corresponding application links and Workspace IDs:
To get the output as JSON (for use in scripts or AI agents):
List Projects in a Workspace
To list projects in a workspace, use the following command:
If you have a default workspace configured, the -w flag is optional. Otherwise, specify it:
This will return a table of Projects:
To get the output as JSON:
Get a Project
To get detailed information about a project, use the following command:
You can use the resource shorthand - no need to specify the workspace separately:
This will return information about the project including its versions:
To get the full JSON response:
MCP Server
Connect your AI agent to the MCP Server and it can list what is in your workspace with these tools:
projects_list
List projects in the workspace.
projects_get
Get project detail including versions, classes, splits, and trained models.
Last updated
Was this helpful?