Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
David Kosztka
Pod
Commits
af8127dc
Unverified
Commit
af8127dc
authored
4 years ago
by
Vasili Novikov
Browse files
Options
Download
Email Patches
Plain Diff
Update HTTP API
parent
3963df38
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/HTTP_API.md
+12
-11
docs/HTTP_API.md
with
12 additions
and
11 deletions
+12
-11
docs/HTTP_API.md
+
12
-
11
View file @
af8127dc
...
...
@@ -193,7 +193,7 @@ Mark an item as deleted:
### POST /v2/$owner_key/insert_tree
```
json
5
```
json
{
"databaseKey"
:
"2DD29CA851E7B56E4697B0E1F08507293D761A05CE4D1B628663F411A8086D99"
,
"payload"
:
{
/*
item
definition
(see
below)
*/
}
...
...
@@ -201,33 +201,34 @@ Mark an item as deleted:
```
Insert a tree with edges (of arbitrary depth) in one batch.
Each item should either be "a reference"
, e.g.
an object with only
`uid`
and
`_edges`
fields,
or a full item which w
ould
then be created.
Each item should either be "a reference"
(
an object with only
`uid`
and
`_edges`
fields
)
,
or a full item which w
ill
then be created.
"Reference"
type of items
look like that
"Reference"
objects should
look like that
(the
`uid`
property mandatory, no other properties are present):
```
json
5
```
json
{
"uid"
:
123456789
/*
uid
of
the
item
to
create
edge
with
*/
,
"_edges"
:
[
/*
see
below
edges
definition*/
]
}
```
And in order to insert an item, specify all its properties (
`uid`
is optional in this case):
```
json5
Items which have other properties besides
`uid`
and
`_edges`
will be
considered new and will be created. For example:
```
json
{
"_type"
:
"SomeItemType"
,
"_edges": [ /* see below edges definition*/ ],
/*
other
item
properties
here
*/
"_edges"
:
[
/*
see
below
edges
definition*/
],
}
```
Each edge in the array above
is required to
have the following form:
```
json
5
Each edge in the array above
should
have the following form:
```
json
{
"_type"
:
"SomeEdgeType"
,
"_target": { /* item of identical structure to the above */ }
/*
optional
edge
properties
here
*/
"_target"
:
{
/*
item
of
identical
structure
to
the
above
*/
}
}
```
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment