Skip to content

Conversation

baptiste-olivier
Copy link
Collaborator

@baptiste-olivier baptiste-olivier commented Sep 29, 2025

Assets

Legacy method Proposed call Notes
assets kili.assets.list Keep generator via optional as_generator
count_assets kili.assets.count
append_many_to_dataset kili.assets.create Creates assets in bulk
delete_many_from_dataset kili.assets.delete Supports bulk deletion
assign_assets_to_labelers kili.assets.workflow.assign
send_back_to_queue kili.assets.workflow.invalidate Consider rename to return_to_queue
add_to_review kili.assets.workflow.move_to_next_step Maybe alias submit_for_review
kili.assets.workflow.update_priorities
update_properties_in_assets Removed
kili.assets.update_processing_parameters The only last case where we needed to update_properties_in_assets
change_asset_external_ids kili.assets.update_external_ids
add_metadata kili.assets.add_metadata
set_metadata kili.assets.set_metadata

Storages

Legacy method Proposed call Notes
cloud_storage_connections kili.storages.connections.list
add_cloud_storage_connection kili.storages.connections.create
synchronize_cloud_storage_connection kili.storages.connections.sync
cloud_storage_integrations kili.storages.integrations.list
count_cloud_storage_integrations kili.storages.integrations.count
create_cloud_storage_integration kili.storages.integrations.create
update_cloud_storage_integration kili.storages.integrations.update
delete_cloud_storage_integration kili.storages.integrations.delete

Issues

Legacy method Proposed call Notes
issues kili.issues.list
count_issues kili.issues.count
create_issues kili.issues.create
update_issue_status kili.issues.cancel
update_issue_status kili.issues.open
update_issue_status kili.issues.solve

Label Subscriptions

Legacy method Proposed call Notes
label_created_or_updated kili.labels.events.on_change Decide on subscription API

Labels

Legacy method Proposed call Notes
labels kili.labels.list
count_labels kili.labels.count
append_labels kili.labels.create
append_labels_from_geojson_files kili.labels.import_from_geojson
append_labels_from_shapefiles kili.labels.import_from_shapefile
delete_labels kili.labels.delete
export_labels kili.labels.export
create_predictions kili.labels.create_predictions Do we need this ?
predictions Removed, use kili.labels.list
inferences kili.labels.inferences.list Removed, use kili.labels.list
create_honeypot kili.labels.promote_to_ground_truth

Notifications

Not sure for notification what we want to do. Remove it, or let user push notifications to other notifications (plugin case ?)

Legacy method Proposed call Notes
notifications kili.notifications.list
count_notifications kili.notifications.count
create_notification kili.notifications.create
update_properties_in_notification kili.notifications.update

Organizations

Legacy method Proposed call Notes
organizations kili.organizations.list
count_organizations kili.organizations.count
organization_metrics kili.organizations.metrics

Plugins

Legacy method Proposed call Notes
list_plugins kili.plugins.list Confirm scope vs domain API
get_plugin_status kili.plugins.status
get_plugin_logs kili.plugins.logs
get_plugin_build_errors kili.plugins.build_errors
activate_plugin_on_project kili.plugins.activate
deactivate_plugin_on_project kili.plugins.deactivate
create_webhook kili.plugins.webhooks.create
update_webhook kili.plugins.webhooks.update
upload_plugin kili.plugins.create
update_plugin kili.plugins.update
delete_plugin kili.plugins.delete

Project → Users

Legacy method Proposed call Notes
project_users kili.projects.users.list
count_project_users kili.projects.users.count

Project → Versions

Legacy method Proposed call Notes
project_version kili.projects.versions.get Return single version
count_project_versions kili.projects.versions.count
update_properties_in_project_version kili.projects.versions.update shouldn't we remove this ?

Projects

Legacy method Proposed call Notes
projects kili.projects.list
count_projects kili.projects.count
create_project kili.projects.create
update_properties_in_project kili.projects.update A lot of propertie here, let a generic vast method
archive_project kili.projects.archive
unarchive_project kili.projects.unarchive
copy_project kili.projects.copy
delete_project kili.projects.delete
update_project_anonymization Merged into kili.projects.update
append_to_roles kili.projects.users.create
delete_from_roles kili.projects.users.remove
update_properties_in_role kili.projects.users.update
update_project_workflow kili.projects.workflow.update
get_steps kili.projects.workflow.steps.list

