Skip to content

Commit e2ee061

Browse files
splgitbook-bot
authored andcommitted
GitBook: [#28] open api information
1 parent 14b02d5 commit e2ee061

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

index/json-diff-and-patch.md

+23-10
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ A **diff** takes two JSON objects and presents any differences between them. Dif
2828

2929
A **patch** applies a diff to two objects to obtain a new object with any differences highlighted. A patch is applied individually or in bulk to a patch endpoint that will apply the patch to the specified data product.
3030

31+
32+
33+
## Use public JSON-DP directly
34+
35+
We provide a public endpoint for each operation:
36+
37+
JSON Diff: [https://cloud.terminusdb.com/jsondiff](https://cloud.terminusdb.com/jsondiff)
38+
39+
JSON Patch: [https://cloud.terminusdb.com/jsonpatch](https://cloud.terminusdb.com/jsonpatch)
40+
41+
See [JSON-DP client tutorials](json-diff-and-patch.md#json-dp-client-tutorials) for use cases, including connectivity with MongoDB.
42+
3143
## Use JSON-DP with a TerminusDB client
3244

3345
Use JSON-DP with a TerminusDB JavaScript or Python client to find and handle changes in TerminusDB schemas and documents, JSON schemas, and other document databases such as MongoDB. See [JSON-DP client tutorials](json-diff-and-patch.md#json-dp-client-tutorials) for use cases, including connectivity with MongoDB.
@@ -43,7 +55,7 @@ Use JSON-DP with a TerminusDB JavaScript or Python client to find and handle cha
4355
Get started with the simple steps below.
4456

4557
{% hint style="info" %}
46-
If using **TerminusX with Python**, connect to your TerminusX cloud instance first - see [Connect with WOQLClient](../readme/terminusx/quick-start/start-with-client.md#connect-with-woqlclient) for instructions if required.  
58+
If using **TerminusX with Python**, connect to your TerminusX cloud instance first - see [Connect with WOQLClient](../readme/terminusx/quick-start/start-with-client.md#connect-with-woqlclient) for instructions if required.
4759
{% endhint %}
4860

4961
1\. [Create an endpoint](json-diff-and-patch.md#create-an-endpoint)
@@ -84,8 +96,6 @@ Get the difference/s between two hypothetical documents - `Doc1` and `Doc2`.
8496
{% tab title="JavaScript" %}
8597
Use `getDiff`
8698

87-
88-
8999
```javascript
90100
let result_patch = await client.getDiff(Doc1, Doc2)
91101
```
@@ -94,8 +104,6 @@ let result_patch = await client.getDiff(Doc1, Doc2)
94104
{% tab title="Python" %}
95105
Use`diff`
96106

97-
98-
99107
```python
100108
result_patch = client.diff(Doc1, Doc2)
101109
```
@@ -116,8 +124,6 @@ console.log(result_patch)
116124
{% tab title="Python" %}
117125
Example uses`pprint` (`from pprint import pprint`)
118126

119-
120-
121127
```python
122128
pprint(result_patch.content)
123129
```
@@ -142,7 +148,7 @@ after_patch = client.patch(Doc1, result_patch)
142148
{% endtab %}
143149
{% endtabs %}
144150

145-
## JSON-DP operations  
151+
## JSON-DP operations
146152

147153
The available JSON-DP operations with some examples using `curl`.
148154

@@ -308,7 +314,14 @@ We have the following patch resulting from the diff:
308314

309315
## Diff and Patch Endpoints
310316

311-
The Patch and Diff endpoints expose endpoints for clients to obtain diffs or patches of data.
317+
The Patch and Diff endpoints expose endpoints to obtain diffs or patches of data.
318+
319+
\
320+
We provide a public endpoint for each operation:
321+
322+
JSON Diff: [https://cloud.terminusdb.com/jsondiff](https://cloud.terminusdb.com/jsondiff)
323+
324+
JSON Patch: [https://cloud.terminusdb.com/jsonpatch](https://cloud.terminusdb.com/jsonpatch)
312325

313326
### Diff
314327

@@ -404,7 +417,7 @@ $ curl -X POST -H "Content-Type: application/json" 'https://cloud.terminusdb.com
404417

405418
## See Also
406419

407-
### JSON-DP client tutorials 
420+
### JSON-DP client tutorials
408421

409422
Tutorials for using JSON-DP with a TerminusDB [JavaScript or Python client](https://github.com/terminusdb/terminusdb-tutorials/tree/master/diff\_patch), including the use of JSON-DP with MongoDB.
410423

0 commit comments

Comments
 (0)