Skip to content

[ADD] reference/external_json_api #14091

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Julien00859
Copy link
Member

No description provided.

@robodoo
Copy link
Collaborator

robodoo commented Jul 18, 2025

Pull request status dashboard

@Julien00859 Julien00859 force-pushed the master-json2doc-juc branch 2 times, most recently from 078ad01 to 5230acf Compare July 18, 2025 10:53
@Julien00859 Julien00859 marked this pull request as draft July 18, 2025 10:54
@Julien00859 Julien00859 force-pushed the master-json2doc-juc branch 2 times, most recently from 088509f to f87ee68 Compare July 30, 2025 16:33
@Julien00859 Julien00859 marked this pull request as ready for review August 18, 2025 14:19
@C3POdoo C3POdoo requested review from a team August 18, 2025 14:27
Copy link
Collaborator

@AntoineVDV AntoineVDV left a comment

Choose a reason for hiding this comment

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

I think it would be better to move the RPC-related content to a new file and reuse the very well-referenced external_api.rst file for the new external API instead. Then, in 19.1, the file about deprecated-now-unsupported content can be removed.

This is also because we don't document when this or that feature was added, deprecated, or removed. The documentation for version X.Y documents which features exist in Odoo X.Y, no more no less.

@Julien00859
Copy link
Member Author

I think it would be better to move the RPC-related content to a new file and reuse the very well-referenced external_api.rst file for the new external API instead. Then, in 19.1, the file about deprecated-now-unsupported content can be removed.

Done

This is also because we don't document when this or that feature was added, deprecated, or removed. The documentation for version X.Y documents which features exist in Odoo X.Y, no more no less.

That we are dropping XML/JSON-RPC is serious enough to mandate the deprecation danger. A common question I've been asked is "is the JSON-2 API available in 18?", hence the "new in 19.0" passage.

Copy link

@Flotchet Flotchet left a comment

Choose a reason for hiding this comment

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

Great stuff! Clear and all! Just some little grammar stuff and a bit of nitpicks and that's basically all for me.
Thanks for the work 💪

.. image:: external_api/delete-key.png
:align: center

**A deleted API key can not be undeleted or re-set**. You will have to generate
Copy link

@Flotchet Flotchet Aug 18, 2025

Choose a reason for hiding this comment

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

A deleted API key cannot be undeleted or re-set
nitpick: A deleted API key cannot be recovered or reset.

Suggested change
**A deleted API key can not be undeleted or re-set**. You will have to generate
**A deleted API key cannot be recovered or reset**. You will have to generate


The ``xmlrpc/2/common`` endpoint provides meta-calls which don't require
authentication, such as the authentication itself or fetching version
information. To verify if the connection information is correct before trying
Copy link

@Flotchet Flotchet Aug 18, 2025

Choose a reason for hiding this comment

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

nitpick: To verify whether the connection information is correct

Suggested change
information. To verify if the connection information is correct before trying
information. To verify whether the connection information is correct before trying

78
.. warning::
While most value types are what would expect (integer for
Copy link

@Flotchet Flotchet Aug 18, 2025

Choose a reason for hiding this comment

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

While most value types are what you would expect (integer for

Suggested change
While most value types are what would expect (integer for
While most value types are what you would expect (integer for

:doc:`external_api` acts as replacement.

Odoo is usually extended internally via modules, but many of its features and
all of its data are also available from the outside for external analysis or
Copy link

@Flotchet Flotchet Aug 18, 2025

Choose a reason for hiding this comment

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

maybe: available externally for analysis or integration

Suggested change
all of its data are also available from the outside for external analysis or
all of its data are also available externally for analysis or

easily available over XML-RPC_ and accessible from a variety of languages.

Starting with PHP8, the XML-RPC extension may not be available by default.
Check out the `manual <https://www.php.net/manual/en/xmlrpc.installation.php>`_
Copy link

@Flotchet Flotchet Aug 18, 2025

Choose a reason for hiding this comment

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

nitpick: I would more use something like "Refer to"

Suggested change
Check out the `manual <https://www.php.net/manual/en/xmlrpc.installation.php>`_
Refer to the `manual <https://www.php.net/manual/en/xmlrpc.installation.php>`_

Comment on lines +231 to +232
authentication itself is done through the ``authenticate`` function and
returns a user identifier (``uid``) used in authenticated calls instead of
Copy link

@Flotchet Flotchet Aug 18, 2025

Choose a reason for hiding this comment

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

real big o nitpick here : which returns instead of and returns to empathize the fact that the function is the one returning the uid

Suggested change
authentication itself is done through the ``authenticate`` function and
returns a user identifier (``uid``) used in authenticated calls instead of
authentication itself is done through the ``authenticate`` function which
returns a user identifier (``uid``) used in authenticated calls instead of

@xpl-odoo xpl-odoo removed the request for review from a team August 19, 2025 08:19
to identify the key, and to determine later whether the key is still in use or should be removed.
The duration determines the lifetime of the key after which the the key becomes invalid. It is
recommended to set a short duration (typically 1 day) for interactive usage. It is not possible to
create keys that last for more than 3 months, it means that long lasting keys must be rotated at

Choose a reason for hiding this comment

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

nitpick months, it means should be months. It means imo

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't understand, can you do a ```suggestion instead?

Choose a reason for hiding this comment

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

It's more about the flow here for me it feel like 2 separate sentences

Suggested change
create keys that last for more than 3 months, it means that long lasting keys must be rotated at
create keys that last for more than 3 months. It means that long lasting keys must be rotated at


Conversely, picking only three fields deemed interesting.
* The minimum required permissions can be granted to the bot, limiting the impact may the API key
gets compromised;

Choose a reason for hiding this comment

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

actually not 100% sure on this one
may the API key gets compromised should be if the API key gets compromised

Copy link
Member Author

Choose a reason for hiding this comment

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

am not sure either, let's wait a 3rd opinion :)

)));
The following examples showcase how to execute two of the :ref:`reference/orm/models/crud` on a fake
database ``mycompany`` hosted on a fake website ``https://mycompany.example.com``. Its comprehensive
documentation would be available at https://mycompany.example.com/doc

Choose a reason for hiding this comment

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

would be available is a bit speculative and makes it feel like we are not sure imo

Copy link
Member Author

Choose a reason for hiding this comment

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

am not sure either, let's wait a 3rd opinion :)

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.

4 participants