Tags

Legacy method Proposed call Notes
tags kili.tags.list
create_tag kili.tags.create
update_tag kili.tags.update
delete_tag kili.tags.delete
tag_project kili.tags.assign Alias to new name
untag_project kili.tags.unassign

Users

Legacy method Proposed call Notes
users kili.users.list
count_users kili.users.count
create_user kili.users.create
update_properties_in_user kili.users.update
update_password kili.users.update_password Security-sensitive

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@baptiste-olivier baptiste-olivier force-pushed the feature/lab-3973-aa-sdk-user-i-see-an-easier-way-to-interact branch 5 times, most recently from 4066b49 to e278d87 Compare September 30, 2025 16:02
- Add new domain_api module with base namespace system
- Add lazy loading mechanism for domain namespaces
- Update client to support both legacy and domain API modes
@baptiste-olivier baptiste-olivier force-pushed the feature/lab-3973-aa-sdk-user-i-see-an-easier-way-to-interact branch from e278d87 to 4f42437 Compare October 1, 2025 07:16
@baptiste-olivier baptiste-olivier force-pushed the feature/lab-3973-aa-sdk-user-i-see-an-easier-way-to-interact branch from 9a395ec to eb94dd6 Compare October 1, 2025 11:59
@baptiste-olivier
Copy link
Collaborator Author

I'll remove the new recipes once the review is complete

@baptiste-olivier baptiste-olivier force-pushed the feature/lab-3973-aa-sdk-user-i-see-an-easier-way-to-interact branch from a7f7e30 to ed37edc Compare October 20, 2025 12:25
@RuellePaul
Copy link
Contributor

RuellePaul commented Oct 20, 2025

For an asset in Labeling - Done, the first call pass but the second one never ends :

kili.assets.workflow.invalidate(asset_ids=['cmguti58n002aht0w21gm4hm3'])
kili.assets.workflow.invalidate(project_id="cmguti5810026ht0w081a8fdy", external_ids=["Drone_1.tif"])

@RuellePaul
Copy link
Contributor

kili.assets.list returns generator by default, not a list :

assets = kili_v1.assets(project_id="cmgusorfy0002yx0whfft5s2f")
print(type(assets))
<class 'list'>

assets = kili.assets.list(project_id="cmgusorfy0002yx0whfft5s2f")
print(type(assets))
<class 'generator'>

is that intentional ?

@RuellePaul
Copy link
Contributor

This leads to an error :

issues = kili_v1.issues(project_id="cmgusorfy0002yx0whfft5s2f", asset_id="cmgusorgj0007yx0w23fe74f7")

issues = kili.issues(project_id="cmgusorfy0002yx0whfft5s2f", asset_id="cmgusorgj0007yx0w23fe74f7")
Traceback (most recent call last):
  File "/Users/paulruelle/kili-python-sdk/scripts/add_or_set_metadata.py", line 20, in <module>
    issues = kili.issues(project_id="cmgusorfy0002yx0whfft5s2f", asset_id="cmgusorgj0007yx0w23fe74f7")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'IssuesNamespace' object is not callable

I think this'll happen a lot when client will try the domain SDK for the first time.

Maybe we can have a better error message? Something like :

TypeError: 'kili.issues' object is not callable - try `kili.issues.list` or `kili.issues.create` instead 

@RuellePaul
Copy link
Contributor

RuellePaul commented Oct 20, 2025

BTW we still have very long & indigestible error messages when there is a GraphQLError error involved

Traceback (most recent call last):

