Skip to content

Commit 23c1ebf

Browse files
gjmwoodsdavidoliverSP2
authored andcommitted
Make legacy API and its deprecation more prominent
1 parent 3e449f2 commit 23c1ebf

File tree

3 files changed

+66
-53
lines changed

3 files changed

+66
-53
lines changed

modules/ROOT/pages/actions/begin-and-commit-a-transaction-in-one-request.adoc

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -51,56 +51,3 @@ _Example response_
5151
----
5252

5353

54-
== Legacy Endpoints label:deprecated[]
55-
56-
[IMPORTANT]
57-
====
58-
The API described in this section of the manual has been deprecated and will be removed in Neo4j 5.0.
59-
====
60-
61-
Starting with Neo4j version 4.3, statements submitted via these endpoints will be processed by the user's respective _home database_.
62-
Previous versions rely on the the globally configured _default database_.
63-
64-
_Example request_
65-
66-
* *+POST+* +http://localhost:7474/db/neo4j/tx/commit+
67-
* *+Accept:+* +application/json;charset=UTF-8+
68-
* *+Content-Type:+* +application/json+
69-
70-
[source, JSON, role="nocopy"]
71-
----
72-
{
73-
"statements": [
74-
{
75-
"statement": "MATCH (n) WHERE id(n) = $nodeId RETURN n",
76-
"parameters": {
77-
"nodeId": 2
78-
}
79-
}
80-
]
81-
}
82-
----
83-
84-
_Example response_
85-
86-
* *+200:+* +OK+
87-
* *+Content-Type:+* +application/json;charset=utf-8+
88-
89-
[source, JSON, role="nocopy"]
90-
----
91-
{
92-
"results" : [ {
93-
"columns" : [ "n" ],
94-
"data" : [ {
95-
"row" : [ { } ],
96-
"meta" : [ {
97-
"id" : 2,
98-
"type" : "node",
99-
"deleted" : false
100-
} ]
101-
} ]
102-
} ],
103-
"errors" : [ ]
104-
}
105-
----
106-

modules/ROOT/pages/actions/index.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ There are several _actions_ that can be performed using the Cypher transaction H
2121
* xref:actions/commit-an-open-transaction.adoc[]
2222
* xref:actions/rollback-an-open-transaction.adoc[]
2323
* xref:actions/begin-and-commit-a-transaction-in-one-request.adoc[]
24+
* xref:actions/legacy-endpoints.adoc[]
2425

2526
*Additional actions:*
2627

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
:description: Legacy endpoints.
2+
3+
[[http-api-legacy-endpoints]]
4+
= Legacy Endpoints label:deprecated[]
5+
6+
[IMPORTANT]
7+
====
8+
The API described in this section of the manual has been deprecated and will be removed in Neo4j 5.0.
9+
====
10+
11+
For backwards compatibility with neo4j 3.5, it is still possible to
12+
use the HTTP API without specifying the database in the URL. For example:
13+
14+
`http://localhost:7474/db/data/transaction/commit`.
15+
16+
Since the database is not specified, the statements will be executed against the user's _home database_.
17+
18+
All endpoints in this manual can also be executed against the legacy API where `db/<database-name>` is replaced with `db/data/transaction`. The input format and output formata are identical for both the legacy API and the current API.
19+
20+
For example beginning and commiting a transaction in a single requests looks as follows:
21+
22+
_Example request_
23+
24+
* *+POST+* +http://localhost:7474/db/data/transaction/commit+
25+
* *+Accept:+* +application/json;charset=UTF-8+
26+
* *+Content-Type:+* +application/json+
27+
28+
[source, JSON, role="nocopy"]
29+
----
30+
{
31+
"statements": [
32+
{
33+
"statement": "MATCH (n) WHERE id(n) = $nodeId RETURN n",
34+
"parameters": {
35+
"nodeId": 2
36+
}
37+
}
38+
]
39+
}
40+
----
41+
42+
_Example response_
43+
44+
* *+200:+* +OK+
45+
* *+Content-Type:+* +application/json;charset=utf-8+
46+
47+
[source, JSON, role="nocopy"]
48+
----
49+
{
50+
"results" : [ {
51+
"columns" : [ "n" ],
52+
"data" : [ {
53+
"row" : [ { } ],
54+
"meta" : [ {
55+
"id" : 2,
56+
"type" : "node",
57+
"deleted" : false
58+
} ]
59+
} ]
60+
} ],
61+
"errors" : [ ]
62+
}
63+
----
64+
65+

0 commit comments

Comments
 (0)