Skip to content

API Reference💡

The 3Di API is organized around REST as a web service. All interactions therefore use the standard HTTP methods GET, POST, PUT, PATCH and DELETE. It accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes.

The 3Di API User Guide is your go-to reference when interacting with the 3Di API. It provides an overview of the most important resources you will create, read and update. In addition it introduces resource filtering and sorting, as well as outlines what responses and errors you can expect, and much more.

There are several ways to interact with a REST web service, from command-line tools like cURL to web-based tools like postman. The 3Di API swagger documentation also has some great built-in tools to use the API directly, but above all, is a great source of information. Make sure to check it out.
We also publish our own python 3Di openapi client, which is automatically generated based on the swagger open API definition. Therefore all resources including available filters, sorting options and so on are also directly available on the openapi client objects. Take the simulations_list method as an example, that lists all simulation resources you have access to. If you consult the method's help, it will include filter options like name__icontains, pagination limit etc.

from threedi_api_client.versions import V3Api

V3Api.simulations_list?
...
# Note: only showing subset of all options below.
# Please see swagger documentation, or run this command locally for the full list.
:param str name__contains:
:param str name__icontains:
:param str name__in: Multiple values may be separated by commas.
:param str name__startswith:
:param str name__istartswith:
:param str name__endswith:
:param str name__regex:
:param str ordering: Which field to use when ordering the results.
:param int limit: Number of results to return per page.
:param int offset: The initial index from which to return the results.
...

Important

All code examples that use the 3Di openapi client are marked by this icon