File "/Users/paulruelle/kili-python-sdk/src/kili/core/graphql/graphql_client.py", line 265, in execute
return self._execute_with_retries(document, variables, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/paulruelle/kili-python-sdk/.venv/lib/python3.12/site-packages/tenacity/init.py", line 336, in wrapped_f
return copy(f, *args, **kw)
^^^^^^^^^^^^^^^^^^^^
File "/Users/paulruelle/kili-python-sdk/.venv/lib/python3.12/site-packages/tenacity/init.py", line 475, in call
do = self.iter(retry_state=retry_state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/paulruelle/kili-python-sdk/.venv/lib/python3.12/site-packages/tenacity/init.py", line 376, in iter
result = action(retry_state)
^^^^^^^^^^^^^^^^^^^
File "/Users/paulruelle/kili-python-sdk/.venv/lib/python3.12/site-packages/tenacity/init.py", line 398, in
self._add_action_func(lambda rs: rs.outcome.result())
^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/Users/paulruelle/kili-python-sdk/.venv/lib/python3.12/site-packages/tenacity/init.py", line 478, in call
result = fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/Users/paulruelle/kili-python-sdk/src/kili/core/graphql/graphql_client.py", line 313, in _execute_with_retries
return self._raw_execute(document, variables, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/paulruelle/kili-python-sdk/src/kili/core/graphql/graphql_client.py", line 322, in _raw_execute
res = self._gql_client.execute(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/paulruelle/kili-python-sdk/.venv/lib/python3.12/site-packages/gql/client.py", line 484, in execute
return self.execute_sync(
^^^^^^^^^^^^^^^^^^
File "/Users/paulruelle/kili-python-sdk/.venv/lib/python3.12/site-packages/gql/client.py", line 248, in execute_sync
return session.execute(
^^^^^^^^^^^^^^^^
File "/Users/paulruelle/kili-python-sdk/.venv/lib/python3.12/site-packages/gql/client.py", line 1028, in execute
raise TransportQueryError(
gql.transport.exceptions.TransportQueryError: {'message': "[unexpectedServiceError] Unexpected service error when processing your action. If this a recurring issue, contact support@kili-technology.com. -- This can be due to: 404: Not Found\n at UseCasesDataIntegration.get (/Users/paulruelle/kili/services/label-backend-v2/src/domains/assetStorage/useCases/UseCasesDataIntegration.ts:75:13)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at getOrganizationIdFromDataIntegrationId (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/organizationContext/helpers/getOrganizationIdFromDataIntegrationId.ts:4:27)\n at findOrganizationId (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/organizationContext/index.ts:180:39)\n at getLocalContextForRootResolver (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/rootResolverLocalContext.ts:36:26)\n at (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/localContext.ts:74:24)\n at fieldConfig.resolve (/Users/paulruelle/kili/services/label-backend-v2/src/directives/dynamicComplexity.ts:77:26) {\n code: 'SERVICE.READ',\n logContext: {\n dataIntegrationId: 'zegzg',\n relatedService: 'router',\n trace: 'Core404: Not Found\n' +\n ' at UseCasesDataIntegration.get (/Users/paulruelle/kili/services/label-backend-v2/src/domains/assetStorage/useCases/UseCasesDataIntegration.ts:75:13)\n' +\n ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +\n ' at getOrganizationIdFromDataIntegrationId (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/organizationContext/helpers/getOrganizationIdFromDataIntegrationId.ts:4:27)\n' +\n ' at findOrganizationId (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/organizationContext/index.ts:180:39)\n' +\n ' at getLocalContextForRootResolver (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/rootResolverLocalContext.ts:36:26)\n' +\n ' at (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/localContext.ts:74:24)\n' +\n ' at fieldConfig.resolve (/Users/paulruelle/kili/services/label-backend-v2/src/directives/dynamicComplexity.ts:77:26)',\n complexity: 1,\n dynamicComplexity: 1,\n kiliClient: {\n callTime: '2025-10-20T13:38:38.978241Z',\n callUUID: '6e55d123-014b-40bb-8f71-722aedc90c29',\n languageName: 'Python',\n languageVersion: '3.12.6',\n methodName: 'add_cloud_storage_connection',\n name: 'python-sdk-domain',\n platformName: 'Darwin',\n platformVersion: 'Darwin Kernel Version 23.6.0: Fri Jul 5 17:55:37 PDT 2024; root:xnu-10063.141.12/RELEASE_ARM64_T6030',\n source: 'external',\n version: '25.2.3'\n },\n userEmail: 'test+admin@kili-technology.com',\n userID: 'user-1',\n userOrganizationID: 'first-organization',\n resolverName: 'countDataIntegrations',\n tokenType: 'X-API-Key',\n id: 'countDataIntegrations-9382f0f3-1464-424a-b917-fb23c9321605',\n startTime: '2025-10-20T13:38:39.039Z',\n endTime: '2025-10-20T13:38:39.063Z',\n duration: 0.024\n }\n}", 'locations': [{'line': 2, 'column': 3}], 'path': ['data'], 'extensions': {'code': 'OPERATION_RESOLUTION_FAILURE', 'stacktrace': ['CoreError: 404: Not Found', ' at UseCasesDataIntegration.get (/Users/paulruelle/kili/services/label-backend-v2/src/domains/assetStorage/useCases/UseCasesDataIntegration.ts:75:13)', ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)', ' at getOrganizationIdFromDataIntegrationId (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/organizationContext/helpers/getOrganizationIdFromDataIntegrationId.ts:4:27)', ' at findOrganizationId (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/organizationContext/index.ts:180:39)', ' at getLocalContextForRootResolver (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/rootResolverLocalContext.ts:36:26)', ' at (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/localContext.ts:74:24)', ' at fieldConfig.resolve (/Users/paulruelle/kili/services/label-backend-v2/src/directives/dynamicComplexity.ts:77:26)'], 'context': {'dataIntegrationId': 'zegzg', 'relatedService': 'router', 'trace': 'CoreError: 404: Not Found\n at UseCasesDataIntegration.get (/Users/paulruelle/kili/services/label-backend-v2/src/domains/assetStorage/useCases/UseCasesDataIntegration.ts:75:13)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at getOrganizationIdFromDataIntegrationId (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/organizationContext/helpers/getOrganizationIdFromDataIntegrationId.ts:4:27)\n at findOrganizationId (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/organizationContext/index.ts:180:39)\n at getLocalContextForRootResolver (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/rootResolverLocalContext.ts:36:26)\n at (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/localContext.ts:74:24)\n at fieldConfig.resolve (/Users/paulruelle/kili/services/label-backend-v2/src/directives/dynamicComplexity.ts:77:26)', 'complexity': 1, 'dynamicComplexity': 1, 'kiliClient': {'callTime': '2025-10-20T13:38:38.978241Z', 'callUUID': '6e55d123-014b-40bb-8f71-722aedc90c29', 'languageName': 'Python', 'languageVersion': '3.12.6', 'methodName': 'add_cloud_storage_connection', 'name': 'python-sdk-domain', 'platformName': 'Darwin', 'platformVersion': 'Darwin Kernel Version 23.6.0: Fri Jul 5 17:55:37 PDT 2024; root:xnu-10063.141.12/RELEASE_ARM64_T6030', 'source': 'external', 'version': '25.2.3'}, 'userEmail': 'test+admin@kili-technology.com', 'userID': 'user-1', 'userOrganizationID': 'first-organization', 'resolverName': 'countDataIntegrations', 'tokenType': 'X-API-Key', 'id': 'countDataIntegrations-9382f0f3-1464-424a-b917-fb23c9321605', 'startTime': '2025-10-20T13:38:39.039Z', 'endTime': '2025-10-20T13:38:39.063Z', 'duration': 0.024}, 'http': {'status': 400}}}

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/paulruelle/kili-python-sdk/src/kili/domain_api/connections.py", line 264, in add
return CloudStorageClientMethods.add_cloud_storage_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/paulruelle/kili-python-sdk/src/kili/utils/logcontext.py", line 63, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/paulruelle/kili-python-sdk/src/kili/presentation/client/cloud_storage.py", line 324, in add_cloud_storage_connection
data_connection_id = CloudStorageUseCases(self.kili_api_gateway).add_data_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/paulruelle/kili-python-sdk/src/kili/use_cases/cloud_storage/init.py", line 86, in add_data_connection
self._kili_api_gateway.count_data_integrations(
File "/Users/paulruelle/kili-python-sdk/src/kili/adapters/kili_api_gateway/cloud_storage/init.py", line 67, in count_data_integrations
result = self.graphql_client.execute(GQL_COUNT_DATA_INTEGRATIONS, variables)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/paulruelle/kili-python-sdk/src/kili/core/graphql/graphql_client.py", line 286, in execute
raise kili.exceptions.GraphQLError(error=err.errors, context=context) from err
kili.exceptions.GraphQLError: GraphQL error: "[unexpectedServiceError] Unexpected service error when processing your action. If this a recurring issue, contact support@kili-technology.com. -- This can be due to: 404: Not Found
at UseCasesDataIntegration.get (/Users/paulruelle/kili/services/label-backend-v2/src/domains/assetStorage/useCases/UseCasesDataIntegration.ts:75:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at getOrganizationIdFromDataIntegrationId (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/organizationContext/helpers/getOrganizationIdFromDataIntegrationId.ts:4:27)
at findOrganizationId (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/organizationContext/index.ts:180:39)
at getLocalContextForRootResolver (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/rootResolverLocalContext.ts:36:26)
at (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/localContext.ts:74:24)
at fieldConfig.resolve (/Users/paulruelle/kili/services/label-backend-v2/src/directives/dynamicComplexity.ts:77:26) {
code: 'SERVICE.READ',
logContext: {
dataIntegrationId: 'zegzg',
relatedService: 'router',
trace: 'Core404: Not Found\n' +
' at UseCasesDataIntegration.get (/Users/paulruelle/kili/services/label-backend-v2/src/domains/assetStorage/useCases/UseCasesDataIntegration.ts:75:13)\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
' at getOrganizationIdFromDataIntegrationId (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/organizationContext/helpers/getOrganizationIdFromDataIntegrationId.ts:4:27)\n' +
' at findOrganizationId (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/organizationContext/index.ts:180:39)\n' +
' at getLocalContextForRootResolver (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/rootResolverLocalContext.ts:36:26)\n' +
' at (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/localContext.ts:74:24)\n' +
' at fieldConfig.resolve (/Users/paulruelle/kili/services/label-backend-v2/src/directives/dynamicComplexity.ts:77:26)',
complexity: 1,
dynamicComplexity: 1,
kiliClient: {
callTime: '2025-10-20T13:38:38.978241Z',
callUUID: '6e55d123-014b-40bb-8f71-722aedc90c29',
languageName: 'Python',
languageVersion: '3.12.6',
methodName: 'add_cloud_storage_connection',
name: 'python-sdk-domain',
platformName: 'Darwin',
platformVersion: 'Darwin Kernel Version 23.6.0: Fri Jul 5 17:55:37 PDT 2024; root:xnu-10063.141.1~2/RELEASE_ARM64_T6030',
source: 'external',
version: '25.2.3'
},
userEmail: 'test+admin@kili-technology.com',
userID: 'user-1',
userOrganizationID: 'first-organization',
resolverName: 'countDataIntegrations',
tokenType: 'X-API-Key',
id: 'countDataIntegrations-9382f0f3-1464-424a-b917-fb23c9321605',
startTime: '2025-10-20T13:38:39.039Z',
endTime: '2025-10-20T13:38:39.063Z',
duration: 0.024
}
}"

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/paulruelle/kili-python-sdk/scripts/add_or_set_metadata.py", line 18, in
issues = kili.connections.add(project_id="cmgusorfy0002yx0whfft5s2f", cloud_storage_integration_id="zegzg")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/paulruelle/kili-python-sdk/src/kili/domain_api/connections.py", line 276, in add
raise RuntimeError(
RuntimeError: Failed to create connection: Project 'cmgusorfy0002yx0whfft5s2f' or integration 'zegzg' not found. Details: GraphQL error: "[unexpectedServiceError] Unexpected service error when processing your action. If this a recurring issue, contact support@kili-technology.com. -- This can be due to: 404: Not Found
at UseCasesDataIntegration.get (/Users/paulruelle/kili/services/label-backend-v2/src/domains/assetStorage/useCases/UseCasesDataIntegration.ts:75:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at getOrganizationIdFromDataIntegrationId (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/organizationContext/helpers/getOrganizationIdFromDataIntegrationId.ts:4:27)
at findOrganizationId (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/organizationContext/index.ts:180:39)
at getLocalContextForRootResolver (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/rootResolverLocalContext.ts:36:26)
at (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/localContext.ts:74:24)
at fieldConfig.resolve (/Users/paulruelle/kili/services/label-backend-v2/src/directives/dynamicComplexity.ts:77:26) {
code: 'SERVICE.READ',
logContext: {
dataIntegrationId: 'zegzg',
relatedService: 'router',
trace: 'Core404: Not Found\n' +
' at UseCasesDataIntegration.get (/Users/paulruelle/kili/services/label-backend-v2/src/domains/assetStorage/useCases/UseCasesDataIntegration.ts:75:13)\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
' at getOrganizationIdFromDataIntegrationId (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/organizationContext/helpers/getOrganizationIdFromDataIntegrationId.ts:4:27)\n' +
' at findOrganizationId (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/organizationContext/index.ts:180:39)\n' +
' at getLocalContextForRootResolver (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/rootResolverLocalContext.ts:36:26)\n' +
' at (/Users/paulruelle/kili/services/label-backend-v2/src/context/localContext/localContext.ts:74:24)\n' +
' at fieldConfig.resolve (/Users/paulruelle/kili/services/label-backend-v2/src/directives/dynamicComplexity.ts:77:26)',
complexity: 1,
dynamicComplexity: 1,
kiliClient: {
callTime: '2025-10-20T13:38:38.978241Z',
callUUID: '6e55d123-014b-40bb-8f71-722aedc90c29',
languageName: 'Python',
languageVersion: '3.12.6',
methodName: 'add_cloud_storage_connection',
name: 'python-sdk-domain',
platformName: 'Darwin',
platformVersion: 'Darwin Kernel Version 23.6.0: Fri Jul 5 17:55:37 PDT 2024; root:xnu-10063.141.1~2/RELEASE_ARM64_T6030',
source: 'external',
version: '25.2.3'
},
userEmail: 'test+admin@kili-technology.com',
userID: 'user-1',
userOrganizationID: 'first-organization',
resolverName: 'countDataIntegrations',
tokenType: 'X-API-Key',
id: 'countDataIntegrations-9382f0f3-1464-424a-b917-fb23c9321605',
startTime: '2025-10-20T13:38:39.039Z',
endTime: '2025-10-20T13:38:39.063Z',
duration: 0.024
}
}"

Process finished with exit code 1

@baptiste-olivier
Copy link
Collaborator Author

BTW we still have very long & indigestible error messages when there is a GraphQLError error involved

Traceback (most recent call last):
...

Yes, but this should be a separated ticket / PR, as it should profit to both legacy or non legacy api methods

@RuellePaul
Copy link
Contributor

assets = kili.assets.update_processing_parameter(project_id="cmguti80x003jht0w6xdb4t9j", 
                                                 processing_parameter={"geospatial": {"epsg": 2154}})

kili.exceptions.MissingArgumentError: Either provide asset IDs or project ID with asset external IDs.

-> error message is ambiguous: we talk about ids in the plural, but we can also put asset_id

@RuellePaul
Copy link
Contributor

RuellePaul commented Oct 20, 2025

Sometime we use asset_ids, or asset_id_in

Same for : external_ids or external_id_in or even asset_external_id_in : is there a reason for that ?

@RuellePaul
Copy link
Contributor

input_type in update_interface does not makes sense :

assets = kili.projects.update_interface(project_id="cmguti80x003jht0w6xdb4t9j", input_type="GEOSPATIAL")

I now have a geospatial project with videos inside 😬

I think we can remove it, update_interface should only be for json interface

@RuellePaul
Copy link
Contributor

I think it's a bit confusing to have :

kili.projects.workflow AND kili.assets.workflow

@RuellePaul
Copy link
Contributor

users = kili.projects.users.list('cmguti80x003jht0w6xdb4t9j')
print(users)

return a weird type for members :

{'user': {'email': 'test+edouard@kili-technology.com', 'id': 'user-2'}, 'id': 'cmguti81d003sht0w1idh243g', 'role': 'ADMIN'}

I would expect :

{'email': 'test+edouard@kili-technology.com', 'id': 'user-2', 'role': 'ADMIN'}

return self._parent.client.delete_from_roles(role_id=role_id)

@typechecked
def update(self, role_id: str, project_id: str, user_id: str, role: str) -> Dict:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

role is not typed correctly here (should be role: Literal["ADMIN", "TEAM_MANAGER", "REVIEWER", "LABELER"] like above).

@RuellePaul
Copy link
Contributor

RuellePaul commented Oct 20, 2025

kili.notifications.create and kili.notifications.update are reserved for Kili administrators : should we expose them in that way ?

status is no fully typed in these methods, and documentation is wrong (tells "info", "success", "warning", "error" which does not corresponds to NotificationStatus)

We should maybe create a name space internal or administration for these private methods from SDK V1 ?

Capture d’écran 2025-10-20 à 16 24 21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants