diff --git a/mlrun/db/httpd.py b/mlrun/db/httpd.py
index 2c89f1eeb..f447d4eb0 100644
--- a/mlrun/db/httpd.py
+++ b/mlrun/db/httpd.py
@@ -12,6 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 """mlrun database HTTP server"""
+from argparse import ArgumentParser
 import mimetypes
 from base64 import b64decode
 from distutils.util import strtobool
@@ -554,21 +555,21 @@ def del_run(project, uid):
 @app.route('/api/runs', methods=['GET'])
 @catch_err
 def list_runs():
-    name = request.args.get('name', '')
-    uid = request.args.get('uid', '')
-    project = request.args.get('project', 'default')
+    name = request.args.get('name')
+    uid = request.args.get('uid')
+    project = request.args.get('project')
     labels = request.args.getlist('label')
-    state = request.args.get('state', '')
+    state = request.args.get('state')
     sort = strtobool(request.args.get('sort', 'on'))
     iter = strtobool(request.args.get('iter', 'on'))
     last = int(request.args.get('last', '0'))
 
     runs = _db.list_runs(
-        name=name,
-        uid=uid,
-        project=project,
+        name=name or None,
+        uid=uid or None,
+        project=project or None,
         labels=labels,
-        state=state,
+        state=state or None,
         sort=sort,
         last=last,
         iter=iter,
@@ -603,6 +604,17 @@ def store_artifact(project, uid, key):
     return jsonify(ok=True)
 
 
+# curl http://localhost:8080/artifact/p1/tags
+@app.route('/api/artifact/<project>/tags', methods=['GET'])
+@catch_err
+def list_artifact_tags(project):
+    return jsonify(
+        ok=True,
+        project=project,
+        tags=_db.list_artifact_tags(project),
+    )
+
+
 # curl http://localhost:8080/artifact/p1/tag/key
 @app.route('/api/artifact/<project>/<tag>/<path:key>', methods=['GET'])
 @catch_err
@@ -626,9 +638,9 @@ def del_artifact(project, uid):
 @app.route('/api/artifacts', methods=['GET'])
 @catch_err
 def list_artifacts():
-    name = request.args.get('name', '')
-    project = request.args.get('project', 'default')
-    tag = request.args.get('tag', '')
+    name = request.args.get('name') or None
+    project = request.args.get('project', config.default_project)
+    tag = request.args.get('tag') or None
     labels = request.args.getlist('label')
 
     artifacts = _db.list_artifacts(name, project, tag, labels)
@@ -674,9 +686,9 @@ def get_function(project, name):
 @app.route('/api/funcs', methods=['GET'])
 @catch_err
 def list_functions():
-    name = request.args.get('name', '')
-    project = request.args.get('project', 'default')
-    tag = request.args.get('tag', '')
+    name = request.args.get('name') or None
+    project = request.args.get('project', config.default_project)
+    tag = request.args.get('tag') or None
     labels = request.args.getlist('label')
 
     out = _db.list_functions(name, project, tag, labels)
@@ -686,6 +698,26 @@ def list_functions():
     )
 
 
+# curl http://localhost:8080/projects
+@app.route('/api/projects', methods=['GET'])
+@catch_err
+def list_projects():
+    return jsonify(
+        ok=True,
+        project=_db.list_projects()
+    )
+
+
+# curl http://localhost:8080/schedules
+@app.route('/api/schedules', methods=['GET'])
+@catch_err
+def list_schedules():
+    return jsonify(
+        ok=True,
+        schedules=_db.list_schedules()
+    )
+
+
 @app.route('/api/healthz', methods=['GET'])
 def health():
     return 'OK\n'
@@ -724,6 +756,8 @@ def init_app():
 
 # Don't remove this function, it's an entry point in setup.py
 def main():
