Automated API traversal

0  

Armed with a thesaurus and an almanac of system functionality we can write robots that program themselves

YAML Идея

In Restful HATEOAS design, web applications provide endpoints that provides a list of web resources related to the current request that can also be introspected in the API.

A restaurant resource has links or URLs to a booking resource because you can book a restaurant.

A system should publish an endpoint that is an almanac of system functionality, that is, every endpoint it has, a thesaurus of keywords used to access that endpoint and a thesaurus of operations that it supports.

A system should also publish a series of workflows that it expects people to use.

This way we can write a fuzzy logic for a system based on a rough description of what to do - based on the thesaurus and almanac of a system.

"Export all my tweets to file"

All has an thesaurus entry for "list", "listAll", "getAll".

So the service knows it has to loop over this collection and save all fields to a file.

chronological,

(не уведомлять) (Необязательно) Пожалуйста, войдите.

Но так уже работают API: этот альманах называется «документацией», и он уже часто машиночитаем (прочтите [основные протоколы] (https://thecoreprotocols.org) и [open api] (https: // www .openapis.org)?).

Что ж, у них есть ограничение, они не возвращают словари, связанные с их типами объектов, а Mime-типы или Content-Type недостаточно информативны. Они могли бы, если бы эти API возвращали ответы JSON-LD или просто украшали свои ответы метаформатом [поликонтекстный метасимвол] (https://0oo.li/method/863/metaformat), этого было бы достаточно для привязки их к схемам, определенным в концепциях связаны с помощью метасимвола поликонтекста, и каждый может рассуждать обо всем, получая данные обо всем, просматривая API.

Куча существующих решений, которые требуют человеческой работы и уже работают (они называются экспертными системами), чтобы реализовать желаемое за действительное, потому что существует много не очень хорошо документированного программного обеспечения, в котором типы программного обеспечения плохо связаны с онтологическими (лингвистическими) ) типы.

Чтобы создать эту лингвистическую связь, чтобы каждый мог автоматически генерировать запросы в многочисленных базах данных, просто думая, что кто-то хотел бы что-то знать, потребуется обучение системы ИИ, чтобы отображать это на примерах людей. Есть пара слоев:

  • синонимы, являющиеся частью человеческого языка

  • идентификаторы концептов (которые можно найти в Викиданных)

  • имена классов (которые вы можете найти в программном обеспечении ООП)

  • имена таблиц (которые можно найти в базах данных)

Все это можно красиво связать, определив один хороший [поликонтекстный метасимвол] (https://0oo.li/method/863/metaformat) (я думаю, что мы должны придумать и развить поликонтекстный метасимвол для человечества в аналогичный способ, которым мы развиваем протоколы с помощью RFC), и это позволило бы в конечном итоге получить желаемое свойство - способность рассуждать таким образом, действительно трансцендентно, во всех протоколах и со всеми информационными системами.

But this is how APIs work already, that almanac is called "documentation" and it is already often machine-readable (read the core protocols and open api?).

Well, they have a limitation, they do not return vocabularies associated with their object types, and Mime-Types or Content-Types are not sufficiently informative. They could, if those APIs returned JSON-LD respones, or simply decorating their responses with metaformat's polycontext metasymbol would be enough to bind them to schemas defined in concepts also linked via polycontext metasymbol, and everyone could reason about everything while retrieving data about everything, traversing APIs.

A bunch of existing solutions that require human work, and already work (they are called expert systems) for this wishful thinking to get realized, because there exists a lot of not very well documented software, where software types are poorly linked with ontological (linguistic) types.

To create that linguistic connect so that everyone could auto-generate queries in numerous databases just by thinking that one would want to know something, will require the training of an AI system to map it from human examples. There are a couple of layers:

  • synonyms that are part of human language
  • concept IDs (that you can find in Wikidata)
  • class names (that you can find in OOP software)
  • table names (that you can find in databases)

All of that, can be beautifully linked up by defining a single good polycontext metasymbol (I think we should come up with and evolve the polycontext metasymbol for humanity, in a similar way that we evolve protocols, through RFCs), and that would allow to eventually have that desired property of being able to reason this way, really transcendentally, in all protocols and with all information systems.


Я знаком с экспертными системами, такими как Drools, в которых используется действительно хитрый алгоритм rete. И я знаю про OpenAPI

Но они все равно должны быть явно закодированы.

I'm familiar with expert systems such as Drools which uses the rete algorithm which is really clever. And I know about OpenAPI

But they still have to be explicitly coded.


// Но они все равно должны быть явно закодированы.

Но то, что вы предлагаете (тезаурус и альманах системных функций), также должно быть явно закодировано, не так ли?

Вы говорите: «Система должна публиковать конечную точку, которая представляет собой альманах системных функций, то есть каждую конечную точку, которую она имеет, тезаурус ключевых слов, используемых для доступа к этой конечной точке, и тезаурус операций, которые она поддерживает».

Вам необходимо закодировать эти системы, чтобы опубликовать их функциональные возможности, поэтому вам придется модифицировать каждую систему, у которой есть функциональные возможности, чтобы иметь возможность опубликовать ее. Как ваш подход может избежать этой потребности в явном кодировании для модификации этих систем, чтобы публиковать их описания в «тезаурусе и альманахе»?

// But they still have to be explicitly coded.

But what you propose (the thesaurus and an almanac of system functionality) would also have to be explicitly coded, wouldn't it?

You say: "A system should publish an endpoint that is an almanac of system functionality, that is, every endpoint it has, a thesaurus of keywords used to access that endpoint and a thesaurus of operations that it supports."

You need to code those systems to publish their functionality, so you'd have to modify every system that has functionality, to be able to publish it. How would your approach avoid this need for explicit coding to modify those systems to publish descriptions of themselves to the "thesaurus and an almanac"?


Я думаю, должна быть версия nnn для REST API. REST API как файловая система, а затем расширение утилиты nnn для обработки .json файлы сделают это. Однако я обнаружил, что FUSE не очень эффективен, и Линус Торвальдс, как известно, говорит, что файловые системы FUSE - не более чем игрушки...

I think, there should be a version of nnn for REST APIs. The REST API as a filesystem, and then extending the nnn util to handle .json files would do it. However, I found that FUSE is not very performant, and Linus Torvalds famously says FUSE filesystems are nothing more than toys...