-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #170 from NillionNetwork/feat/open-api-integration
feat: v2docs
- Loading branch information
Showing
58 changed files
with
10,034 additions
and
23,487 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
139 changes: 139 additions & 0 deletions
139
docs/api/nildb/delete-data-records-that-match-a-given-filter.api.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
--- | ||
id: delete-data-records-that-match-a-given-filter | ||
title: 'Delete data records that match a given filter' | ||
description: 'Delete data records that match a given filter' | ||
sidebar_label: 'Delete' | ||
hide_title: true | ||
hide_table_of_contents: true | ||
api: eJytVl1vYjkM/StRXnZWKtDSltnlrTN0pO6Hppq2Mw8zfTA3BtLem9xNcmkR4r/vcS60UKqtdrU8QBI79rF97LDUkYsm2LTQw+9LffeQ8Hu7uj3QiaYRaz2iRBr7wH81HNMHb6C61IV3iV2SJdV1aQtK1rveXfROzmIx44pklRY166H24zsukj7QdfA1h2Q57uoZjkWwtViB+plqnJ1ziFSWC1nDubIGHu3EclATH1Sa4Shx1YXVtZeYgnVT7CGvCOh001gjcptKUbi5uRjpFeS2TBxew/cCh1OtRAWuA0cB4Kaqva6giB9LGQ4QBkQlaMgYKwaovNyJ9g1falLyox2XvPGJ4P2D+CO3UPe86MypRB5qsiEeqIcZB1b5KKqCnBrj4iTriqOuxLmJ+1Mb7yp/pJix9i62qPqHh/sFuEZyXVONESVsGl80FWKPSEPl5ywp/c8MECbZABtgl1mza5cV+fT5ZovjCfzJa3i/UmlNRqBQC5grOEZJHYfgQ/y/8CaxtDa5BzttF3mfioDHnWQr3qu8JFsEkmphdXagqCh8MBJD8vnYedNWdQ1gLwl/2JjERnu/QgZoyvG5PSgEWmArXZOvgyufJ7nzd1GvDt5q3AJY9qMFtrXXV2Sr1W2u34aT54JSb2p6tB/On7YtIWKxbi4FVr99u9aiv6s44pITK6ENCCpZi0gYJYXEFzNFaopZ4tZdqwVjmnnUU9c+5tAozbDrUW1786Oe2OmZbBPCyEEGUc5SE0rozVKq47DXc7Y0445BR3SxLIGl6zg9+HCvZYJuJuuVMKvNWp6vT4kRO+Igy7EfM4WMr1182hBHgt4fFqOLUQcS1eQcCT/Or/qng98xNaYefmdVHkvUQISpBbqzUexM7S0aufvDyeWaFqUno6oGzLGuKBvDwx+uoyylobqIscElJFLYGRNVtcj4sR6q88fahrbhnoTqnWS/wqQwbH4WVWrMUF1TmHLK9FWGC6AJKGaE5a2J/g7x5Cso+lB9LC0kP8U39TMbpIe/PL9P54/AUvJ2V+vjCf1yOhmcdE7fH73vnJwO+p3x8aTo9ItfB8eTwYAmNNBb74KYtW7ic7nWhEWRRx/U2eUFFIUSbSUOu/1uX5gvZKooDxNHuaD/lpc7JX6iSeLH1KtLsk68ZAou15T9jlFmBc2R3JapKUYycUHAmbAbOsvlmCLfhHK1kmN5qOS5x3JOeL3GEhwefVxgMhI9mI7XBq4/tjOzcy1IRB1vjcyRl/NT5kV746wouE7/qHu71YCXn6+E2+P1v4oqTxUd6EHmLr6HGgufM5IbKJ8tdUlu2uQpo1ubUi5h+lbaXnTT9pTD2NtCiPRkjWt/zw4pOliHkmSv89D6G5mfJuw= | ||
sidebar_class_name: 'post api-method' | ||
info_path: api/nildb/nildb-api | ||
custom_edit_url: null | ||
--- | ||
|
||
import MethodEndpoint from '@theme/ApiExplorer/MethodEndpoint'; | ||
import ParamsDetails from '@theme/ParamsDetails'; | ||
import RequestSchema from '@theme/RequestSchema'; | ||
import StatusCodes from '@theme/StatusCodes'; | ||
import OperationTabs from '@theme/OperationTabs'; | ||
import TabItem from '@theme/TabItem'; | ||
import Heading from '@theme/Heading'; | ||
|
||
<Heading | ||
as={'h1'} | ||
className={'openapi__heading'} | ||
children={'Delete data records that match a given filter'} | ||
></Heading> | ||
|
||
<MethodEndpoint | ||
method={'post'} | ||
path={'/api/v1/data/delete'} | ||
context={'endpoint'} | ||
></MethodEndpoint> | ||
|
||
Delete data records that match a given filter | ||
|
||
:::info | ||
You may use this test Bearer token we have created for development | ||
|
||
``` | ||
eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.eyJpc3MiOiJkaWQ6bmlsOnRlc3RuZXQ6bmlsbGlvbjF4dnRuM2FhajQ4dGY3bm5zZW16MGQ2OGVwbjZlcHU0ZjRhNG5mYSIsImF1ZCI6ImRpZDpuaWw6dGVzdG5ldDpuaWxsaW9uMXd3c3Jqbmd4dnU5dGMzMzVsajlrM213d3JybDV3M3EyZDB1ZXR6In0.yOKg-wyJdyn9jK-KNtkjbi9PS0pF9wmgVmd7pIeNGhoTjhgZhzB62atbgzE45OGGYx0gUsw_i2k3K2AdFf_tuQ | ||
``` | ||
|
||
::: | ||
|
||
<Heading | ||
id={'request'} | ||
as={'h2'} | ||
className={'openapi-tabs__heading'} | ||
children={'Request'} | ||
></Heading> | ||
|
||
<ParamsDetails parameters={undefined}></ParamsDetails> | ||
|
||
<RequestSchema | ||
title={'Body'} | ||
body={{ | ||
content: { | ||
'application/json': { | ||
schema: { | ||
type: 'object', | ||
properties: { | ||
schema: { | ||
description: 'A universally unique identifier for the item.', | ||
type: 'string', | ||
format: 'uuid', | ||
title: 'UUID', | ||
}, | ||
filter: { | ||
type: 'object', | ||
description: | ||
'An object representing filter criteria for queries.', | ||
additionalProperties: { | ||
type: 'object', | ||
description: | ||
'A flexible object allowing any key-value pairs, where values can be of any type.', | ||
}, | ||
title: 'Filter', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}} | ||
></RequestSchema> | ||
|
||
<StatusCodes | ||
id={undefined} | ||
label={undefined} | ||
responses={{ | ||
'200': { | ||
description: 'The number of documents removed', | ||
content: { | ||
'application/json': { | ||
schema: { | ||
type: 'object', | ||
required: ['data'], | ||
properties: { data: { type: 'number' } }, | ||
}, | ||
}, | ||
}, | ||
}, | ||
'400': { | ||
description: 'Validation or processing errors', | ||
content: { | ||
'application/json': { | ||
schema: { | ||
type: 'object', | ||
required: ['ts', 'errors'], | ||
properties: { | ||
ts: { | ||
type: 'string', | ||
format: 'date-time', | ||
description: 'The time of the error according to the node.', | ||
}, | ||
errors: { | ||
description: 'List of error messages', | ||
type: 'array', | ||
items: { | ||
anyOf: [ | ||
{ type: 'string' }, | ||
{ | ||
type: 'object', | ||
properties: { | ||
code: { type: 'string' }, | ||
message: { type: 'string' }, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
title: 'Error', | ||
}, | ||
}, | ||
}, | ||
}, | ||
'401': { description: 'Missing or invalid JWT' }, | ||
}} | ||
></StatusCodes> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
--- | ||
id: execute-the-specified-query | ||
title: 'Execute the specified query' | ||
description: 'Execute the specified query' | ||
sidebar_label: 'Execute' | ||
hide_title: true | ||
hide_table_of_contents: true | ||
api: eJytVVFv4zYM/iuCXnYD4qRN29zmt941A7rbcLc12x56fWAsOlFrSzpJThME+e8jZadN6qLDgOtDKlEUyY/89HkrAxaN13Ej89utvH+M9P9udzeQERaB1vKPBv1GksHjtwZD/GAV+W7TVntUMo++wYEsrIloIh+Bc5UuIGprRvfBGraFYok18CpuHMpc2vk9FlEODgLdSq3IsAKvYV5h4KzOW4c+atrRXTqnX4Wh8NpxfAo0W6L4xkWKptFKRCtwTZgiUqguV4hemwXtS+troBolu8rdYa5e3E+4ESuoGhQOtA8cuAkogFb7jD8E4RsTdY3iOdDgBcJd+mOcwVkT2lTjk5O3kLQIyCroVlNxm75LfxVE6Hc1Wf9fNa9DPH8N1d9QaZWKFdYLylxgCDQOgd5bH74XtMiRupA9hDEcXO+zgcrDjMdIxn4T0nxtmcaeEggoCusVYyBSsNlYhUPmU1dArwm/6RA5Rnu/pg7A4pAr4D1saKsj1uk6mM3nMr3J46p3g34bjrEWVEsfLdXWZX3lbLe7S/OLOlZsn3KVcj/T0z6c33U7QsKizYoHLH79ZybZ/9hx2j7F1KTgsNClRtXSSnJFcWlpetLZkIBAXNJuBE6PVqcjdiNQo+f3HNCvkPtLfWl8Rb7LGF3IRyOjKzXPFNZ2SMuKsg8NxkfrHySr2V7lbphLbZ+S1j21guNwgnRO+zmCR0+WdvHLnioM8yXIS3F1fZXRCQlEIgWBnd6MLyafBFQLS3mXtSiZNw0dkV4QwakLaJSz2sQw/Gr4soNNZUGJuiGuaFNUjcL8q8mEhpiL6xAaugQx8TFEqB2f4drlYrp22rdP7OlQvPNY2LqmLKh+ZFdoVC5m4BcYE2GFwoKq8TS+QJG14tJoPl68IzzpCo05Fx8rTSekdf/ln+bPr/bP50/FdE21VLgXb3lWwk8X5eQ8u3h/+j47v5iMs/lZWWTj4ufJWTmZQAkTeazLHFWb0qZpdQylGV99EJdfrtmXGNEO4mQ4Ho6Z6synGpJ6GEjzfJuIR/N84kTEdRy5CrThmIlv246jt6RUmnOf0k/HU9afjqnEuCVTmvy22zkE/MtXux2b24z0jX3GmL64dAFBEeOY2g9ILvJjK4vZjKthd/oWsVS8lEiWhPbGZVGgi2/63h28ui+fb5jM8+6LXifhkB4eWVrpN5e0sKkr6cUk21ZWYBZNEhLZxuQBMbUPWvfi+RwKGSnbQYXUnuQxsw9oqEWDDkrkvUy69C9rIPp2 | ||
sidebar_class_name: 'post api-method' | ||
info_path: api/nildb/nildb-api | ||
custom_edit_url: null | ||
--- | ||
|
||
import MethodEndpoint from '@theme/ApiExplorer/MethodEndpoint'; | ||
import ParamsDetails from '@theme/ParamsDetails'; | ||
import RequestSchema from '@theme/RequestSchema'; | ||
import StatusCodes from '@theme/StatusCodes'; | ||
import OperationTabs from '@theme/OperationTabs'; | ||
import TabItem from '@theme/TabItem'; | ||
import Heading from '@theme/Heading'; | ||
|
||
<Heading | ||
as={'h1'} | ||
className={'openapi__heading'} | ||
children={'Execute the specified query'} | ||
></Heading> | ||
|
||
<MethodEndpoint | ||
method={'post'} | ||
path={'/api/v1/queries/execute'} | ||
context={'endpoint'} | ||
></MethodEndpoint> | ||
|
||
Execute the specified query | ||
|
||
:::info | ||
You may use this test Bearer token we have created for development | ||
|
||
``` | ||
eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.eyJpc3MiOiJkaWQ6bmlsOnRlc3RuZXQ6bmlsbGlvbjF4dnRuM2FhajQ4dGY3bm5zZW16MGQ2OGVwbjZlcHU0ZjRhNG5mYSIsImF1ZCI6ImRpZDpuaWw6dGVzdG5ldDpuaWxsaW9uMXd3c3Jqbmd4dnU5dGMzMzVsajlrM213d3JybDV3M3EyZDB1ZXR6In0.yOKg-wyJdyn9jK-KNtkjbi9PS0pF9wmgVmd7pIeNGhoTjhgZhzB62atbgzE45OGGYx0gUsw_i2k3K2AdFf_tuQ | ||
``` | ||
|
||
::: | ||
|
||
:::info | ||
Example of an `execute` query. Feel free to experiment with different country codes (i.e. UK) You may also use the [LIST](./list-the-organizations-queries) query for further information. | ||
|
||
``` | ||
{ | ||
"id": "a2ab673e-dd01-47c1-98c8-3db3fa6ed780", | ||
"variables": { | ||
"country_code": "US" | ||
} | ||
} | ||
``` | ||
|
||
::: | ||
|
||
<Heading | ||
id={'request'} | ||
as={'h2'} | ||
className={'openapi-tabs__heading'} | ||
children={'Request'} | ||
></Heading> | ||
|
||
<ParamsDetails parameters={undefined}></ParamsDetails> | ||
|
||
<RequestSchema | ||
title={'Body'} | ||
body={{ | ||
required: true, | ||
content: { | ||
'application/json': { | ||
schema: { | ||
type: 'object', | ||
required: ['id', 'variables'], | ||
properties: { | ||
id: { | ||
description: 'The query uuid to execute', | ||
type: 'string', | ||
format: 'uuid', | ||
}, | ||
variables: { | ||
description: | ||
"Key value pairs to use as the query's runtime variables", | ||
type: 'object', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}} | ||
></RequestSchema> | ||
|
||
<StatusCodes | ||
id={undefined} | ||
label={undefined} | ||
responses={{ | ||
'200': { | ||
description: 'The query execution result', | ||
content: { | ||
'application/json': { | ||
schema: { | ||
type: 'object', | ||
required: ['data'], | ||
properties: { | ||
data: { | ||
description: 'The query execution result', | ||
type: 'object', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
'400': { | ||
description: 'Validation or processing errors', | ||
content: { | ||
'application/json': { | ||
schema: { | ||
type: 'object', | ||
required: ['ts', 'errors'], | ||
properties: { | ||
ts: { | ||
type: 'string', | ||
format: 'date-time', | ||
description: 'The time of the error according to the node.', | ||
}, | ||
errors: { | ||
description: 'List of error messages', | ||
type: 'array', | ||
items: { | ||
anyOf: [ | ||
{ type: 'string' }, | ||
{ | ||
type: 'object', | ||
properties: { | ||
code: { type: 'string' }, | ||
message: { type: 'string' }, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
title: 'Error', | ||
}, | ||
}, | ||
}, | ||
}, | ||
'401': { description: 'Missing or invalid JWT' }, | ||
}} | ||
></StatusCodes> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
id: get-health-status | ||
title: 'Check service health status' | ||
description: 'Returns 200 OK if the service is healthy' | ||
sidebar_label: 'Health' | ||
hide_title: true | ||
hide_table_of_contents: true | ||
api: eJyVU8FuEzEQ/ZWRLxSpTaJIcNhbaQOEHopIEYc2h4k9yZp4bWPPtlmt8u+MN4GmCAmRS+w38zxvZt72ylDWyUa2watKfSFuk88wnUzg9gbsGrgmyJQerSawGWpCx3WnzlWIlLDQ5kaIG+KPQ2jByG2WOOMmq+peLbrM1KjluUqUY/CZBO6VVCh/L8sv/lZIB8/kuWQz7XgcHVpfblnX1OCAd5GEnjlZvxEK7bCJrkC3N2pffueqIa7DUaqkRORaLuNDHQFKk5SK5F61yUmsZo65Go+9dWZ1YagJIzk6kTryxE8hbdV+WYi6TZa7RZFzaO77E5/IKu+UAkNc7ivCREmQw+F9SA1Kvvr07U7AlxO5hOv59YVEoM3S27CO2WL65u0NoNsEqVs3sA4JsJWQZ6uRyQB5E4P1nEcPvpAjdi6ggabNDNZr1xqqHvwFWOQK5jm3QkIGttIBy/BKjHaxgtku2sOen4NwlkiHppEqZF6XVGxNBXeYZLbggyEwpEVNQmezvGxNkba2lOBM+hkoNucKrpyVyKv8z3xVVmj9OgxztTwsV7Zx/Q4uP89lbGV3h5FNRtPRVEl6DJkbHKzicZj8VU16+9vOh9VD/uXYF5Pvn333P1/FceUnRhUhg536o+Xu1dFyYp1aFBak71eY6Wty+32Bf7SUOsHl+IjJ4qp0e7+Ul4RqxDrFo1vqij+0plj8/Iiu/bPy8sT1H2Z3MsOf20VZNw== | ||
sidebar_class_name: 'get api-method' | ||
info_path: api/nildb/nildb-api | ||
custom_edit_url: null | ||
--- | ||
|
||
import MethodEndpoint from '@theme/ApiExplorer/MethodEndpoint'; | ||
import ParamsDetails from '@theme/ParamsDetails'; | ||
import RequestSchema from '@theme/RequestSchema'; | ||
import StatusCodes from '@theme/StatusCodes'; | ||
import OperationTabs from '@theme/OperationTabs'; | ||
import TabItem from '@theme/TabItem'; | ||
import Heading from '@theme/Heading'; | ||
|
||
<Heading | ||
as={'h1'} | ||
className={'openapi__heading'} | ||
children={'Check service health status'} | ||
></Heading> | ||
|
||
<MethodEndpoint | ||
method={'get'} | ||
path={'/health'} | ||
context={'endpoint'} | ||
></MethodEndpoint> | ||
|
||
Returns 200 OK if the service is healthy | ||
|
||
<ParamsDetails parameters={undefined}></ParamsDetails> | ||
|
||
<RequestSchema title={'Body'} body={undefined}></RequestSchema> | ||
|
||
<StatusCodes | ||
id={undefined} | ||
label={undefined} | ||
responses={{ | ||
'200': { | ||
description: 'Service is healthy', | ||
content: { 'text/plain': { schema: { type: 'string', example: 'OK' } } }, | ||
}, | ||
}} | ||
></StatusCodes> |
Oops, something went wrong.