+    parser = ArgumentParser(description=__doc__)
+    parser.parse_args()
     app.run(
         host='0.0.0.0',
         port=config.httpdb.port,
diff --git a/mlrun/db/sqldb.py b/mlrun/db/sqldb.py
index f364742ab..fd5677ce3 100644
--- a/mlrun/db/sqldb.py
+++ b/mlrun/db/sqldb.py
@@ -13,8 +13,8 @@
 # limitations under the License.
 
 import pickle
-from datetime import datetime, timedelta
 import warnings
+from datetime import datetime, timedelta
 
 from sqlalchemy import (
     BLOB, TIMESTAMP, Column, ForeignKey, Integer, String, UniqueConstraint,
@@ -193,7 +193,7 @@ class SQLDB(RunDBInterface):
         self.session.commit()
         self._delete_empty_labels(Run.Label)
 
-    def read_run(self, uid, project='', iter=0):
+    def read_run(self, uid, project=None, iter=None):
         project = project or config.default_project
         run = self._get_run(uid, project, iter)
         if not run:
@@ -201,10 +201,11 @@ class SQLDB(RunDBInterface):
         return run.struct
 
     def list_runs(
-            self, name='', uid=None, project='', labels=None,
-            state='', sort=True, last=0, iter=False):
+            self, name=None, uid=None, project=None, labels=None,
+            state=None, sort=True, last=0, iter=None):
+        # FIXME: Run has no "name"
         project = project or config.default_project
-        query = self._find_runs(name, uid, project, labels, state)
+        query = self._find_runs(uid, project, labels, state)
         if sort:
             query = query.order_by(Run.start_time.desc())
         if last:
@@ -218,16 +219,17 @@ class SQLDB(RunDBInterface):
 
         return runs
 
-    def del_run(self, uid, project='', iter=0):
+    def del_run(self, uid, project=None, iter=None):
         project = project or config.default_project
         # We currently delete *all* iterations
         self._delete(Run, uid=uid, project=project)
 
     def del_runs(
-        self, name='', project='', labels=None,
-            state='', days_ago=0):
+        self, name=None, project=None, labels=None,
+            state=None, days_ago=0):
+        # FIXME: Run has no `name`
         project = project or config.default_project
-        query = self._find_runs(name, '', project, labels, state)
+        query = self._find_runs(None, project, labels, state)
         if days_ago:
             since = datetime.now() - timedelta(days=days_ago)
             query = query.filter(Run.start_time >= since)
@@ -272,13 +274,12 @@ class SQLDB(RunDBInterface):
             raise RunDBError(f'Artifact {key}:{tag}:{project} not found')
         return art.struct
 
-    def list_artifacts(
-            self, name='', project='', tag='', labels=None):
+    def list_artifacts(self, name=None, project=None, tag=None, labels=None):
         project = project or config.default_project
         arts = ArtifactList()
         arts.extend(
             obj.struct
-            for obj in self._find_artifacts(name, project, tag, labels)
+            for obj in self._find_artifacts(project, tag, labels)
         )
         return arts
 
@@ -290,7 +291,7 @@ class SQLDB(RunDBInterface):
     def del_artifacts(
             self, name='', project='', tag='', labels=None):
         project = project or config.default_project
-        for obj in self._find_artifacts(name, project, tag, labels):
+        for obj in self._find_artifacts(project, tag, labels):
             self.session.delete(obj)
         self.session.commit()
 
@@ -317,7 +318,7 @@ class SQLDB(RunDBInterface):
             return obj.struct
 
     def list_functions(
-            self, name, project='', tag='', labels=None):
+            self, name, project=None, tag=None, labels=None):
         project = project or config.default_project
         funcs = FunctionList()
         funcs.extend(
@@ -343,7 +344,7 @@ class SQLDB(RunDBInterface):
         return [s.struct for s in self.session.query(Schedule)]
 
     def _query(self, cls, **kw):
-        kw = {k: v for k, v in kw.items() if v}
+        kw = {k: v for k, v in kw.items() if v is not None}
         return self.session.query(cls).filter_by(**kw)
 
     def _get_function(self, name, project, tag):
@@ -371,18 +372,17 @@ class SQLDB(RunDBInterface):
             cls = obj.__class__.__name__
             raise RunDBError(f'duplicate {cls} - {err}')
 
-    def _find_runs(self, name, uid, project, labels, state):
+    def _find_runs(self, uid, project, labels, state):
         labels = label_set(labels)
-        query = self._query(
-            Run, name=name, uid=uid, project=project, state=state)
+        query = self._query(Run, uid=uid, project=project, state=state)
         if labels:
             query = query.join(Run.Label).filter(Run.Label.name.in_(labels))
         return query
 
-    def _find_artifacts(self, name, project, tag, labels):
+    def _find_artifacts(self, project, tag, labels):
         # FIXME tag = tag or 'latest'
         labels = label_set(labels)
-        query = self._query(Artifact, name=name, project=project, tag=tag)
+        query = self._query(Artifact, project=project, tag=tag)
         if labels:
             query = query.join(Run.Label).filter(Run.Label.name.in_(labels))
         return query

More HTTP API endpoints
@yaronha said:
> expose list_projects, list_artifact_tags, list_schedules in httpd/web-api (so the UI can access those)

diff --git a/tests/test_httpd.py b/tests/test_httpd.py
new file mode 100644
index 000000000..3efac28ac
--- /dev/null
+++ b/tests/test_httpd.py
@@ -0,0 +1,34 @@
+from mlrun.db import httpd
+import pytest
+from http import HTTPStatus
+
+
+@pytest.fixture
+def client():
+    old_testing = httpd.app.config['TESTING']
+    httpd.app.config['TESTING'] = True
+    with httpd.app.test_client() as client:
+        yield client
+
+    httpd.app.config['TESTING'] = old_testing
+
+
+def test_list_projects(client):
+    resp = client.get('/api/projects')
+    assert resp.status_code == HTTPStatus.OK, 'status'
+    assert resp.json['ok'], 'not ok'
+
+
+def test_list_artifact_tags(client):
+    project = 'p11'
+    resp = client.get(f'/api/artifact/{project}/tags')
+    assert resp.status_code == HTTPStatus.OK, 'status'
+    assert resp.json['ok'], 'not ok'
+    assert resp.json['project'] == project, 'project'
+
+
+def test_list_schedules(client):
+    resp = client.get(f'/api/schedules')
+    assert resp.status_code == HTTPStatus.OK, 'status'
+    assert resp.json['ok'], 'not ok'
+    assert 'schedules' in resp.json, 'no schedules'
diff --git a/tests/test_sqldb.py b/tests/test_sqldb.py
index 6639a92c4..bc93b5817 100644
--- a/tests/test_sqldb.py
+++ b/tests/test_sqldb.py
@@ -200,3 +200,11 @@ def test_schedules(db: sqldb.SQLDB):
     scheds = list(db.list_schedules())
     assert count == len(scheds), 'wrong number of schedules'
     assert set(range(count)) == set(s['i'] for s in scheds), 'bad scheds'
+
+
+def test_run_iter0(db: sqldb.SQLDB):
+    uid, prj = 'uid39', 'lemon'
+    run = new_run('s1', ['l1', 'l2'], x=1)
+    for i in range(7):
+        db.store_run(run, uid, prj, i)
+    db._get_run(uid, prj, 0)  # See issue 140

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc
3.7
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
aiohttp==3.8.6
aiosignal==1.3.1
anyio==3.7.1
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
async-timeout==4.0.3
asynctest==0.13.0
attrs==24.2.0
backcall==0.2.0
beautifulsoup4==4.13.3
bleach==6.0.0
boto3==1.33.13
botocore==1.33.13
cachetools==5.5.2
certifi @ file:///croot/certifi_1671487769961/work/certifi
cffi==1.15.1
charset-normalizer==3.4.1
click==8.1.8
cloudpickle==2.2.1
croniter==0.3.31
debugpy==1.7.0
decorator==5.1.1
defusedxml==0.7.1
Deprecated==1.2.18
docstring_parser==0.16
entrypoints==0.4
exceptiongroup==1.2.2
fastjsonschema==2.21.1
fire==0.7.0
Flask==2.2.5
frozenlist==1.3.3
gevent==1.4.0
gitdb==4.0.12
GitPython==3.1.44
google-api-core==2.24.2
google-auth==2.38.0
google-cloud-core==2.4.3
google-cloud-storage==3.1.0
google-crc32c==1.5.0
google-resumable-media==2.7.2
googleapis-common-protos==1.69.2
greenlet==3.1.1
gunicorn==19.9.0
idna==3.10
importlib-metadata==6.7.0
importlib-resources==5.12.0
iniconfig==2.0.0
ipykernel==6.16.2
ipython==7.34.0
ipython-genutils==0.2.0
itsdangerous==2.1.2
jedi==0.19.2
Jinja2==3.1.6
jmespath==1.0.1
jsonschema==4.17.3
jupyter-server==1.24.0
jupyter_client==7.4.9
jupyter_core==4.12.0
jupyterlab-pygments==0.2.2
kfp==1.4.0
kfp-pipeline-spec==0.1.16
kfp-server-api==1.8.5
kubernetes==11.0.0
MarkupSafe==2.1.5
matplotlib-inline==0.1.6
mistune==3.0.2
-e git+https://github.com/mlrun/mlrun.git@e0b13616cc8c53ea69978d4ff8520ab6244aa6a0#egg=mlrun
multidict==6.0.5
nbclassic==1.2.0
nbclient==0.7.4
nbconvert==7.6.0
nbformat==5.8.0
nest-asyncio==1.6.0
notebook==6.5.7
notebook_shim==0.2.4
nuclio-jupyter==0.10.4
nuclio_sdk==0.5.15
numpy==1.21.6
oauthlib==3.2.2
packaging==24.0
pandas==1.3.5
pandocfilters==1.5.1
parso==0.8.4
pexpect==4.9.0
pickleshare==0.7.5
pkgutil_resolve_name==1.3.10
pluggy==1.2.0
prometheus-client==0.17.1
prompt_toolkit==3.0.48
proto-plus==1.26.1
protobuf==3.20.3
psutil==7.0.0
ptyprocess==0.7.0
pyasn1==0.5.1
pyasn1-modules==0.3.0
pycparser==2.21
Pygments==2.17.2
pyrsistent==0.19.3
pytest==7.4.4
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==6.0.1
pyzmq==26.2.1
requests==2.31.0
requests-oauthlib==2.0.0
requests-toolbelt==1.0.0
rsa==4.9
s3transfer==0.8.2
Send2Trash==1.8.3
six==1.17.0
smmap==5.0.2
sniffio==1.3.1
soupsieve==2.4.1
SQLAlchemy==1.3.11
strip-hints==0.1.13
tabulate==0.8.3
termcolor==2.3.0
terminado==0.17.1
tinycss2==1.2.1
tomli==2.0.1
tornado==6.2
traitlets==5.9.0
typing_extensions==4.7.1
urllib3==1.26.20
wcwidth==0.2.13
webencodings==0.5.1
websocket-client==1.6.1
Werkzeug==2.2.3
wrapt==1.16.0
yarl==1.9.4
zipp==3.15.0

name: mlrun
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - aiohttp==3.8.6
      - aiosignal==1.3.1
      - anyio==3.7.1
      - argon2-cffi==23.1.0
      - argon2-cffi-bindings==21.2.0
      - async-timeout==4.0.3
      - asynctest==0.13.0
      - attrs==24.2.0
      - backcall==0.2.0
      - beautifulsoup4==4.13.3
      - bleach==6.0.0
      - boto3==1.33.13
      - botocore==1.33.13
      - cachetools==5.5.2
      - cffi==1.15.1
      - charset-normalizer==3.4.1
      - click==8.1.8
      - cloudpickle==2.2.1
      - croniter==0.3.31
      - debugpy==1.7.0
      - decorator==5.1.1
      - defusedxml==0.7.1
      - deprecated==1.2.18
      - docstring-parser==0.16
      - entrypoints==0.4
      - exceptiongroup==1.2.2
      - fastjsonschema==2.21.1
      - fire==0.7.0
      - flask==2.2.5
      - frozenlist==1.3.3
      - gevent==1.4.0
      - gitdb==4.0.12
      - gitpython==3.1.44
      - google-api-core==2.24.2
      - google-auth==2.38.0
      - google-cloud-core==2.4.3
      - google-cloud-storage==3.1.0
      - google-crc32c==1.5.0
      - google-resumable-media==2.7.2
      - googleapis-common-protos==1.69.2
      - greenlet==3.1.1
      - gunicorn==19.9.0
      - idna==3.10
      - importlib-metadata==6.7.0
      - importlib-resources==5.12.0
      - iniconfig==2.0.0
      - ipykernel==6.16.2
      - ipython==7.34.0
      - ipython-genutils==0.2.0
      - itsdangerous==2.1.2
      - jedi==0.19.2
      - jinja2==3.1.6
      - jmespath==1.0.1
      - jsonschema==4.17.3
      - jupyter-client==7.4.9
      - jupyter-core==4.12.0
      - jupyter-server==1.24.0
      - jupyterlab-pygments==0.2.2
      - kfp==1.4.0
      - kfp-pipeline-spec==0.1.16
      - kfp-server-api==1.8.5
      - kubernetes==11.0.0
      - markupsafe==2.1.5
      - matplotlib-inline==0.1.6
      - mistune==3.0.2
      - multidict==6.0.5
      - nbclassic==1.2.0
      - nbclient==0.7.4
      - nbconvert==7.6.0
      - nbformat==5.8.0
      - nest-asyncio==1.6.0
      - notebook==6.5.7
      - notebook-shim==0.2.4
      - nuclio-jupyter==0.10.4
      - nuclio-sdk==0.5.15
      - numpy==1.21.6
      - oauthlib==3.2.2
      - packaging==24.0
      - pandas==1.3.5
      - pandocfilters==1.5.1
      - parso==0.8.4
      - pexpect==4.9.0
      - pickleshare==0.7.5
      - pkgutil-resolve-name==1.3.10
      - pluggy==1.2.0
      - prometheus-client==0.17.1
      - prompt-toolkit==3.0.48
      - proto-plus==1.26.1
      - protobuf==3.20.3
      - psutil==7.0.0
      - ptyprocess==0.7.0
      - pyasn1==0.5.1
      - pyasn1-modules==0.3.0
      - pycparser==2.21
      - pygments==2.17.2
      - pyrsistent==0.19.3
      - pytest==7.4.4
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyyaml==6.0.1
      - pyzmq==26.2.1
      - requests==2.31.0
      - requests-oauthlib==2.0.0
      - requests-toolbelt==1.0.0
      - rsa==4.9
      - s3transfer==0.8.2
      - send2trash==1.8.3
      - six==1.17.0
      - smmap==5.0.2
      - sniffio==1.3.1
      - soupsieve==2.4.1
      - sqlalchemy==1.3.11
      - strip-hints==0.1.13
      - tabulate==0.8.3
      - termcolor==2.3.0
      - terminado==0.17.1
      - tinycss2==1.2.1
      - tomli==2.0.1
      - tornado==6.2
      - traitlets==5.9.0
      - typing-extensions==4.7.1
      - urllib3==1.26.20
      - wcwidth==0.2.13
      - webencodings==0.5.1
      - websocket-client==1.6.1
      - werkzeug==2.2.3
      - wrapt==1.16.0
      - yarl==1.9.4
      - zipp==3.15.0
prefix: /opt/conda/envs/mlrun

tests/test_httpd.py::test_list_projects tests/test_httpd.py::test_list_artifact_tags tests/test_httpd.py::test_list_schedules tests/test_sqldb.py::test_run_iter0
tests/test_sqldb.py::test_save_get_function tests/test_sqldb.py::test_list_functions tests/test_sqldb.py::test_log tests/test_sqldb.py::test_runs tests/test_sqldb.py::test_update_run tests/test_sqldb.py::test_artifacts tests/test_sqldb.py::test_list_artifact_tags tests/test_sqldb.py::test_list_projects tests/test_sqldb.py::test_list_runs tests/test_sqldb.py::test_schedules
mlrun/db/sqldb.py mlrun/db/httpd.py
mlrun/db/sqldb.py mlrun/db/httpd.py