1
0
Fork 0

release version 2.3.0-alpha1

This commit is contained in:
Frank Celler 2014-09-14 17:17:00 +02:00
parent c34ff6130b
commit f1d8aafddf
34 changed files with 26447 additions and 158 deletions

View File

@ -1,4 +1,4 @@
v2.3.0 (XXXX-XX-XX)
v2.3.0-alpha1 (XXXX-XX-XX)
-------------------
* Added a _relation function in the general-graph module.

9268
Makefile.in Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
2.2.0
2.3.0-alpha1

1188
aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
#define TRI_VERSION "2.3.0-devel"
#define TRI_VERSION "2.3.0-alpha1"

347
config/compile Executable file
View File

@ -0,0 +1,347 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

1568
config/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

1793
config/config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

791
config/depcomp Executable file
View File

@ -0,0 +1,791 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2013-05-30.07; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by 'PROGRAMS ARGS'.
object Object file output by 'PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputting dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
# Get the directory component of the given path, and save it in the
# global variables '$dir'. Note that this directory component will
# be either empty or ending with a '/' character. This is deliberate.
set_dir_from ()
{
case $1 in
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
*) dir=;;
esac
}
# Get the suffix-stripped basename of the given path, and save it the
# global variable '$base'.
set_base_from ()
{
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
}
# If no dependency file was actually created by the compiler invocation,
# we still have to create a dummy depfile, to avoid errors with the
# Makefile "include basename.Plo" scheme.
make_dummy_depfile ()
{
echo "#dummy" > "$depfile"
}
# Factor out some common post-processing of the generated depfile.
# Requires the auxiliary global variable '$tmpdepfile' to be set.
aix_post_process_depfile ()
{
# If the compiler actually managed to produce a dependency file,
# post-process it.
if test -f "$tmpdepfile"; then
# Each line is of the form 'foo.o: dependency.h'.
# Do two passes, one to just change these to
# $object: dependency.h
# and one to simply output
# dependency.h:
# which is needed to avoid the deleted-header problem.
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
} > "$depfile"
rm -f "$tmpdepfile"
else
make_dummy_depfile
fi
}
# A tabulation character.
tab=' '
# A newline character.
nl='
'
# Character ranges might be problematic outside the C locale.
# These definitions help.
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
lower=abcdefghijklmnopqrstuvwxyz
digits=0123456789
alpha=${upper}${lower}
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Avoid interferences from the environment.
gccflag= dashmflag=
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvisualcpp
fi
if test "$depmode" = msvc7msys; then
# This is just like msvc7 but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvc7
fi
if test "$depmode" = xlc; then
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
gccflag=-qmakedep=gcc,-MF
depmode=gcc
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
## (see the conditional assignment to $gccflag above).
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say). Also, it might not be
## supported by the other compilers which use the 'gcc' depmode.
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
# The second -e expression handles DOS-style file names with drive
# letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the "deleted header file" problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
## Some versions of gcc put a space before the ':'. On the theory
## that the space means something, we add a space to the output as
## well. hp depmode also adds that space, but also prefixes the VPATH
## to the object. Take care to not repeat it in the output.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like '#:fec' to the end of the
# dependency line.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
| tr "$nl" ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> "$depfile"
else
make_dummy_depfile
fi
rm -f "$tmpdepfile"
;;
xlc)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts '$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
aix_post_process_depfile
;;
tcc)
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
# FIXME: That version still under development at the moment of writing.
# Make that this statement remains true also for stable, released
# versions.
# It will wrap lines (doesn't matter whether long or short) with a
# trailing '\', as in:
#
# foo.o : \
# foo.c \
# foo.h \
#
# It will put a trailing '\' even on the last line, and will use leading
# spaces rather than leading tabs (at least since its commit 0394caf7
# "Emit spaces for -MD").
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
# We have to change lines of the first kind to '$object: \'.
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
# And for each line of the second kind, we have to emit a 'dep.h:'
# dummy dependency, to avoid the deleted-header problem.
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
rm -f "$tmpdepfile"
;;
## The order of this option in the case statement is important, since the
## shell code in configure will try each of these formats in the order
## listed in this file. A plain '-MD' option would be understood by many
## compilers, so we must ensure this comes after the gcc and icc options.
pgcc)
# Portland's C compiler understands '-MD'.
# Will always output deps to 'file.d' where file is the root name of the
# source file under compilation, even if file resides in a subdirectory.
# The object file name does not affect the name of the '.d' file.
# pgcc 10.2 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using '\' :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
set_dir_from "$object"
# Use the source, not the object, to determine the base name, since
# that's sadly what pgcc will do too.
set_base_from "$source"
tmpdepfile=$base.d
# For projects that build the same source file twice into different object
# files, the pgcc approach of using the *source* file root name can cause
# problems in parallel builds. Use a locking strategy to avoid stomping on
# the same $tmpdepfile.
lockdir=$base.d-lock
trap "
echo '$0: caught signal, cleaning up...' >&2
rmdir '$lockdir'
exit 1
" 1 2 13 15
numtries=100
i=$numtries
while test $i -gt 0; do
# mkdir is a portable test-and-set.
if mkdir "$lockdir" 2>/dev/null; then
# This process acquired the lock.
"$@" -MD
stat=$?
# Release the lock.
rmdir "$lockdir"
break
else
# If the lock is being held by a different process, wait
# until the winning process is done or we timeout.
while test -d "$lockdir" && test $i -gt 0; do
sleep 1
i=`expr $i - 1`
done
fi
i=`expr $i - 1`
done
trap - 1 2 13 15
if test $i -le 0; then
echo "$0: failed to acquire lock after $numtries attempts" >&2
echo "$0: check lockdir '$lockdir'" >&2
exit 1
fi
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
# Add 'dependent.h:' lines.
sed -ne '2,${
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
else
make_dummy_depfile
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in 'foo.d' instead, so we check for that too.
# Subdirectories are respected.
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
# Libtool generates 2 separate objects for the 2 libraries. These
# two compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir$base.o.d # libtool 1.5
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
# Same post-processing that is required for AIX mode.
aix_post_process_depfile
;;
msvc7)
if test "$libtool" = yes; then
showIncludes=-Wc,-showIncludes
else
showIncludes=-showIncludes
fi
"$@" $showIncludes > "$tmpdepfile"
stat=$?
grep -v '^Note: including file: ' "$tmpdepfile"
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
# The first sed program below extracts the file names and escapes
# backslashes for cygpath. The second sed program outputs the file
# name when reading, but also accumulates all include files in the
# hold buffer in order to output them again at the end. This only
# works with sed implementations that can handle large buffers.
sed < "$tmpdepfile" -n '
/^Note: including file: *\(.*\)/ {
s//\1/
s/\\/\\\\/g
p
}' | $cygpath_u | sort -u | sed -n '
s/ /\\ /g
s/\(.*\)/'"$tab"'\1 \\/p
s/.\(.*\) \\/\1:/
H
$ {
s/.*/'"$tab"'/
G
p
}' >> "$depfile"
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
rm -f "$tmpdepfile"
;;
msvc7msys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove '-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for ':'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
"$@" $dashmflag |
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this sed invocation
# correctly. Breaking it into two sed invocations is a workaround.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no eat=no
for arg
do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
if test $eat = yes; then
eat=no
continue
fi
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-arch)
eat=yes ;;
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
# makedepend may prepend the VPATH from the source file name to the object.
# No need to regex-escape $object, excess matching of '.' is harmless.
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process the last invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed '1,2d' "$tmpdepfile" \
| tr ' ' "$nl" \
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove '-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E \
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
| sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
IFS=" "
for arg
do
case "$arg" in
-o)
shift
;;
$object)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E 2>/dev/null |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
echo "$tab" >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvcmsys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

527
config/install-sh Executable file
View File

@ -0,0 +1,527 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names problematic for 'test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift
$posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

215
config/missing Executable file
View File

@ -0,0 +1,215 @@
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
scriptversion=2013-10-28.13; # UTC
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try '$0 --help' for more information"
exit 1
fi
case $1 in
--is-lightweight)
# Used by our autoconf macros to check whether the available missing
# script is modern enough.
exit 0
;;
--run)
# Back-compat with the calling convention used by older automake.
shift
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
to PROGRAM being missing or too old.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
Supported PROGRAM values:
aclocal autoconf autoheader autom4te automake makeinfo
bison yacc flex lex help2man
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
'g' are ignored when checking the name.
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
echo 1>&2 "$0: unknown '$1' option"
echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
esac
# Run the given program, remember its exit status.
"$@"; st=$?
# If it succeeded, we are done.
test $st -eq 0 && exit 0
# Also exit now if we it failed (or wasn't found), and '--version' was
# passed; such an option is passed most likely to detect whether the
# program is present and works.
case $2 in --version|--help) exit $st;; esac
# Exit code 63 means version mismatch. This often happens when the user
# tries to use an ancient version of a tool on a file that requires a
# minimum version.
if test $st -eq 63; then
msg="probably too old"
elif test $st -eq 127; then
# Program was missing.
msg="missing on your system"
else
# Program was found and executed, but failed. Give up.
exit $st
fi
perl_URL=http://www.perl.org/
flex_URL=http://flex.sourceforge.net/
gnu_software_URL=http://www.gnu.org/software
program_details ()
{
case $1 in
aclocal|automake)
echo "The '$1' program is part of the GNU Automake package:"
echo "<$gnu_software_URL/automake>"
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
echo "<$gnu_software_URL/autoconf>"
echo "<$gnu_software_URL/m4/>"
echo "<$perl_URL>"
;;
autoconf|autom4te|autoheader)
echo "The '$1' program is part of the GNU Autoconf package:"
echo "<$gnu_software_URL/autoconf/>"
echo "It also requires GNU m4 and Perl in order to run:"
echo "<$gnu_software_URL/m4/>"
echo "<$perl_URL>"
;;
esac
}
give_advice ()
{
# Normalize program name to check for.
normalized_program=`echo "$1" | sed '
s/^gnu-//; t
s/^gnu//; t
s/^g//; t'`
printf '%s\n' "'$1' is $msg."
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
case $normalized_program in
autoconf*)
echo "You should only need it if you modified 'configure.ac',"
echo "or m4 files included by it."
program_details 'autoconf'
;;
autoheader*)
echo "You should only need it if you modified 'acconfig.h' or"
echo "$configure_deps."
program_details 'autoheader'
;;
automake*)
echo "You should only need it if you modified 'Makefile.am' or"
echo "$configure_deps."
program_details 'automake'
;;
aclocal*)
echo "You should only need it if you modified 'acinclude.m4' or"
echo "$configure_deps."
program_details 'aclocal'
;;
autom4te*)
echo "You might have modified some maintainer files that require"
echo "the 'autom4te' program to be rebuilt."
program_details 'autom4te'
;;
bison*|yacc*)
echo "You should only need it if you modified a '.y' file."
echo "You may want to install the GNU Bison package:"
echo "<$gnu_software_URL/bison/>"
;;
lex*|flex*)
echo "You should only need it if you modified a '.l' file."
echo "You may want to install the Fast Lexical Analyzer package:"
echo "<$flex_URL>"
;;
help2man*)
echo "You should only need it if you modified a dependency" \
"of a man page."
echo "You may want to install the GNU Help2man package:"
echo "<$gnu_software_URL/help2man/>"
;;
makeinfo*)
echo "You should only need it if you modified a '.texi' file, or"
echo "any other file indirectly affecting the aspect of the manual."
echo "You might want to install the Texinfo package:"
echo "<$gnu_software_URL/texinfo/>"
echo "The spurious makeinfo call might also be the consequence of"
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
echo "want to install GNU make:"
echo "<$gnu_software_URL/make/>"
;;
*)
echo "You might have modified some files without having the proper"
echo "tools for further handling them. Check the 'README' file, it"
echo "often tells you about the needed prerequisites for installing"
echo "this package. You may also peek at any GNU archive site, in"
echo "case some other package contains this missing '$1' program."
;;
esac
}
give_advice "$1" | sed -e '1s/^/WARNING: /' \
-e '2,$s/^/ /' >&2
# Propagate the correct exit status (expected to be 127 for a program
# not found, 63 for a program that failed due to version mismatch).
exit $st
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

10566
configure vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@ dnl ============================================================================
dnl --SECTION-- triAGENS GmbH Build Environment
dnl ============================================================================
AC_INIT([triAGENS ArangoDB], [2.3.0-devel], [info@triagens.de], [arangodb], [http://www.arangodb.org])
AC_INIT([triAGENS ArangoDB], [2.3.0-alpha1], [info@triagens.de], [arangodb], [http://www.arangodb.org])
dnl ----------------------------------------------------------------------------
dnl auxillary directory for install-sh and missing

View File

@ -1,6 +1,6 @@
{
"swaggerVersion": "1.1",
"apiVersion": "2.2.0",
"apiVersion": "2.3.0-alpha1",
"apis": [
{
"path": "api-docs/aqlfunction.{format}",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -36,7 +36,7 @@
"notes": "The query details include the query string plus optional query options and bind parameters. These values need to be passed in a JSON representation in the body of the POST request. <br><br> The following attributes can be used inside the JSON object: <br><br> <ul class=\"swagger-list\"><li><em>query</em>: contains the query string to be executed (mandatory) <li><em>count</em>: boolean flag that indicates whether the number of documents in the result set should be returned in the \"count\" attribute of the result (optional). Calculating the \"count\" attribute might in the future have a performance impact for some queries so this option is turned off by default, and \"count\" is only returned when requested. <li><em>batchSize</em>: maximum number of result documents to be transferred from the server to the client in one roundtrip (optional). If this attribute is not set, a server-controlled default value will be used. <li><em>ttl</em>: an optional time-to-live for the cursor (in seconds). The cursor will be removed on the server automatically after the specified amount of time. This is useful to ensure garbage collection of cursors that are not fully fetched by clients. If not set, a server-defined value will be used. <li><em>bindVars</em>: key/value list of bind parameters (optional). <li><em>options</em>: key/value list of extra options for the query (optional). </ul> The following options are supported at the moment: <br><br> <ul class=\"swagger-list\"><li><em>fullCount</em>: if set to <em>true</em> and the query contains a <em>LIMIT</em> clause, then the result will contain an extra attribute <em>extra</em> with a sub-attribute <em>fullCount</em>. This sub-attribute will contain the number of documents in the result before the last LIMIT in the query was applied. It can be used to count the number of documents that match certain filter criteria, but only return a subset of them, in one go. It is thus similar to MySQL's <em>SQL_CALC_FOUND_ROWS</em> hint. Note that setting the option will disable a few LIMIT optimizations and may lead to more documents being processed, and thus make queries run longer. Note that the <em>fullCount</em> sub-attribute will only be present in the result if the query has a LIMIT clause and the LIMIT clause is actually used in the query. </ul> If the result set can be created by the server, the server will respond with <em>HTTP 201</em>. The body of the response will contain a JSON object with the result set. <br><br> The returned JSON object has the following properties: <br><br> <ul class=\"swagger-list\"><li><em>error</em>: boolean flag to indicate that an error occurred (<em>false</em> in this case) <li><em>code</em>: the HTTP status code <li><em>result</em>: an array of result documents (might be empty if query has no results) <li><em>hasMore</em>: a boolean indicator whether there are more results available for the cursor on the server <li><em>count</em>: the total number of result documents available (only available if the query was executed with the <em>count</em> attribute set) <li><em>id</em>: id of temporary cursor created on the server (optional, see above) <li><em>extra</em>: an optional JSON object with extra information about the query result. For data-modification queries, the <em>extra</em> attribute will contain the number of modified documents and the number of documents that could not be modified due to an error (if <em>ignoreErrors</em> query option is specified) </ul> If the JSON representation is malformed or the query specification is missing from the request, the server will respond with <em>HTTP 400</em>. <br><br> The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case) <li><em>code</em>: the HTTP status code <li><em>errorNum</em>: the server error number <li><em>errorMessage</em>: a descriptive error message </ul> If the query specification is complete, the server will process the query. If an error occurs during query processing, the server will respond with <em>HTTP 400</em>. Again, the body of the response will contain details about the error. <br><br> A list of query errors can be found (../ArangoErrors/README.md) here. <br><br>",
"summary": " Create cursor",
"httpMethod": "POST",
"examples": "<br><br> Executes a query and extract the result in a single go: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 2 RETURN p\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/835657222\", \n \"_rev\" : \"835657222\", \n \"_key\" : \"835657222\", \n \"hello1\" : \"world1\" \n }, \n { \n \"_id\" : \"products/835984902\", \n \"_rev\" : \"835984902\", \n \"_key\" : \"835984902\", \n \"hello2\" : \"world1\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Executes a query and extracts part of the result: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 5 RETURN p\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/837885446\", \n \"_rev\" : \"837885446\", \n \"_key\" : \"837885446\", \n \"hello5\" : \"world1\" \n }, \n { \n \"_id\" : \"products/836902406\", \n \"_rev\" : \"836902406\", \n \"_key\" : \"836902406\", \n \"hello2\" : \"world1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"838082054\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Using a query option: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR i IN 1..1000 FILTER i > 500 LIMIT 10 RETURN i\",\"count\":true,\"options\":{\"fullCount\":true}}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n 501, \n 502, \n 503, \n 504, \n 505, \n 506, \n 507, \n 508, \n 509, \n 510 \n ], \n \"hasMore\" : false, \n \"count\" : 10, \n \"extra\" : { \n \"fullCount\" : 500 \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Executes a data-modification query and retrieves the number of modified documents: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products REMOVE p IN products\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ ], \n \"hasMore\" : false, \n \"extra\" : { \n \"operations\" : { \n \"executed\" : 2, \n \"ignored\" : 0 \n } \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Executes a data-modification query with option <em>ignoreErrors</em>: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"REMOVE 'bar' IN products OPTIONS { ignoreErrors: true }\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ ], \n \"hasMore\" : false, \n \"extra\" : { \n \"operations\" : { \n \"executed\" : 0, \n \"ignored\" : 1 \n } \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Bad queries: <br><br> Missing body: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --dump - http://localhost:8529/_api/cursor\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 1502, \n \"errorMessage\" : \"query is empty\" \n}\n</code></pre><br><br><br> Unknown collection: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR u IN unknowncoll LIMIT 2 RETURN u\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1203, \n \"errorMessage\" : \"cannot execute query: collection not found: 'unknowncoll'\" \n}\n</code></pre><br><br><br> Executes a data-modification query that attempts to remove a non-existing document: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"REMOVE 'foo' IN products\"}\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1202, \n \"errorMessage\" : \"document not found\" \n}\n</code></pre><br><br><br> @endDocuBlock",
"examples": "<br><br> Executes a query and extract the result in a single go: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 2 RETURN p\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/868692604\", \n \"_key\" : \"868692604\", \n \"_rev\" : \"868692604\", \n \"hello2\" : \"world1\" \n }, \n { \n \"_id\" : \"products/868364924\", \n \"_key\" : \"868364924\", \n \"_rev\" : \"868364924\", \n \"hello1\" : \"world1\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Executes a query and extracts part of the result: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 5 RETURN p\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/869282428\", \n \"_key\" : \"869282428\", \n \"_rev\" : \"869282428\", \n \"hello1\" : \"world1\" \n }, \n { \n \"_id\" : \"products/869610108\", \n \"_key\" : \"869610108\", \n \"_rev\" : \"869610108\", \n \"hello2\" : \"world1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"870789756\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Using a query option: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR i IN 1..1000 FILTER i > 500 LIMIT 10 RETURN i\",\"count\":true,\"options\":{\"fullCount\":true}}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n 501, \n 502, \n 503, \n 504, \n 505, \n 506, \n 507, \n 508, \n 509, \n 510 \n ], \n \"hasMore\" : false, \n \"count\" : 10, \n \"extra\" : { \n \"fullCount\" : 500 \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Executes a data-modification query and retrieves the number of modified documents: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products REMOVE p IN products\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ ], \n \"hasMore\" : false, \n \"extra\" : { \n \"operations\" : { \n \"executed\" : 2, \n \"ignored\" : 0 \n } \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Executes a data-modification query with option <em>ignoreErrors</em>: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"REMOVE 'bar' IN products OPTIONS { ignoreErrors: true }\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ ], \n \"hasMore\" : false, \n \"extra\" : { \n \"operations\" : { \n \"executed\" : 0, \n \"ignored\" : 1 \n } \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Bad queries: <br><br> Missing body: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --dump - http://localhost:8529/_api/cursor\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 1502, \n \"errorMessage\" : \"query is empty\" \n}\n</code></pre><br><br><br> Unknown collection: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR u IN unknowncoll LIMIT 2 RETURN u\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1203, \n \"errorMessage\" : \"cannot execute query: collection not found: 'unknowncoll'\" \n}\n</code></pre><br><br><br> Executes a data-modification query that attempts to remove a non-existing document: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"REMOVE 'foo' IN products\"}\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1202, \n \"errorMessage\" : \"document not found\" \n}\n</code></pre><br><br><br> @endDocuBlock",
"nickname": "CreateCursor"
}
],
@ -71,7 +71,7 @@
"notes": "<br><br> If the cursor is still alive, returns an object with the following attributes. <br><br> <ul class=\"swagger-list\"><li><em>id</em>: the <em>cursor-identifier</em> <li><em>result</em>: a list of documents for the current batch <li><em>hasMore</em>: <em>false</em> if this was the last batch <li><em>count</em>: if present the total number of elements </ul> Note that even if <em>hasMore</em> returns <em>true</em>, the next call might still return no documents. If, however, <em>hasMore</em> is <em>false</em>, then the cursor is exhausted. Once the <em>hasMore</em> attribute has a value of <em>false</em>, the client can stop. <br><br>",
"summary": " Read next batch from cursor",
"httpMethod": "PUT",
"examples": "<br><br> Valid request for next batch: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 5 RETURN p\",\"count\":true,\"batchSize\":2}\n\nshell> curl -X PUT --dump - http://localhost:8529/_api/cursor/842866182\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/841686534\", \n \"_rev\" : \"841686534\", \n \"_key\" : \"841686534\", \n \"hello2\" : \"world1\" \n }, \n { \n \"_id\" : \"products/841358854\", \n \"_rev\" : \"841358854\", \n \"_key\" : \"841358854\", \n \"hello1\" : \"world1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"842866182\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Missing identifier <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --dump - http://localhost:8529/_api/cursor\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 400, \n \"errorMessage\" : \"bad parameter\" \n}\n</code></pre><br><br><br> Unknown identifier <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --dump - http://localhost:8529/_api/cursor/123123\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1600, \n \"errorMessage\" : \"cursor not found\" \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Valid request for next batch: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 5 RETURN p\",\"count\":true,\"batchSize\":2}\n\nshell> curl -X PUT --dump - http://localhost:8529/_api/cursor/875573884\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/874721916\", \n \"_key\" : \"874721916\", \n \"_rev\" : \"874721916\", \n \"hello3\" : \"world1\" \n }, \n { \n \"_id\" : \"products/874394236\", \n \"_key\" : \"874394236\", \n \"_rev\" : \"874394236\", \n \"hello2\" : \"world1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"875573884\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Missing identifier <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --dump - http://localhost:8529/_api/cursor\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 400, \n \"errorMessage\" : \"bad parameter\" \n}\n</code></pre><br><br><br> Unknown identifier <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --dump - http://localhost:8529/_api/cursor/123123\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1600, \n \"errorMessage\" : \"cursor not found\" \n}\n</code></pre><br>@endDocuBlock",
"nickname": "ReadNextBatchFromCursor"
}
],
@ -102,7 +102,7 @@
"notes": "Deletes the cursor and frees the resources associated with it. <br><br> The cursor will automatically be destroyed on the server when the client has retrieved all documents from it. The client can also explicitly destroy the cursor at any earlier time using an HTTP DELETE request. The cursor id must be included as part of the URL. <br><br> Note: the server will also destroy abandoned cursors automatically after a certain server-controlled timeout to avoid resource leakage. <br><br>",
"summary": " Delete cursor",
"httpMethod": "DELETE",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 5 RETURN p\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/843980294\", \n \"_rev\" : \"843980294\", \n \"_key\" : \"843980294\", \n \"hello3\" : \"world1\" \n }, \n { \n \"_id\" : \"products/844307974\", \n \"_rev\" : \"844307974\", \n \"_key\" : \"844307974\", \n \"hello4\" : \"world1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"844832262\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 201 \n}\nshell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/cursor/844832262\n\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 5 RETURN p\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/876229244\", \n \"_key\" : \"876229244\", \n \"_rev\" : \"876229244\", \n \"hello1\" : \"world1\" \n }, \n { \n \"_id\" : \"products/876556924\", \n \"_key\" : \"876556924\", \n \"_rev\" : \"876556924\", \n \"hello2\" : \"world1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"877736572\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 201 \n}\nshell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/cursor/877736572\n\n</code></pre><br>@endDocuBlock",
"nickname": "DeleteCursor"
}
],

View File

@ -74,7 +74,7 @@
"notes": "Retrieves information about the current database <br><br> The response is a JSON object with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>name</em>: the name of the current database <li><em>id</em>: the id of the current database <li><em>path</em>: the filesystem path of the current database <li><em>isSystem</em>: whether or not the current database is the <em>_system</em> database",
"summary": " Information of the database",
"httpMethod": "GET",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/database/current\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : { \n \"name\" : \"_system\", \n \"id\" : \"73222\", \n \"path\" : \"/tmp/vocdir.92357/databases/database-73222\", \n \"isSystem\" : true \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/database/current\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : { \n \"name\" : \"_system\", \n \"id\" : \"78460\", \n \"path\" : \"/tmp/vocdir.31909/databases/database-78460\", \n \"isSystem\" : true \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "InformationOfTheDatabase"
}
],

View File

@ -57,7 +57,7 @@
"notes": "Creates a new document in the collection named <em>collection</em>. A JSON representation of the document must be passed as the body of the POST request. <br><br> If the document was created successfully, then the \"Location\" header contains the path to the newly created document. The \"ETag\" header field contains the revision of the document. <br><br> The body of the response contains a JSON object with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>_id</em> contains the document handle of the newly created document <li><em>_key</em> contains the document key <li><em>_rev</em> contains the document revision </ul> If the collection parameter <em>waitForSync</em> is <em>false</em>, then the call returns as soon as the document has been accepted. It will not wait until the document has been synced to disk. <br><br> Optionally, the URL parameter <em>waitForSync</em> can be used to force synchronisation of the document creation operation to disk even in case that the <em>waitForSync</em> flag had been disabled for the entire collection. Thus, the <em>waitForSync</em> URL parameter can be used to force synchronisation of just this specific operations. To use this, set the <em>waitForSync</em> parameter to <em>true</em>. If the <em>waitForSync</em> parameter is not specified or set to <em>false</em>, then the collection's default <em>waitForSync</em> behavior is applied. The <em>waitForSync</em> URL parameter cannot be used to disable synchronisation for collections that have a default <em>waitForSync</em> value of <em>true</em>. <br><br>",
"summary": "Create document",
"httpMethod": "POST",
"examples": "<br><br> Create a document given a collection named <em>products</em>. Note that the revision identifier might or might not by equal to the auto-generated key. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: \"1216552454\"\nlocation: /_db/_system/_api/document/products/1216552454\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1216552454\", \n \"_rev\" : \"1216552454\", \n \"_key\" : \"1216552454\" \n}\n</code></pre><br><br><br> Create a document in a collection named <em>products</em> with a collection-level <em>waitForSync</em> value of <em>false</em>. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1217076742\"\nlocation: /_db/_system/_api/document/products/1217076742\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1217076742\", \n \"_rev\" : \"1217076742\", \n \"_key\" : \"1217076742\" \n}\n</code></pre><br><br><br> Create a document in a collection with a collection-level <em>waitForSync</em> value of <em>false</em>, but using the <em>waitForSync</em> URL parameter. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products&waitForSync=true\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: \"1217601030\"\nlocation: /_db/_system/_api/document/products/1217601030\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1217601030\", \n \"_rev\" : \"1217601030\", \n \"_key\" : \"1217601030\" \n}\n</code></pre><br><br><br> Create a document in a new, named collection <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products&createCollection=true\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1218125318\"\nlocation: /_db/_system/_api/document/products/1218125318\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1218125318\", \n \"_rev\" : \"1218125318\", \n \"_key\" : \"1218125318\" \n}\n</code></pre><br><br><br> Unknown collection name: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"collection 'products' not found\", \n \"code\" : 404, \n \"errorNum\" : 1203 \n}\n</code></pre><br><br><br> Illegal document: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products\n{ 1: \"World\" }\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"expecting attribute name\", \n \"code\" : 400, \n \"errorNum\" : 600 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Create a document given a collection named <em>products</em>. Note that the revision identifier might or might not by equal to the auto-generated key. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: \"1297953404\"\nlocation: /_db/_system/_api/document/products/1297953404\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1297953404\", \n \"_rev\" : \"1297953404\", \n \"_key\" : \"1297953404\" \n}\n</code></pre><br><br><br> Create a document in a collection named <em>products</em> with a collection-level <em>waitForSync</em> value of <em>false</em>. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1298477692\"\nlocation: /_db/_system/_api/document/products/1298477692\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1298477692\", \n \"_rev\" : \"1298477692\", \n \"_key\" : \"1298477692\" \n}\n</code></pre><br><br><br> Create a document in a collection with a collection-level <em>waitForSync</em> value of <em>false</em>, but using the <em>waitForSync</em> URL parameter. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products&waitForSync=true\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: \"1299001980\"\nlocation: /_db/_system/_api/document/products/1299001980\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1299001980\", \n \"_rev\" : \"1299001980\", \n \"_key\" : \"1299001980\" \n}\n</code></pre><br><br><br> Create a document in a new, named collection <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products&createCollection=true\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1299526268\"\nlocation: /_db/_system/_api/document/products/1299526268\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1299526268\", \n \"_rev\" : \"1299526268\", \n \"_key\" : \"1299526268\" \n}\n</code></pre><br><br><br> Unknown collection name: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"collection 'products' not found\", \n \"code\" : 404, \n \"errorNum\" : 1203 \n}\n</code></pre><br><br><br> Illegal document: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products\n{ 1: \"World\" }\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"expecting attribute name\", \n \"code\" : 400, \n \"errorNum\" : 600 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "CreateDocument"
}
],
@ -108,7 +108,7 @@
"notes": "Returns the document identified by <em>document-handle</em>. The returned document contains two special attributes: <em>_id</em> containing the document handle and <em>_rev</em> containing the revision. <br><br>",
"summary": "Read document",
"httpMethod": "GET",
"examples": "<br><br> Use a document handle: <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1218649606\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1218649606\"\n\n{ \n \"hello\" : \"world\", \n \"_id\" : \"products/1218649606\", \n \"_rev\" : \"1218649606\", \n \"_key\" : \"1218649606\" \n}\n</code></pre><br><br><br> Use a document handle and an etag: <br><br><br><br><pre><code class=\"json\">shell> curl --header 'If-None-Match: \"1219239430\"' --dump - http://localhost:8529/_api/document/products/1219239430\n\n</code></pre><br><br><br> Unknown document handle: <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/unknownhandle\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"document /_api/document/products/unknownhandle not found\", \n \"code\" : 404, \n \"errorNum\" : 1202 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Use a document handle: <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1300050556\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1300050556\"\n\n{ \n \"hello\" : \"world\", \n \"_id\" : \"products/1300050556\", \n \"_rev\" : \"1300050556\", \n \"_key\" : \"1300050556\" \n}\n</code></pre><br><br><br> Use a document handle and an etag: <br><br><br><br><pre><code class=\"json\">shell> curl --header 'If-None-Match: \"1300640380\"' --dump - http://localhost:8529/_api/document/products/1300640380\n\n</code></pre><br><br><br> Unknown document handle: <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/unknownhandle\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"document /_api/document/products/unknownhandle not found\", \n \"code\" : 404, \n \"errorNum\" : 1202 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "ReadDocument"
}
],
@ -134,12 +134,19 @@
"required": "true",
"name": "collection",
"description": "The name of the collection. <br><br>"
},
{
"dataType": "String",
"paramType": "query",
"required": "false",
"name": "type",
"description": "The type of the result. The following values are allowed: <br><br> <ul class=\"swagger-list\"><li><em>id</em>: returns a list of document ids (<em>_id</em> attributes) <li><em>key</em>: returns a list of document keys (<em>_key</em> attributes) <li><em>path</em>: returns a list of document URI paths. This is the default."
}
],
"notes": "Returns a list of all URI for all documents from the collection identified by <em>collection</em>. <br><br>",
"notes": "Returns a list of all keys, ids, or URI paths for all documents in the collection identified by <em>collection</em>. The type of the result list is determined by the <em>type</em> attribute. <br><br> Note that the results have no defined order and thus the order should not be relied on. <br><br>",
"summary": "Read all documents",
"httpMethod": "GET",
"examples": "<br><br> Returns a all ids. <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/?collection=products\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"documents\" : [ \n \"/_api/document/products/1220550150\", \n \"/_api/document/products/1220222470\", \n \"/_api/document/products/1219894790\" \n ] \n}\n</code></pre><br><br><br> Collection does not exist. <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/?collection=doesnotexist\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"collection 'doesnotexist' not found\", \n \"code\" : 404, \n \"errorNum\" : 1203 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Returns all document paths <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/?collection=products\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"documents\" : [ \n \"/_api/document/products/1301623420\", \n \"/_api/document/products/1301295740\", \n \"/_api/document/products/1301951100\" \n ] \n}\n</code></pre><br><br><br> Returns all document keys <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/?collection=products&type=key\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"documents\" : [ \n \"1302868604\", \n \"1302540924\", \n \"1303196284\" \n ] \n}\n</code></pre><br><br><br> Collection does not exist. <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/?collection=doesnotexist\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"collection 'doesnotexist' not found\", \n \"code\" : 404, \n \"errorNum\" : 1203 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "ReadAllDocuments"
}
],
@ -197,7 +204,7 @@
"notes": "Like <em>GET</em>, but only returns the header fields and not the body. You can use this call to get the current revision of a document or check if the document was deleted. <br><br>",
"summary": "Read document header",
"httpMethod": "HEAD",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X HEAD --data-binary @- --dump - http://localhost:8529/_api/document/products/1221139974\n\n</code></pre><br>@endDocuBlock @endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X HEAD --data-binary @- --dump - http://localhost:8529/_api/document/products/1303786108\n\n</code></pre><br>@endDocuBlock @endDocuBlock",
"nickname": "ReadDocumentHeader"
}
],
@ -274,7 +281,7 @@
"notes": "Completely updates (i.e. replaces) the document identified by <em>document-handle</em>. If the document exists and can be updated, then a <em>HTTP 201</em> is returned and the \"ETag\" header field contains the new revision of the document. <br><br> If the new document passed in the body of the request contains the <em>document-handle</em> in the attribute <em>_id</em> and the revision in <em>_rev</em>, these attributes will be ignored. Only the URI and the \"ETag\" header are relevant in order to avoid confusion when using proxies. <br><br> Optionally, the URL parameter <em>waitForSync</em> can be used to force synchronisation of the document replacement operation to disk even in case that the <em>waitForSync</em> flag had been disabled for the entire collection. Thus, the <em>waitForSync</em> URL parameter can be used to force synchronisation of just specific operations. To use this, set the <em>waitForSync</em> parameter to <em>true</em>. If the <em>waitForSync</em> parameter is not specified or set to <em>false</em>, then the collection's default <em>waitForSync</em> behavior is applied. The <em>waitForSync</em> URL parameter cannot be used to disable synchronisation for collections that have a default <em>waitForSync</em> value of <em>true</em>. <br><br> The body of the response contains a JSON object with the information about the handle and the revision. The attribute <em>_id</em> contains the known <em>document-handle</em> of the updated document, the attribute <em>_rev</em> contains the new document revision. <br><br> If the document does not exist, then a <em>HTTP 404</em> is returned and the body of the response contains an error document. <br><br> There are two ways for specifying the targeted document revision id for conditional replacements (i.e. replacements that will only be executed if the revision id found in the database matches the document revision id specified in the request): <ul class=\"swagger-list\"><li>specifying the target revision in the <em>rev</em> URL query parameter <li>specifying the target revision in the <em>if-match</em> HTTP header </ul> Specifying a target revision is optional, however, if done, only one of the described mechanisms must be used (either the <em>rev</em> URL parameter or the <em>if-match</em> HTTP header). Regardless which mechanism is used, the parameter needs to contain the target document revision id as returned in the <em>_rev</em> attribute of a document or by an HTTP <em>etag</em> header. <br><br> For example, to conditionally replace a document based on a specific revision id, you can use the following request: <br><br> <em>PUT /_api/document/document-handle?rev=etag</em> <br><br> If a target revision id is provided in the request (e.g. via the <em>etag</em> value in the <em>rev</em> URL query parameter above), ArangoDB will check that the revision id of the document found in the database is equal to the target revision id provided in the request. If there is a mismatch between the revision id, then by default a <em>HTTP 412</em> conflict is returned and no replacement is performed. <br><br> The conditional update behavior can be overriden with the <em>policy</em> URL query parameter: <br><br> <em>PUT /_api/document/document-handle?policy=policy</em> <br><br> If <em>policy</em> is set to <em>error</em>, then the behavior is as before: replacements will fail if the revision id found in the database does not match the target revision id specified in the request. <br><br> If <em>policy</em> is set to <em>last</em>, then the replacement will succeed, even if the revision id found in the database does not match the target revision id specified in the request. You can use the <em>last</em> *policy* to force replacements. <br><br>",
"summary": "Replace document",
"httpMethod": "PUT",
"examples": "<br><br> Using document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1221729798\n{\"Hello\": \"you\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1222057478\"\nlocation: /_db/_system/_api/document/products/1221729798\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1221729798\", \n \"_rev\" : \"1222057478\", \n \"_key\" : \"1221729798\" \n}\n</code></pre><br><br><br> Unknown document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1222581766\n{}\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"document /_api/document/products/1222581766 not found\", \n \"code\" : 404, \n \"errorNum\" : 1202 \n}\n</code></pre><br><br><br> Produce a revision conflict: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --header 'If-Match: \"1223826950\"' --data-binary @- --dump - http://localhost:8529/_api/document/products/1223499270\n{\"other\":\"content\"}\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\netag: \"1223499270\"\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/1223499270\", \n \"_rev\" : \"1223499270\", \n \"_key\" : \"1223499270\" \n}\n</code></pre><br><br><br> Last write wins: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --header 'If-Match: \"1224941062\"' --data-binary @- --dump - http://localhost:8529/_api/document/products/1224613382?policy=last\n{}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1225203206\"\nlocation: /_db/_system/_api/document/products/1224613382\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1224613382\", \n \"_rev\" : \"1225203206\", \n \"_key\" : \"1224613382\" \n}\n</code></pre><br><br><br> Alternative to header field: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1225727494?rev=1226055174\n{\"other\":\"content\"}\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\netag: \"1225727494\"\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/1225727494\", \n \"_rev\" : \"1225727494\", \n \"_key\" : \"1225727494\" \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Using document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1304375932\n{\"Hello\": \"you\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1304703612\"\nlocation: /_db/_system/_api/document/products/1304375932\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1304375932\", \n \"_rev\" : \"1304703612\", \n \"_key\" : \"1304375932\" \n}\n</code></pre><br><br><br> Unknown document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1305227900\n{}\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"document /_api/document/products/1305227900 not found\", \n \"code\" : 404, \n \"errorNum\" : 1202 \n}\n</code></pre><br><br><br> Produce a revision conflict: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --header 'If-Match: \"1306473084\"' --data-binary @- --dump - http://localhost:8529/_api/document/products/1306145404\n{\"other\":\"content\"}\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\netag: \"1306145404\"\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/1306145404\", \n \"_rev\" : \"1306145404\", \n \"_key\" : \"1306145404\" \n}\n</code></pre><br><br><br> Last write wins: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --header 'If-Match: \"1307587196\"' --data-binary @- --dump - http://localhost:8529/_api/document/products/1307259516?policy=last\n{}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1307849340\"\nlocation: /_db/_system/_api/document/products/1307259516\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1307259516\", \n \"_rev\" : \"1307849340\", \n \"_key\" : \"1307259516\" \n}\n</code></pre><br><br><br> Alternative to header field: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1308373628?rev=1308701308\n{\"other\":\"content\"}\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\netag: \"1308373628\"\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/1308373628\", \n \"_rev\" : \"1308373628\", \n \"_key\" : \"1308373628\" \n}\n</code></pre><br>@endDocuBlock",
"nickname": "ReplaceDocument"
}
],
@ -358,7 +365,7 @@
"notes": "Partially updates the document identified by <em>document-handle</em>. The body of the request must contain a JSON document with the attributes to patch (the patch document). All attributes from the patch document will be added to the existing document if they do not yet exist, and overwritten in the existing document if they do exist there. <br><br> Setting an attribute value to <em>null</em> in the patch document will cause a value of <em>null</em> be saved for the attribute by default. <br><br> Optionally, the URL parameter <em>waitForSync</em> can be used to force synchronisation of the document update operation to disk even in case that the <em>waitForSync</em> flag had been disabled for the entire collection. Thus, the <em>waitForSync</em> URL parameter can be used to force synchronisation of just specific operations. To use this, set the <em>waitForSync</em> parameter to <em>true</em>. If the <em>waitForSync</em> parameter is not specified or set to <em>false</em>, then the collection's default <em>waitForSync</em> behavior is applied. The <em>waitForSync</em> URL parameter cannot be used to disable synchronisation for collections that have a default <em>waitForSync</em> value of <em>true</em>. <br><br> The body of the response contains a JSON object with the information about the handle and the revision. The attribute <em>_id</em> contains the known <em>document-handle</em> of the updated document, the attribute <em>_rev</em> contains the new document revision. <br><br> If the document does not exist, then a <em>HTTP 404</em> is returned and the body of the response contains an error document. <br><br> You can conditionally update a document based on a target revision id by using either the <em>rev</em> URL parameter or the <em>if-match</em> HTTP header. To control the update behavior in case there is a revision mismatch, you can use the <em>policy</em> parameter. This is the same as when replacing documents (see replacing documents for details). <br><br>",
"summary": " Patch document",
"httpMethod": "PATCH",
"examples": "<br><br> patches an existing document with new content. <br><br><br><br><pre><code class=\"json\">shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1226841606\n{ \n \"hello\" : \"world\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1227169286\"\nlocation: /_db/_system/_api/document/products/1226841606\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1226841606\", \n \"_rev\" : \"1227169286\", \n \"_key\" : \"1226841606\" \n}\nshell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1226841606\n{ \n \"numbers\" : { \n \"one\" : 1, \n \"two\" : 2, \n \"three\" : 3, \n \"empty\" : null \n } \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1227759110\"\nlocation: /_db/_system/_api/document/products/1226841606\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1226841606\", \n \"_rev\" : \"1227759110\", \n \"_key\" : \"1226841606\" \n}\nshell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1226841606\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1227759110\"\n\n{ \n \"one\" : \"world\", \n \"hello\" : \"world\", \n \"numbers\" : { \n \"empty\" : null, \n \"one\" : 1, \n \"two\" : 2, \n \"three\" : 3 \n }, \n \"_id\" : \"products/1226841606\", \n \"_rev\" : \"1227759110\", \n \"_key\" : \"1226841606\" \n}\nshell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1226841606?keepNull=false\n{ \n \"hello\" : null, \n \"numbers\" : { \n \"four\" : 4 \n } \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1228217862\"\nlocation: /_db/_system/_api/document/products/1226841606\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1226841606\", \n \"_rev\" : \"1228217862\", \n \"_key\" : \"1226841606\" \n}\nshell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1226841606\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1228217862\"\n\n{ \n \"one\" : \"world\", \n \"numbers\" : { \n \"empty\" : null, \n \"one\" : 1, \n \"two\" : 2, \n \"three\" : 3, \n \"four\" : 4 \n }, \n \"_id\" : \"products/1226841606\", \n \"_rev\" : \"1228217862\", \n \"_key\" : \"1226841606\" \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> patches an existing document with new content. <br><br><br><br><pre><code class=\"json\">shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1309487740\n{ \n \"hello\" : \"world\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1309815420\"\nlocation: /_db/_system/_api/document/products/1309487740\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1309487740\", \n \"_rev\" : \"1309815420\", \n \"_key\" : \"1309487740\" \n}\nshell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1309487740\n{ \n \"numbers\" : { \n \"one\" : 1, \n \"two\" : 2, \n \"three\" : 3, \n \"empty\" : null \n } \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1310405244\"\nlocation: /_db/_system/_api/document/products/1309487740\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1309487740\", \n \"_rev\" : \"1310405244\", \n \"_key\" : \"1309487740\" \n}\nshell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1309487740\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1310405244\"\n\n{ \n \"one\" : \"world\", \n \"hello\" : \"world\", \n \"numbers\" : { \n \"empty\" : null, \n \"one\" : 1, \n \"two\" : 2, \n \"three\" : 3 \n }, \n \"_id\" : \"products/1309487740\", \n \"_rev\" : \"1310405244\", \n \"_key\" : \"1309487740\" \n}\nshell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1309487740?keepNull=false\n{ \n \"hello\" : null, \n \"numbers\" : { \n \"four\" : 4 \n } \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1310863996\"\nlocation: /_db/_system/_api/document/products/1309487740\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1309487740\", \n \"_rev\" : \"1310863996\", \n \"_key\" : \"1309487740\" \n}\nshell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1309487740\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1310863996\"\n\n{ \n \"one\" : \"world\", \n \"numbers\" : { \n \"empty\" : null, \n \"one\" : 1, \n \"two\" : 2, \n \"three\" : 3, \n \"four\" : 4 \n }, \n \"_id\" : \"products/1309487740\", \n \"_rev\" : \"1310863996\", \n \"_key\" : \"1309487740\" \n}\n</code></pre><br>@endDocuBlock",
"nickname": "PatchDocument"
}
],
@ -424,7 +431,7 @@
"notes": "The body of the response contains a JSON object with the information about the handle and the revision. The attribute <em>_id</em> contains the known <em>document-handle</em> of the deleted document, the attribute <em>_rev</em> contains the document revision. <br><br> If the <em>waitForSync</em> parameter is not specified or set to <em>false</em>, then the collection's default <em>waitForSync</em> behavior is applied. The <em>waitForSync</em> URL parameter cannot be used to disable synchronisation for collections that have a default <em>waitForSync</em> value of <em>true</em>. <br><br>",
"summary": " Deletes document",
"httpMethod": "DELETE",
"examples": "<br><br> Using document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/document/products/1228807686\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1228807686\", \n \"_rev\" : \"1228807686\", \n \"_key\" : \"1228807686\" \n}\n</code></pre><br><br><br> Unknown document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/document/products/1229528582\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"document /_api/document/products/1229528582 not found\", \n \"code\" : 404, \n \"errorNum\" : 1202 \n}\n</code></pre><br><br><br> Revision conflict: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --header 'If-Match: \"1230708230\"' --dump - http://localhost:8529/_api/document/products/1230380550\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\netag: \"1230380550\"\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/1230380550\", \n \"_rev\" : \"1230380550\", \n \"_key\" : \"1230380550\" \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Using document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/document/products/1311453820\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1311453820\", \n \"_rev\" : \"1311453820\", \n \"_key\" : \"1311453820\" \n}\n</code></pre><br><br><br> Unknown document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/document/products/1312174716\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"document /_api/document/products/1312174716 not found\", \n \"code\" : 404, \n \"errorNum\" : 1202 \n}\n</code></pre><br><br><br> Revision conflict: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --header 'If-Match: \"1313354364\"' --dump - http://localhost:8529/_api/document/products/1313026684\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\netag: \"1313026684\"\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/1313026684\", \n \"_rev\" : \"1313026684\", \n \"_key\" : \"1313026684\" \n}\n</code></pre><br>@endDocuBlock",
"nickname": "DeletesDocument"
}
],

View File

@ -71,7 +71,7 @@
"notes": "Creates a new edge document in the collection named <em>collection</em>. A JSON representation of the document must be passed as the body of the POST request. <br><br> The <em>from</em> and <em>to</em> handles are immutable once the edge has been created. <br><br> In all other respects the method works like <em>POST /document</em>. <br><br>",
"summary": "Create edge",
"httpMethod": "POST",
"examples": "<br><br> Create an edge and read it back: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/edge/?collection=edges&from=vertices/1&to=vertices/2\n{ \n \"name\" : \"Emil\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1233067526\"\nlocation: /_db/_system/_api/document/edges/1233067526\n\n{ \n \"error\" : false, \n \"_id\" : \"edges/1233067526\", \n \"_rev\" : \"1233067526\", \n \"_key\" : \"1233067526\" \n}\nshell> curl --data-binary @- --dump - http://localhost:8529/_api/edge/edges/1233067526\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1233067526\"\n\n{ \n \"name\" : \"Emil\", \n \"_id\" : \"edges/1233067526\", \n \"_rev\" : \"1233067526\", \n \"_key\" : \"1233067526\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/2\" \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Create an edge and read it back: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/edge/?collection=edges&from=vertices/1&to=vertices/2\n{ \n \"name\" : \"Emil\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1315713660\"\nlocation: /_db/_system/_api/document/edges/1315713660\n\n{ \n \"error\" : false, \n \"_id\" : \"edges/1315713660\", \n \"_rev\" : \"1315713660\", \n \"_key\" : \"1315713660\" \n}\nshell> curl --data-binary @- --dump - http://localhost:8529/_api/edge/edges/1315713660\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1315713660\"\n\n{ \n \"name\" : \"Emil\", \n \"_id\" : \"edges/1315713660\", \n \"_rev\" : \"1315713660\", \n \"_key\" : \"1315713660\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/2\" \n}\n</code></pre><br>@endDocuBlock",
"nickname": "CreateEdge"
}
],

View File

@ -33,7 +33,7 @@
"notes": "Returns the list of edges starting or ending in the vertex identified by <em>vertex-handle</em>. <br><br>",
"summary": " Read in- or outbound edges",
"httpMethod": "GET",
"examples": "<br><br> Any direction <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/6\", \n \"_rev\" : \"906436102\", \n \"_key\" : \"6\", \n \"_from\" : \"vertices/2\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v2 -> v1\" \n }, \n { \n \"_id\" : \"edges/7\", \n \"_rev\" : \"906960390\", \n \"_key\" : \"7\", \n \"_from\" : \"vertices/4\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v4 -> v1\" \n }, \n { \n \"_id\" : \"edges/5\", \n \"_rev\" : \"905911814\", \n \"_key\" : \"5\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/3\", \n \"$label\" : \"v1 -> v3\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> In edges <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=in\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/6\", \n \"_rev\" : \"911220230\", \n \"_key\" : \"6\", \n \"_from\" : \"vertices/2\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v2 -> v1\" \n }, \n { \n \"_id\" : \"edges/7\", \n \"_rev\" : \"911744518\", \n \"_key\" : \"7\", \n \"_from\" : \"vertices/4\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v4 -> v1\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Out edges <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=out\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/5\", \n \"_rev\" : \"915480070\", \n \"_key\" : \"5\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/3\", \n \"$label\" : \"v1 -> v3\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Any direction <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/6\", \n \"_key\" : \"6\", \n \"_rev\" : \"984167036\", \n \"_from\" : \"vertices/2\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v2 -> v1\" \n }, \n { \n \"_id\" : \"edges/7\", \n \"_key\" : \"7\", \n \"_rev\" : \"984691324\", \n \"_from\" : \"vertices/4\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v4 -> v1\" \n }, \n { \n \"_id\" : \"edges/5\", \n \"_key\" : \"5\", \n \"_rev\" : \"983642748\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/3\", \n \"$label\" : \"v1 -> v3\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> In edges <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=in\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/6\", \n \"_key\" : \"6\", \n \"_rev\" : \"988951164\", \n \"_from\" : \"vertices/2\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v2 -> v1\" \n }, \n { \n \"_id\" : \"edges/7\", \n \"_key\" : \"7\", \n \"_rev\" : \"989475452\", \n \"_from\" : \"vertices/4\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v4 -> v1\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Out edges <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=out\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/5\", \n \"_key\" : \"5\", \n \"_rev\" : \"996029052\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/3\", \n \"$label\" : \"v1 -> v3\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "ReadIn-OrOutboundEdges"
}
],

View File

@ -24,7 +24,7 @@
"notes": "Returns a list of all configured endpoints the server is listening on. For each endpoint, the list of allowed databases is returned too if set. <br><br> The result is a JSON hash which has the endpoints as keys, and the list of mapped database names as values for each endpoint. <br><br> If a list of mapped databases is empty, it means that all databases can be accessed via the endpoint. If a list of mapped databases contains more than one database name, this means that any of the databases might be accessed via the endpoint, and the first database in the list will be treated as the default database for the endpoint. The default database will be used when an incoming request does not specify a database name in the request explicitly. <br><br> <em>*Note*</em>: retrieving the list of all endpoints is allowed in the system database only. Calling this action in any other database will make the server return an error. <br><br>",
"summary": " Return list of all endpoints",
"httpMethod": "GET",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/endpoint\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n[ \n { \n \"endpoint\" : \"tcp://127.0.0.1:32357\", \n \"databases\" : [ ] \n }, \n { \n \"endpoint\" : \"tcp://127.0.0.1:8532\", \n \"databases\" : [ \n \"mydb1\", \n \"mydb2\" \n ] \n } \n]\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/endpoint\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n[ \n { \n \"endpoint\" : \"tcp://127.0.0.1:31909\", \n \"databases\" : [ ] \n }, \n { \n \"endpoint\" : \"tcp://127.0.0.1:8532\", \n \"databases\" : [ \n \"mydb1\", \n \"mydb2\" \n ] \n } \n]\n</code></pre><br>@endDocuBlock",
"nickname": "ReturnListOfAllEndpoints"
}
],

View File

@ -39,7 +39,7 @@
"notes": "Creates a new graph. <br><br> Returns an object with an attribute <em>graph</em> containing a list of all graph properties. <br><br>",
"summary": "create graph",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/\n{ \n \"_key\" : \"graph\", \n \"vertices\" : \"vertices\", \n \"edges\" : \"edges\" \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: 918691334\n\n{ \n \"graph\" : { \n \"_id\" : \"_graphs/graph\", \n \"_rev\" : \"918691334\", \n \"_key\" : \"graph\", \n \"edgeDefinitions\" : [ \n { \n \"collection\" : \"edges\", \n \"from\" : [ \n \"vertices\" \n ], \n \"to\" : [ \n \"vertices\" \n ] \n } \n ] \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/\n{ \n \"_key\" : \"graph\", \n \"vertices\" : \"vertices\", \n \"edges\" : \"edges\" \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: 999240316\n\n{ \n \"graph\" : { \n \"_id\" : \"_graphs/graph\", \n \"_key\" : \"graph\", \n \"_rev\" : \"999240316\", \n \"edgeDefinitions\" : [ \n { \n \"collection\" : \"edges\", \n \"from\" : [ \n \"vertices\" \n ], \n \"to\" : [ \n \"vertices\" \n ] \n } \n ] \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"nickname": "createGraph"
}
],
@ -90,7 +90,7 @@
"notes": "<br><br> If <em>graph-name</em> is specified, returns an object with an attribute <em>graph</em> containing a JSON hash with all properties of the specified graph. <br><br> If <em>graph-name</em> is not specified, returns a list of graph objects. <br><br>",
"summary": "get the properties of a specific or all graphs",
"httpMethod": "GET",
"examples": "<br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/graph/graph\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 920067590\n\n{ \n \"graph\" : { \n \"_id\" : \"_graphs/graph\", \n \"_rev\" : \"920067590\", \n \"_key\" : \"graph\", \n \"edgeDefinitions\" : [ \n { \n \"collection\" : \"edges\", \n \"from\" : [ \n \"vertices\" \n ], \n \"to\" : [ \n \"vertices\" \n ] \n } \n ] \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> get all graphs <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/graph\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"graphs\" : [ \n { \n \"_id\" : \"_graphs/graph2\", \n \"_rev\" : \"922885638\", \n \"_key\" : \"graph2\", \n \"edgeDefinitions\" : [ \n { \n \"collection\" : \"edges2\", \n \"from\" : [ \n \"vertices2\" \n ], \n \"to\" : [ \n \"vertices2\" \n ] \n } \n ] \n }, \n { \n \"_id\" : \"_graphs/graph1\", \n \"_rev\" : \"921837062\", \n \"_key\" : \"graph1\", \n \"edgeDefinitions\" : [ \n { \n \"collection\" : \"edges1\", \n \"from\" : [ \n \"vertices1\" \n ], \n \"to\" : [ \n \"vertices1\" \n ] \n } \n ] \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/graph/graph\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 1000616572\n\n{ \n \"graph\" : { \n \"_id\" : \"_graphs/graph\", \n \"_key\" : \"graph\", \n \"_rev\" : \"1000616572\", \n \"edgeDefinitions\" : [ \n { \n \"collection\" : \"edges\", \n \"from\" : [ \n \"vertices\" \n ], \n \"to\" : [ \n \"vertices\" \n ] \n } \n ] \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> get all graphs <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/graph\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"graphs\" : [ \n { \n \"_id\" : \"_graphs/graph2\", \n \"_key\" : \"graph2\", \n \"_rev\" : \"1003631228\", \n \"edgeDefinitions\" : [ \n { \n \"collection\" : \"edges2\", \n \"from\" : [ \n \"vertices2\" \n ], \n \"to\" : [ \n \"vertices2\" \n ] \n } \n ] \n }, \n { \n \"_id\" : \"_graphs/graph1\", \n \"_key\" : \"graph1\", \n \"_rev\" : \"1002582652\", \n \"edgeDefinitions\" : [ \n { \n \"collection\" : \"edges1\", \n \"from\" : [ \n \"vertices1\" \n ], \n \"to\" : [ \n \"vertices1\" \n ] \n } \n ] \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>",
"nickname": "getThePropertiesOfASpecificOrAllGraphs"
}
],
@ -180,7 +180,7 @@
"notes": "Creates a vertex in a graph. <br><br> Returns an object with an attribute <em>vertex</em> containing a list of all vertex properties. <br><br>",
"summary": "create vertex",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex\n{ \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 927407622\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"927407622\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex\n{ \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 1008153212\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1008153212\", \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"nickname": "createVertex"
}
],
@ -245,7 +245,7 @@
"notes": "Returns an object with an attribute <em>vertex</em> containing a list of all vertex properties. <br><br>",
"summary": "get vertex",
"httpMethod": "GET",
"examples": "<br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 929308166\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"929308166\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 1010053756\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1010053756\", \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>",
"nickname": "getVertex"
}
],
@ -384,7 +384,7 @@
"notes": "Replaces the vertex properties. <br><br> Returns an object with an attribute <em>vertex</em> containing a list of all vertex properties. <br><br>",
"summary": "update vertex",
"httpMethod": "PUT",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{ \n \"optional1\" : \"val2\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 934223366\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"934223366\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val2\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{ \n \"optional1\" : \"val2\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 1014968956\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1014968956\", \n \"optional1\" : \"val2\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"nickname": "updateVertex"
}
],
@ -464,7 +464,7 @@
"notes": "Partially updates the vertex properties. <br><br> Setting an attribute value to <em>null</em> in the patch document will cause a value of <em>null</em> be saved for the attribute by default. If the intention is to delete existing attributes with the patch command, the URL parameter <em>keepNull</em> can be used with a value of <em>false</em>. This will modify the behavior of the patch command to remove any attributes from the existing document that are contained in the patch document with an attribute value of <em>null</em>. <br><br> Returns an object with an attribute <em>vertex</em> containing a list of all vertex properties. <br><br>",
"summary": "update vertex",
"httpMethod": "PATCH",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{ \n \"optional1\" : \"vertexPatch\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 936648198\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"936648198\", \n \"_key\" : \"v1\", \n \"optional1\" : \"vertexPatch\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\nshell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{ \n \"optional1\" : null \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 937172486\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"937172486\", \n \"_key\" : \"v1\", \n \"optional1\" : null \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{ \n \"optional1\" : \"vertexPatch\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 1017590396\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1017590396\", \n \"optional1\" : \"vertexPatch\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\nshell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{ \n \"optional1\" : null \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 1018114684\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1018114684\", \n \"optional1\" : null \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"nickname": "updateVertex"
}
],
@ -498,7 +498,7 @@
"notes": "Returns a cursor. <br><br> The call expects a JSON hash array as body to filter the result: <br><br> <ul class=\"swagger-list\"><li><em>batchSize</em>: the batch size of the returned cursor <li><em>limit</em>: limit the result size <li><em>count</em>: return the total number of results (default \"false\") <li><em>filter</em>: a optional filter </ul> The attributes of filter <ul class=\"swagger-list\"><li><em>properties</em>: filter by an array of vertex properties </ul> The attributes of a property filter <ul class=\"swagger-list\"><li><em>key</em>: filter the result vertices by a key value pair <li><em>value</em>: the value of the <em>key</em> <li><em>compare</em>: a compare operator",
"summary": "get vertices",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertices\n{ \n \"batchSize\" : 100 \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"vertices/v3\", \n \"_rev\" : \"939859462\", \n \"_key\" : \"v3\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v2\", \n \"_rev\" : \"939466246\", \n \"_key\" : \"v2\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v5\", \n \"_rev\" : \"940645894\", \n \"_key\" : \"v5\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v4\", \n \"_rev\" : \"940252678\", \n \"_key\" : \"v4\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"939073030\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertices\n{ \n \"batchSize\" : 100 \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"vertices/v3\", \n \"_key\" : \"v3\", \n \"_rev\" : \"1020801660\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v2\", \n \"_key\" : \"v2\", \n \"_rev\" : \"1020408444\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v5\", \n \"_key\" : \"v5\", \n \"_rev\" : \"1021588092\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v4\", \n \"_key\" : \"v4\", \n \"_rev\" : \"1021194876\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1020015228\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"nickname": "getVertices"
}
],
@ -539,7 +539,7 @@
"notes": "Returns a cursor. <br><br> The call expects a JSON hash array as body to filter the result: <br><br> <ul class=\"swagger-list\"><li><em>batchSize</em>: the batch size of the returned cursor <li><em>limit</em>: limit the result size <li><em>count</em>: return the total number of results (default \"false\") <li><em>filter</em>: a optional filter </ul> The attributes of filter <ul class=\"swagger-list\"><li><em>direction</em>: Filter for inbound (value \"in\") or outbound (value \"out\") neighbors. Default value is \"any\". <li><em>labels</em>: filter by an array of edge labels (empty array means no restriction) <li><em>properties</em>: filter neighbors by an array of edge properties </ul> The attributes of a property filter <ul class=\"swagger-list\"><li><em>key</em>: filter the result vertices by a key value pair <li><em>value</em>: the value of the <em>key</em> <li><em>compare</em>: a compare operator",
"summary": "get vertices",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertices/v2\n{\"batchSize\" : 100, \"filter\" : {\"direction\" : \"any\", \"properties\":[] }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"942743046\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v4\", \n \"_rev\" : \"943922694\", \n \"_key\" : \"v4\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Select vertices by direction and property filter <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertices/v2\n{\"batchSize\" : 100, \"filter\" : {\"direction\" : \"out\", \"properties\":[ { \"key\": \"optional1\", \"value\": \"val2\", \"compare\" : \"==\" }, ] }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"vertices/v4\", \n \"_rev\" : \"949886470\", \n \"_key\" : \"v4\", \n \"optional1\" : \"val2\" \n }, \n { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"948706822\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertices/v2\n{\"batchSize\" : 100, \"filter\" : {\"direction\" : \"any\", \"properties\":[] }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1023685244\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v4\", \n \"_key\" : \"v4\", \n \"_rev\" : \"1024864892\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Select vertices by direction and property filter <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertices/v2\n{\"batchSize\" : 100, \"filter\" : {\"direction\" : \"out\", \"properties\":[ { \"key\": \"optional1\", \"value\": \"val2\", \"compare\" : \"==\" }, ] }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"vertices/v4\", \n \"_key\" : \"v4\", \n \"_rev\" : \"1030828668\", \n \"optional1\" : \"val2\" \n }, \n { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1029649020\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"nickname": "getVertices"
}
],
@ -584,7 +584,7 @@
"notes": "Creates an edge in a graph. <br><br> The call expects a JSON hash array as body with the edge properties: <br><br> <ul class=\"swagger-list\"><li><em>_key</em>: The name of the edge (optional, if edge collection allows user defined keys). <li><em>_from</em>: The name of the from vertex. <li><em>_to</em>: The name of the to vertex. <li><em>$label</em>: A label for the edge (optional). <li>further optional attributes. </ul> Returns an object with an attribute <em>edge</em> containing the list of all edge properties. <br><br>",
"summary": "create edge",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge\n{ \n \"_key\" : \"edge1\", \n \"_from\" : \"vert2\", \n \"_to\" : \"vert1\", \n \"optional1\" : \"val1\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 955719174\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"955719174\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/vert2\", \n \"_to\" : \"vertices/vert1\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge\n{ \n \"_key\" : \"edge1\", \n \"_from\" : \"vert2\", \n \"_to\" : \"vert1\", \n \"optional1\" : \"val1\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 1036661372\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_key\" : \"edge1\", \n \"_rev\" : \"1036661372\", \n \"_from\" : \"vertices/vert2\", \n \"_to\" : \"vertices/vert1\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"nickname": "createEdge"
}
],
@ -649,7 +649,7 @@
"notes": "Returns an object with an attribute <em>edge</em> containing a list of all edge properties. <br><br>",
"summary": "get edge",
"httpMethod": "GET",
"examples": "<br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 958668294\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"958668294\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 1039610492\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_key\" : \"edge1\", \n \"_rev\" : \"1039610492\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>",
"nickname": "getEdge"
}
],
@ -788,7 +788,7 @@
"notes": "Replaces the optional edge properties. <br><br> The call expects a JSON hash array as body with the new edge properties. <br><br> Returns an object with an attribute <em>edge</em> containing a list of all edge properties. <br><br>",
"summary": "update edge",
"httpMethod": "PUT",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n{ \n \"optional1\" : \"val2\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 965811718\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"965811718\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val2\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n{ \n \"optional1\" : \"val2\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 1046753916\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_key\" : \"edge1\", \n \"_rev\" : \"1046753916\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val2\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"nickname": "updateEdge"
}
],
@ -868,7 +868,7 @@
"notes": "Partially updates the edge properties. <br><br> Setting an attribute value to <em>null</em> in the patch document will cause a value of <em>null</em> be saved for the attribute by default. If the intention is to delete existing attributes with the patch command, the URL parameter <em>keepNull</em> can be used with a value of <em>false</em>. This will modify the behavior of the patch command to remove any attributes from the existing document that are contained in the patch document with an attribute value of <em>null</em>. <br><br> Returns an object with an attribute <em>edge</em> containing a list of all edge properties. <br><br>",
"summary": "update edge",
"httpMethod": "PATCH",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n{ \n \"optional3\" : \"val3\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 969416198\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"969416198\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val1\", \n \"optional3\" : \"val3\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n{ \n \"optional3\" : \"val3\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 1050358396\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_key\" : \"edge1\", \n \"_rev\" : \"1050358396\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val1\", \n \"optional3\" : \"val3\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"nickname": "updateEdge"
}
],
@ -902,7 +902,7 @@
"notes": "Returns a cursor. <br><br> The call expects a JSON hash array as body to filter the result: <br><br> <ul class=\"swagger-list\"><li><em>batchSize</em>: the batch size of the returned cursor <li><em>limit</em>: limit the result size <li><em>count</em>: return the total number of results (default \"false\") <li><em>filter</em>: a optional filter </ul> The attributes of filter <ul class=\"swagger-list\"><li><em>labels</em>: filter by an array of edge labels <li><em>properties</em>: filter by an array of edge properties </ul> The attributes of a property filter <ul class=\"swagger-list\"><li><em>key</em>: filter the result edges by a key value pair <li><em>value</em>: the value of the <em>key</em> <li><em>compare</em>: a compare operator",
"summary": "get edges",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edges\n{ \n \"batchSize\" : 100 \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"edges/edge2\", \n \"_rev\" : \"974134790\", \n \"_key\" : \"edge2\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v3\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge3\", \n \"_rev\" : \"974659078\", \n \"_key\" : \"edge3\", \n \"_from\" : \"vertices/v2\", \n \"_to\" : \"vertices/v4\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"973610502\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge4\", \n \"_rev\" : \"975183366\", \n \"_key\" : \"edge4\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v5\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edges\n{ \n \"batchSize\" : 100 \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"edges/edge2\", \n \"_key\" : \"edge2\", \n \"_rev\" : \"1058747004\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v3\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge3\", \n \"_key\" : \"edge3\", \n \"_rev\" : \"1059271292\", \n \"_from\" : \"vertices/v2\", \n \"_to\" : \"vertices/v4\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge1\", \n \"_key\" : \"edge1\", \n \"_rev\" : \"1058222716\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge4\", \n \"_key\" : \"edge4\", \n \"_rev\" : \"1059795580\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v5\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"nickname": "getEdges"
}
],
@ -943,7 +943,7 @@
"notes": "<br><br> Returns a cursor. <br><br> The call expects a JSON hash array as body to filter the result: <br><br> <ul class=\"swagger-list\"><li><em>batchSize</em>: the batch size of the returned cursor <li><em>limit</em>: limit the result size <li><em>count</em>: return the total number of results (default \"false\") <li><em>filter</em>: a optional filter </ul> The attributes of filter <ul class=\"swagger-list\"><li><em>direction</em>: Filter for inbound (value \"in\") or outbound (value \"out\") neighbors. Default value is \"any\". <li><em>labels</em>: filter by an array of edge labels <li><em>properties</em>: filter neighbors by an array of properties </ul> The attributes of a property filter <ul class=\"swagger-list\"><li><em>key</em>: filter the result vertices by a key value pair <li><em>value</em>: the value of the <em>key</em> <li><em>compare</em>: a compare operator",
"summary": "get edges",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edges/v2\n{\"batchSize\" : 100, \"filter\" : { \"direction\" : \"any\" }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"979574278\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge3\", \n \"_rev\" : \"980622854\", \n \"_key\" : \"edge3\", \n \"_from\" : \"vertices/v2\", \n \"_to\" : \"vertices/v4\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edges/v2\n{\"batchSize\" : 100, \"filter\" : { \"direction\" : \"any\" }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"edges/edge1\", \n \"_key\" : \"edge1\", \n \"_rev\" : \"1064186492\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge3\", \n \"_key\" : \"edge3\", \n \"_rev\" : \"1065235068\", \n \"_from\" : \"vertices/v2\", \n \"_to\" : \"vertices/v4\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"nickname": "getEdges"
}
],

View File

@ -96,7 +96,7 @@
"notes": "<br><br> Creates a cap constraint for the collection <em>collection-name</em>, if it does not already exist. Expects an object containing the index details. <br><br> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"cap\"</em>. <li><em>size</em>: The maximal number of documents for the collection. If specified, the value must be greater than zero. <li><em>byteSize</em>: The maximal size of the active document data in the collection (in bytes). If specified, the value must be at least 16384. </ul> <em>*Note*</em>: The cap constraint does not index particular attributes of the documents in a collection, but limits the number of documents in the collection to a maximum value. The cap constraint thus does not support attribute names specified in the <em>fields</em> attribute nor uniqueness of any kind via the <em>unique</em> attribute. <br><br> It is allowed to specify either <em>size</em> or <em>byteSize</em>, or both at the same time. If both are specified, then the automatic document removal will be triggered by the first non-met constraint. <br><br>",
"summary": " Create cap constraint",
"httpMethod": "POST",
"examples": "<br><br> Creating a cap constraint <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{\"type\":\"cap\",\"size\":10}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/982720006\", \n \"type\" : \"cap\", \n \"unique\" : false, \n \"size\" : 10, \n \"byteSize\" : 0, \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Creating a cap constraint <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{\"type\":\"cap\",\"size\":10}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1067332220\", \n \"type\" : \"cap\", \n \"unique\" : false, \n \"size\" : 10, \n \"byteSize\" : 0, \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "CreateCapConstraint"
}
],
@ -138,7 +138,7 @@
"notes": "<br><br> Creates a geo-spatial index in the collection <em>collection-name</em>, if it does not already exist. Expects an object containing the index details. <br><br> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"geo\"</em>. <li><em>fields</em>: A list with one or two attribute paths. If it is a list with one attribute path <em>location</em>, then a geo-spatial index on all documents is created using <em>location</em> as path to the coordinates. The value of the attribute must be a list with at least two double values. The list must contain the latitude (first value) and the longitude (second value). All documents, which do not have the attribute path or with value that are not suitable, are ignored. If it is a list with two attribute paths <em>latitude</em> and <em>longitude</em>, then a geo-spatial index on all documents is created using <em>latitude</em> and <em>longitude</em> as paths the latitude and the longitude. The value of the attribute <em>latitude</em> and of the attribute <em>longitude</em> must a double. All documents, which do not have the attribute paths or which values are not suitable, are ignored. <li><em>geoJson</em>: If a geo-spatial index on a <em>location</em> is constructed and <em>geoJson</em> is <em>true</em>, then the order within the list is longitude followed by latitude. This corresponds to the format described in http://geojson.org/geojson-spec.html#positions <li><em>constraint</em>: If <em>constraint</em> is <em>true</em>, then a geo-spatial constraint is created. The constraint is a non-unique variant of the index. <em>*Note*</em>: It is also possible to set the <em>unique</em> attribute instead of the <em>constraint</em> attribute. <li><em>ignoreNull</em>: If a geo-spatial constraint is created and <em>ignoreNull</em> is true, then documents with a null in <em>location</em> or at least one null in <em>latitude</em> or <em>longitude</em> are ignored. </ul> <em>*Note*</em>: Unique indexes on non-shard keys are not supported in a cluster. <br><br>",
"summary": " Create geo-spatial index",
"httpMethod": "POST",
"examples": "<br><br> Creating a geo index with a location attribute: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"geo\", \"fields\" : [ \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/983244294\", \n \"type\" : \"geo1\", \n \"unique\" : false, \n \"geoJson\" : false, \n \"constraint\" : false, \n \"ignoreNull\" : false, \n \"fields\" : [ \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Creating a geo index with latitude and longitude attributes: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"geo\", \"fields\" : [ \"e\", \"f\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/983768582\", \n \"type\" : \"geo2\", \n \"unique\" : false, \n \"constraint\" : false, \n \"ignoreNull\" : false, \n \"fields\" : [ \n \"e\", \n \"f\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Creating a geo index with a location attribute: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"geo\", \"fields\" : [ \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1067856508\", \n \"type\" : \"geo1\", \n \"unique\" : false, \n \"geoJson\" : false, \n \"constraint\" : false, \n \"ignoreNull\" : false, \n \"fields\" : [ \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Creating a geo index with latitude and longitude attributes: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"geo\", \"fields\" : [ \"e\", \"f\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1068380796\", \n \"type\" : \"geo2\", \n \"unique\" : false, \n \"constraint\" : false, \n \"ignoreNull\" : false, \n \"fields\" : [ \n \"e\", \n \"f\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "CreateGeo-spatialIndex"
}
],
@ -184,7 +184,7 @@
"notes": "<br><br> Creates a hash index for the collection <em>collection-name</em>, if it does not already exist. The call expects an object containing the index details. <br><br> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"hash\"</em>. <li><em>fields</em>: A list of attribute paths. <li><em>unique</em>: If <em>true</em>, then create a unique index. </ul> <em>*Note*</em>: unique indexes on non-shard keys are not supported in a cluster. <br><br>",
"summary": " Create hash index",
"httpMethod": "POST",
"examples": "<br><br> Creating an unique constraint: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"hash\", \"unique\" : true, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/984292870\", \n \"type\" : \"hash\", \n \"unique\" : true, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Creating a hash index: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"hash\", \"unique\" : false, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/984817158\", \n \"type\" : \"hash\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Creating an unique constraint: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"hash\", \"unique\" : true, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1068905084\", \n \"type\" : \"hash\", \n \"unique\" : true, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Creating a hash index: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"hash\", \"unique\" : false, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1069429372\", \n \"type\" : \"hash\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "CreateHashIndex"
}
],
@ -230,7 +230,7 @@
"notes": "<br><br> Creates a skip-list index for the collection <em>collection-name</em>, if it does not already exist. The call expects an object containing the index details. <br><br> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"skiplist\"</em>. <li><em>fields</em>: A list of attribute paths. <li><em>unique</em>: If <em>true</em>, then create a unique index. </ul> <em>*Note*</em>: unique indexes on non-shard keys are not supported in a cluster. <br><br>",
"summary": " Create skip list",
"httpMethod": "POST",
"examples": "<br><br> Creating a skiplist: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"skiplist\", \"unique\" : false, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/985341446\", \n \"type\" : \"skiplist\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Creating a skiplist: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"skiplist\", \"unique\" : false, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1069953660\", \n \"type\" : \"skiplist\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "CreateSkipList"
}
],
@ -272,7 +272,7 @@
"notes": "<br><br> Creates a fulltext index for the collection <em>collection-name</em>, if it does not already exist. The call expects an object containing the index details. <br><br> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"fulltext\"</em>. <li><em>fields</em>: A list of attribute names. Currently, the list is limited to exactly one attribute, so the value of <em>fields</em> should look like this for example: <em>[ \"text\" ]</em>. <li><em>minLength</em>: Minimum character length of words to index. Will default to a server-defined value if unspecified. It is thus recommended to set this value explicitly when creating the index.",
"summary": " Create fulltext index",
"httpMethod": "POST",
"examples": "<br><br> Creating a fulltext index: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\" : \"fulltext\", \"fields\" : [ \"text\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/985800198\", \n \"type\" : \"fulltext\", \n \"unique\" : false, \n \"minLength\" : 2, \n \"fields\" : [ \n \"text\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Creating a fulltext index: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\" : \"fulltext\", \"fields\" : [ \"text\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1070412412\", \n \"type\" : \"fulltext\", \n \"unique\" : false, \n \"minLength\" : 2, \n \"fields\" : [ \n \"text\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "CreateFulltextIndex"
}
],
@ -314,7 +314,7 @@
"notes": "<br><br> Creates a bitarray index for the collection <em>collection-name</em>, if it does not already exist. The call expects an object containing the index details. <br><br> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"bitarray\"</em>. <li><em>fields</em>: A list of pairs. A pair consists of an attribute path followed by a list of values. <li><em>unique</em>: Must always be set to <em>false</em>.",
"summary": " Create bitarray index",
"httpMethod": "POST",
"examples": "<br><br> Creating a bitarray index: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\" : \"bitarray\", \"unique\" : false, \"fields\" : [ \"x\", [0,1,[]], \"y\", [\"a\",\"b\",[]] ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/986324486\", \n \"type\" : \"bitarray\", \n \"unique\" : false, \n \"fields\" : [ \n [ \n \"x\", \n [ \n 0, \n 1, \n [ ] \n ] \n ], \n [ \n \"y\", \n [ \n \"a\", \n \"b\", \n [ ] \n ] \n ] \n ], \n \"undefined\" : false, \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Creating a bitarray index: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\" : \"bitarray\", \"unique\" : false, \"fields\" : [ \"x\", [0,1,[]], \"y\", [\"a\",\"b\",[]] ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1070936700\", \n \"type\" : \"bitarray\", \n \"unique\" : false, \n \"fields\" : [ \n [ \n \"x\", \n [ \n 0, \n 1, \n [ ] \n ] \n ], \n [ \n \"y\", \n [ \n \"a\", \n \"b\", \n [ ] \n ] \n ] \n ], \n \"undefined\" : false, \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "CreateBitarrayIndex"
}
],
@ -391,7 +391,7 @@
"notes": "<br><br> Deletes an index with <em>index-handle</em>. <br><br>",
"summary": " Delete index",
"httpMethod": "DELETE",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/index/products/986848774\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/986848774\", \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/index/products/1071460988\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1071460988\", \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "DeleteIndex"
}
],

File diff suppressed because one or more lines are too long

View File

@ -207,7 +207,7 @@
"notes": "<br><br> Returns all documents of a collections. The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>skip</em>: The number of documents to skip in the query (optional). <li><em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Return all",
"httpMethod": "PUT",
"examples": "<br><br> Limit the amount of documents using <em>limit</em> <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/all\n{ \"collection\": \"products\", \"skip\": 2, \"limit\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/987504134\", \n \"_rev\" : \"987504134\", \n \"_key\" : \"987504134\", \n \"Hello1\" : \"World1\" \n }, \n { \n \"_id\" : \"products/988814854\", \n \"_rev\" : \"988814854\", \n \"_key\" : \"988814854\", \n \"Hello5\" : \"World5\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Using a <em>batchSize</em> value <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/all\n{ \"collection\": \"products\", \"batchSize\" : 3 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/990453254\", \n \"_rev\" : \"990453254\", \n \"_key\" : \"990453254\", \n \"Hello4\" : \"World4\" \n }, \n { \n \"_id\" : \"products/990125574\", \n \"_rev\" : \"990125574\", \n \"_key\" : \"990125574\", \n \"Hello3\" : \"World3\" \n }, \n { \n \"_id\" : \"products/989470214\", \n \"_rev\" : \"989470214\", \n \"_key\" : \"989470214\", \n \"Hello1\" : \"World1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"990977542\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Limit the amount of documents using <em>limit</em> <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/all\n{ \"collection\": \"products\", \"skip\": 2, \"limit\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1073295996\", \n \"_key\" : \"1073295996\", \n \"_rev\" : \"1073295996\", \n \"Hello4\" : \"World4\" \n }, \n { \n \"_id\" : \"products/1072968316\", \n \"_key\" : \"1072968316\", \n \"_rev\" : \"1072968316\", \n \"Hello3\" : \"World3\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Using a <em>batchSize</em> value <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/all\n{ \"collection\": \"products\", \"batchSize\" : 3 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1074934396\", \n \"_key\" : \"1074934396\", \n \"_rev\" : \"1074934396\", \n \"Hello3\" : \"World3\" \n }, \n { \n \"_id\" : \"products/1074279036\", \n \"_key\" : \"1074279036\", \n \"_rev\" : \"1074279036\", \n \"Hello1\" : \"World1\" \n }, \n { \n \"_id\" : \"products/1074606716\", \n \"_key\" : \"1074606716\", \n \"_rev\" : \"1074606716\", \n \"Hello2\" : \"World2\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"1075786364\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "ReturnAll"
}
],
@ -242,7 +242,7 @@
"notes": "<br><br> Returns a random document from a collection. The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The identifier or name of the collection to query. </ul> Returns a JSON object with the document stored in the attribute <em>document</em> if the collection contains at least one document. If the collection is empty, the <em>document</em> attrbute contains null. <br><br>",
"summary": " Random document",
"httpMethod": "PUT",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/any\n{ \"collection\": \"products\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"document\" : { \n \"_id\" : \"products/992747014\", \n \"_rev\" : \"992747014\", \n \"_key\" : \"992747014\", \n \"Hello5\" : \"World5\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/any\n{ \"collection\": \"products\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"document\" : { \n \"_id\" : \"products/1077228156\", \n \"_key\" : \"1077228156\", \n \"_rev\" : \"1077228156\", \n \"Hello4\" : \"World4\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "RandomDocument"
}
],
@ -277,7 +277,7 @@
"notes": "<br><br> The default will find at most 100 documents near the given coordinate. The returned list is sorted according to the distance, with the nearest document being first in the list. If there are near documents of equal distance, documents are chosen randomly from this set until the limit is reached. <br><br> In order to use the <em>near</em> operator, a geo index must be defined for the collection. This index also defines which attribute holds the coordinates for the document. If you have more then one geo-spatial index, you can use the <em>geo</em> field to select a particular index. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>latitude</em>: The latitude of the coordinate. <li><em>longitude</em>: The longitude of the coordinate. <li><em>distance</em>: If given, the attribute key used to return the distance to the given coordinate. (optional). If specified, distances are returned in meters. <li><em>skip</em>: The number of documents to skip in the query. (optional) <li><em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. The default is 100. (optional) <li><em>geo</em>: If given, the identifier of the geo-index to use. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Near query",
"httpMethod": "PUT",
"examples": "<br><br> Without distance: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/994844166\", \n \"_rev\" : \"994844166\", \n \"_key\" : \"994844166\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/994450950\", \n \"_rev\" : \"994450950\", \n \"_key\" : \"994450950\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ] \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> With distance: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 3, \"distance\" : \"distance\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/997465606\", \n \"_rev\" : \"997465606\", \n \"_key\" : \"997465606\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/997858822\", \n \"_rev\" : \"997858822\", \n \"_key\" : \"997858822\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/997268998\", \n \"_rev\" : \"997268998\", \n \"_key\" : \"997268998\", \n \"name\" : \"Name/-0.004/\", \n \"loc\" : [ \n -0.004, \n 0 \n ], \n \"distance\" : 444.779706578235 \n } \n ], \n \"hasMore\" : false, \n \"count\" : 3, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Without distance: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1079652988\", \n \"_key\" : \"1079652988\", \n \"_rev\" : \"1079652988\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/1079259772\", \n \"_key\" : \"1079259772\", \n \"_rev\" : \"1079259772\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ] \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> With distance: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 3, \"distance\" : \"distance\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1082274428\", \n \"_key\" : \"1082274428\", \n \"_rev\" : \"1082274428\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/1082667644\", \n \"_key\" : \"1082667644\", \n \"_rev\" : \"1082667644\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/1082077820\", \n \"_key\" : \"1082077820\", \n \"_rev\" : \"1082077820\", \n \"name\" : \"Name/-0.004/\", \n \"loc\" : [ \n -0.004, \n 0 \n ], \n \"distance\" : 444.779706578235 \n } \n ], \n \"hasMore\" : false, \n \"count\" : 3, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "NearQuery"
}
],
@ -312,7 +312,7 @@
"notes": "<br><br> This will find all documents within a given radius around the coordinate (<em>latitude</em>, <em>longitude</em>). The returned list is sorted by distance. <br><br> In order to use the <em>within</em> operator, a geo index must be defined for the collection. This index also defines which attribute holds the coordinates for the document. If you have more then one geo-spatial index, you can use the <em>geo</em> field to select a particular index. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>latitude</em>: The latitude of the coordinate. <li><em>longitude</em>: The longitude of the coordinate. <li><em>radius</em>: The maximal radius (in meters). <li><em>distance</em>: If given, the attribute key used to return the distance to the given coordinate. (optional). If specified, distances are returned in meters. <li><em>skip</em>: The number of documents to skip in the query. (optional) <li><em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. The default is 100. (optional) <li><em>geo</em>: If given, the identifier of the geo-index to use. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Within query",
"httpMethod": "PUT",
"examples": "<br><br> Without distance: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 2, \"radius\" : 500 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1000873478\", \n \"_rev\" : \"1000873478\", \n \"_key\" : \"1000873478\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/1000480262\", \n \"_rev\" : \"1000480262\", \n \"_key\" : \"1000480262\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ] \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> With distance: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 3, \"distance\" : \"distance\", \"radius\" : 300 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1003494918\", \n \"_rev\" : \"1003494918\", \n \"_key\" : \"1003494918\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/1004346886\", \n \"_rev\" : \"1004346886\", \n \"_key\" : \"1004346886\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/1003298310\", \n \"_rev\" : \"1003298310\", \n \"_key\" : \"1003298310\", \n \"name\" : \"Name/-0.004/\", \n \"loc\" : [ \n -0.004, \n 0 \n ], \n \"distance\" : 444.779706578235 \n } \n ], \n \"hasMore\" : false, \n \"count\" : 3, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Without distance: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 2, \"radius\" : 500 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1085682300\", \n \"_key\" : \"1085682300\", \n \"_rev\" : \"1085682300\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/1085289084\", \n \"_key\" : \"1085289084\", \n \"_rev\" : \"1085289084\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ] \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> With distance: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 3, \"distance\" : \"distance\", \"radius\" : 300 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1088500348\", \n \"_key\" : \"1088500348\", \n \"_rev\" : \"1088500348\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/1088893564\", \n \"_key\" : \"1088893564\", \n \"_rev\" : \"1088893564\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/1088303740\", \n \"_key\" : \"1088303740\", \n \"_rev\" : \"1088303740\", \n \"name\" : \"Name/-0.004/\", \n \"loc\" : [ \n -0.004, \n 0 \n ], \n \"distance\" : 444.779706578235 \n } \n ], \n \"hasMore\" : false, \n \"count\" : 3, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "WithinQuery"
}
],
@ -347,7 +347,7 @@
"notes": "<br><br> This will find all documents from the collection that match the fulltext query specified in <em>query</em>. <br><br> In order to use the <em>fulltext</em> operator, a fulltext index must be defined for the collection and the specified attribute. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>attribute</em>: The attribute that contains the texts. <li><em>query</em>: The fulltext query. <li><em>skip</em>: The number of documents to skip in the query (optional). <li><em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. (optional) <li><em>index</em>: The identifier of the fulltext-index to use. </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Fulltext index query",
"httpMethod": "PUT",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/fulltext\n{ \"collection\": \"products\", \"attribute\" : \"text\", \"query\" : \"word\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1009196550\", \n \"_rev\" : \"1009196550\", \n \"_key\" : \"1009196550\", \n \"text\" : \"this text also has a word\" \n }, \n { \n \"_id\" : \"products/1008999942\", \n \"_rev\" : \"1008999942\", \n \"_key\" : \"1008999942\", \n \"text\" : \"this text contains word\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/fulltext\n{ \"collection\": \"products\", \"attribute\" : \"text\", \"query\" : \"word\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1090597500\", \n \"_key\" : \"1090597500\", \n \"_rev\" : \"1090597500\", \n \"text\" : \"this text also has a word\" \n }, \n { \n \"_id\" : \"products/1090400892\", \n \"_key\" : \"1090400892\", \n \"_rev\" : \"1090400892\", \n \"text\" : \"this text contains word\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "FulltextIndexQuery"
}
],
@ -382,7 +382,7 @@
"notes": "<br><br> This will find all documents matching a given example. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>example</em>: The example document. <li><em>skip</em>: The number of documents to skip in the query (optional). <li><em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Simple query by-example",
"httpMethod": "PUT",
"examples": "<br><br> Matching an attribute: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"i\" : 1 } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1010900486\", \n \"_rev\" : \"1010900486\", \n \"_key\" : \"1010900486\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1011162630\", \n \"_rev\" : \"1011162630\", \n \"_key\" : \"1011162630\", \n \"i\" : 1 \n }, \n { \n \"_id\" : \"products/1011359238\", \n \"_rev\" : \"1011359238\", \n \"_key\" : \"1011359238\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n }, \n { \n \"_id\" : \"products/1010572806\", \n \"_rev\" : \"1010572806\", \n \"_key\" : \"1010572806\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n } \n ], \n \"hasMore\" : false, \n \"count\" : 4, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Matching an attribute which is a sub-document: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"a.j\" : 1 } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1012604422\", \n \"_rev\" : \"1012604422\", \n \"_key\" : \"1012604422\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1012932102\", \n \"_rev\" : \"1012932102\", \n \"_key\" : \"1012932102\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Matching an attribute within a sub-document: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1014963718\", \n \"_rev\" : \"1014963718\", \n \"_key\" : \"1014963718\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n } \n ], \n \"hasMore\" : false, \n \"count\" : 1, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Matching an attribute: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"i\" : 1 } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1091973756\", \n \"_key\" : \"1091973756\", \n \"_rev\" : \"1091973756\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1092301436\", \n \"_key\" : \"1092301436\", \n \"_rev\" : \"1092301436\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1092563580\", \n \"_key\" : \"1092563580\", \n \"_rev\" : \"1092563580\", \n \"i\" : 1 \n }, \n { \n \"_id\" : \"products/1092760188\", \n \"_key\" : \"1092760188\", \n \"_rev\" : \"1092760188\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n } \n ], \n \"hasMore\" : false, \n \"count\" : 4, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Matching an attribute which is a sub-document: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"a.j\" : 1 } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1094333052\", \n \"_key\" : \"1094333052\", \n \"_rev\" : \"1094333052\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1094005372\", \n \"_key\" : \"1094005372\", \n \"_rev\" : \"1094005372\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Matching an attribute within a sub-document: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1096364668\", \n \"_key\" : \"1096364668\", \n \"_rev\" : \"1096364668\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n } \n ], \n \"hasMore\" : false, \n \"count\" : 1, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "SimpleQueryBy-example"
}
],
@ -417,7 +417,7 @@
"notes": "<br><br> This will return the first document matching a given example. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>example</em>: The example document. </ul> Returns a result containing the document or <em>HTTP 404</em> if no document matched the example. <br><br> If more than one document in the collection matches the specified example, only one of these documents will be returned, and it is undefined which of the matching documents is returned. <br><br>",
"summary": " Document matching an example",
"httpMethod": "PUT",
"examples": "<br><br> If a matching document was found: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/first-example\n{ \"collection\": \"products\", \"example\" : { \"i\" : 1 } }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"document\" : { \n \"_id\" : \"products/1017257478\", \n \"_rev\" : \"1017257478\", \n \"_key\" : \"1017257478\", \n \"i\" : 1 \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> If no document was found: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/first-example\n{ \"collection\": \"products\", \"example\" : { \"l\" : 1 } }\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 404, \n \"errorMessage\" : \"no match\" \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> If a matching document was found: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/first-example\n{ \"collection\": \"products\", \"example\" : { \"i\" : 1 } }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"document\" : { \n \"_id\" : \"products/1099051644\", \n \"_key\" : \"1099051644\", \n \"_rev\" : \"1099051644\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> If no document was found: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/first-example\n{ \"collection\": \"products\", \"example\" : { \"l\" : 1 } }\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 404, \n \"errorMessage\" : \"no match\" \n}\n</code></pre><br>@endDocuBlock",
"nickname": "DocumentMatchingAnExample"
}
],
@ -452,7 +452,7 @@
"notes": "<br><br> This will return the first document(s) from the collection, in the order of insertion/update time. When the <em>count</em> argument is supplied, the result will be a list of documents, with the \"oldest\" document being first in the result list. If the <em>count</em> argument is not supplied, the result is the \"oldest\" document of the collection, or <em>null</em> if the collection is empty. <br><br> The request body must be a JSON object with the following attributes: <ul class=\"swagger-list\"><li><em>collection</em>: the name of the collection <li><em>count</em>: the number of documents to return at most. Specifiying count is optional. If it is not specified, it defaults to 1. </ul> Note: this method is not supported for sharded collections with more than one shard. <br><br>",
"summary": " First document of a collection",
"httpMethod": "PUT",
"examples": "<br><br> Retrieving the first n documents: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/first\n{ \"collection\": \"products\", \"count\" : 2 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1020599814\", \n \"_rev\" : \"1020599814\", \n \"_key\" : \"1020599814\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1020927494\", \n \"_rev\" : \"1020927494\", \n \"_key\" : \"1020927494\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Retrieving the first document: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/first\n{ \"collection\": \"products\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : { \n \"_id\" : \"products/1022238214\", \n \"_rev\" : \"1022238214\", \n \"_key\" : \"1022238214\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Retrieving the first n documents: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/first\n{ \"collection\": \"products\", \"count\" : 2 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1102197372\", \n \"_key\" : \"1102197372\", \n \"_rev\" : \"1102197372\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1102525052\", \n \"_key\" : \"1102525052\", \n \"_rev\" : \"1102525052\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Retrieving the first document: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/first\n{ \"collection\": \"products\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : { \n \"_id\" : \"products/1103835772\", \n \"_key\" : \"1103835772\", \n \"_rev\" : \"1103835772\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "FirstDocumentOfACollection"
}
],
@ -487,7 +487,7 @@
"notes": "<br><br> This will return the last documents from the collection, in the order of insertion/update time. When the <em>count</em> argument is supplied, the result will be a list of documents, with the \"latest\" document being first in the result list. <br><br> The request body must be a JSON object with the following attributes: <ul class=\"swagger-list\"><li><em>collection</em>: the name of the collection <li><em>count</em>: the number of documents to return at most. Specifiying count is optional. If it is not specified, it defaults to 1. </ul> If the <em>count</em> argument is not supplied, the result is the \"latest\" document of the collection, or <em>null</em> if the collection is empty. <br><br> Note: this method is not supported for sharded collections with more than one shard. <br><br>",
"summary": " Last document of a collection",
"httpMethod": "PUT",
"examples": "<br><br> Retrieving the last n documents: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/last\n{ \"collection\": \"products\", \"count\" : 2 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1024663046\", \n \"_rev\" : \"1024663046\", \n \"_key\" : \"1024663046\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n }, \n { \n \"_id\" : \"products/1024466438\", \n \"_rev\" : \"1024466438\", \n \"_key\" : \"1024466438\", \n \"i\" : 1 \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Retrieving the first document: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/last\n{ \"collection\": \"products\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : { \n \"_id\" : \"products/1026301446\", \n \"_rev\" : \"1026301446\", \n \"_key\" : \"1026301446\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Retrieving the last n documents: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/last\n{ \"collection\": \"products\", \"count\" : 2 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1106260604\", \n \"_key\" : \"1106260604\", \n \"_rev\" : \"1106260604\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n }, \n { \n \"_id\" : \"products/1106063996\", \n \"_key\" : \"1106063996\", \n \"_rev\" : \"1106063996\", \n \"i\" : 1 \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Retrieving the first document: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/last\n{ \"collection\": \"products\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : { \n \"_id\" : \"products/1107899004\", \n \"_key\" : \"1107899004\", \n \"_rev\" : \"1107899004\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "LastDocumentOfACollection"
}
],
@ -522,7 +522,7 @@
"notes": "<br><br> This will find all documents within a given range. In order to execute a range query, a skip-list index on the queried attribute must be present. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>attribute</em>: The attribute path to check. <li><em>left</em>: The lower bound. <li><em>right</em>: The upper bound. <li><em>closed</em>: If <em>true</em>, use interval including <em>left</em> and <em>right</em>, otherwise exclude <em>right</em>, but include <em>left</em>. <li><em>skip</em>: The number of documents to skip in the query (optional). <li><em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Simple range query",
"httpMethod": "PUT",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/range\n{ \"collection\": \"products\", \"attribute\" : \"i\", \"left\" : 2, \"right\" : 4 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1027284486\", \n \"_rev\" : \"1027284486\", \n \"_key\" : \"1027284486\", \n \"i\" : 2 \n }, \n { \n \"_id\" : \"products/1027481094\", \n \"_rev\" : \"1027481094\", \n \"_key\" : \"1027481094\", \n \"i\" : 3 \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/range\n{ \"collection\": \"products\", \"attribute\" : \"i\", \"left\" : 2, \"right\" : 4 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1108882044\", \n \"_key\" : \"1108882044\", \n \"_rev\" : \"1108882044\", \n \"i\" : 2 \n }, \n { \n \"_id\" : \"products/1109078652\", \n \"_key\" : \"1109078652\", \n \"_rev\" : \"1109078652\", \n \"i\" : 3 \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "SimpleRangeQuery"
}
],

View File

@ -3,6 +3,25 @@
"swaggerVersion": "1.1",
"apiVersion": "0.1",
"apis": [
{
"operations": [
{
"errorResponses": [
{
"reason": "Is returned in all cases. @endDocuBlock",
"code": "200"
}
],
"parameters": [],
"notes": "<br><br> Returns the database-version that this server requires. The version is returned in the <em>version</em> attribute of the result. <br><br>",
"summary": " Return the required version of the database",
"httpMethod": "GET",
"examples": "",
"nickname": "ReturnTheRequiredVersionOfTheDatabase"
}
],
"path": "/_admin/database/target-version"
},
{
"operations": [
{
@ -214,7 +233,7 @@
"notes": "<br><br> Returns the statistics information. The returned object contains the statistics figures grouped together according to the description returned by <em>_admin/statistics-description</em>. For instance, to access a figure <em>userTime</em> from the group <em>system</em>, you first select the sub-object describing the group stored in <em>system</em> and in that sub-object the value for <em>userTime</em> is stored in the attribute of the same name. <br><br> In case of a distribution, the returned object contains the total count in <em>count</em> and the distribution list in <em>counts</em>. The sum (or total) of the individual values is returned in <em>sum</em>. <br><br>",
"summary": " Read the statistics",
"httpMethod": "GET",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_admin/statistics\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"time\" : 1407416021.632177, \n \"system\" : { \n \"minorPageFaults\" : 101251, \n \"majorPageFaults\" : 1978, \n \"userTime\" : 5.425714, \n \"systemTime\" : 3.729994, \n \"numberOfThreads\" : 19, \n \"residentSize\" : 167153664, \n \"residentSizePercent\" : 0.019459247589111328, \n \"virtualSize\" : 5199130624 \n }, \n \"client\" : { \n \"httpConnections\" : 1, \n \"connectionTime\" : { \n \"sum\" : 0.0004930496215820312, \n \"count\" : 1, \n \"counts\" : [ \n 1, \n 0, \n 0, \n 0 \n ] \n }, \n \"totalTime\" : { \n \"sum\" : 13.033031702041626, \n \"count\" : 8827, \n \"counts\" : [ \n 8726, \n 90, \n 4, \n 3, \n 1, \n 2, \n 1 \n ] \n }, \n \"requestTime\" : { \n \"sum\" : 12.078540563583374, \n \"count\" : 8827, \n \"counts\" : [ \n 8730, \n 86, \n 4, \n 3, \n 1, \n 2, \n 1 \n ] \n }, \n \"queueTime\" : { \n \"sum\" : 0.15947556495666504, \n \"count\" : 8827, \n \"counts\" : [ \n 8827, \n 0, \n 0, \n 0, \n 0, \n 0, \n 0 \n ] \n }, \n \"ioTime\" : { \n \"sum\" : 0.7950155735015869, \n \"count\" : 8827, \n \"counts\" : [ \n 8827, \n 0, \n 0, \n 0, \n 0, \n 0, \n 0 \n ] \n }, \n \"bytesSent\" : { \n \"sum\" : 3222414, \n \"count\" : 8827, \n \"counts\" : [ \n 2674, \n 6014, \n 9, \n 65, \n 65, \n 0 \n ] \n }, \n \"bytesReceived\" : { \n \"sum\" : 2088297, \n \"count\" : 8827, \n \"counts\" : [ \n 6604, \n 2223, \n 0, \n 0, \n 0, \n 0 \n ] \n } \n }, \n \"http\" : { \n \"requestsTotal\" : 8827, \n \"requestsAsync\" : 0, \n \"requestsGet\" : 3681, \n \"requestsHead\" : 295, \n \"requestsPost\" : 3170, \n \"requestsPut\" : 688, \n \"requestsPatch\" : 31, \n \"requestsDelete\" : 962, \n \"requestsOptions\" : 0, \n \"requestsOther\" : 0 \n }, \n \"server\" : { \n \"uptime\" : 19.867691040039062, \n \"physicalMemory\" : 8589934592 \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_admin/statistics\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"time\" : 1410707805.228738, \n \"system\" : { \n \"minorPageFaults\" : 188954, \n \"majorPageFaults\" : 2049, \n \"userTime\" : 12.538702, \n \"systemTime\" : 4.898359, \n \"numberOfThreads\" : 19, \n \"residentSize\" : 196763648, \n \"residentSizePercent\" : 0.04581260681152344, \n \"virtualSize\" : 5259624448 \n }, \n \"client\" : { \n \"httpConnections\" : 1, \n \"connectionTime\" : { \n \"sum\" : 0.0022318363189697266, \n \"count\" : 1, \n \"counts\" : [ \n 1, \n 0, \n 0, \n 0 \n ] \n }, \n \"totalTime\" : { \n \"sum\" : 47.22205376625061, \n \"count\" : 8788, \n \"counts\" : [ \n 8175, \n 509, \n 39, \n 45, \n 11, \n 5, \n 4 \n ] \n }, \n \"requestTime\" : { \n \"sum\" : 46.08497619628906, \n \"count\" : 8788, \n \"counts\" : [ \n 8183, \n 501, \n 40, \n 45, \n 10, \n 5, \n 4 \n ] \n }, \n \"queueTime\" : { \n \"sum\" : 0.19754838943481445, \n \"count\" : 8788, \n \"counts\" : [ \n 8788, \n 0, \n 0, \n 0, \n 0, \n 0, \n 0 \n ] \n }, \n \"ioTime\" : { \n \"sum\" : 0.9395291805267334, \n \"count\" : 8788, \n \"counts\" : [ \n 8788, \n 0, \n 0, \n 0, \n 0, \n 0, \n 0 \n ] \n }, \n \"bytesSent\" : { \n \"sum\" : 3267865, \n \"count\" : 8788, \n \"counts\" : [ \n 2668, \n 5981, \n 8, \n 8, \n 123, \n 0 \n ] \n }, \n \"bytesReceived\" : { \n \"sum\" : 2079993, \n \"count\" : 8788, \n \"counts\" : [ \n 6566, \n 2222, \n 0, \n 0, \n 0, \n 0 \n ] \n } \n }, \n \"http\" : { \n \"requestsTotal\" : 8788, \n \"requestsAsync\" : 0, \n \"requestsGet\" : 3651, \n \"requestsHead\" : 295, \n \"requestsPost\" : 3167, \n \"requestsPut\" : 685, \n \"requestsPatch\" : 31, \n \"requestsDelete\" : 959, \n \"requestsOptions\" : 0, \n \"requestsOther\" : 0 \n }, \n \"server\" : { \n \"uptime\" : 59.815123081207275, \n \"physicalMemory\" : 4294967296 \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "ReadTheStatistics"
}
],

View File

@ -36,7 +36,7 @@
"notes": "<br><br> The transaction description must be passed in the body of the POST request. <br><br> The following attributes must be specified inside the JSON object: <br><br> <ul class=\"swagger-list\"><li><em>collections</em>: contains the list of collections to be used in the transaction (mandatory). <em>collections</em> must be a JSON array that can have the optional sub-attributes <em>read</em> and <em>write</em>. <em>read</em> and <em>write</em> must each be either lists of collections names or strings with a single collection name. <li><em>action</em>: the actual transaction operations to be executed, in the form of stringified Javascript code. The code will be executed on server side, with late binding. It is thus critical that the code specified in <em>action</em> properly sets up all the variables it needs. If the code specified in <em>action</em> ends with a return statement, the value returned will also be returned by the REST API in the <em>result</em> attribute if the transaction committed successfully. </ul> The following optional attributes may also be specified in the request: <br><br> <ul class=\"swagger-list\"><li><em>waitForSync</em>: an optional boolean flag that, if set, will force the transaction to write all data to disk before returning. <li><em>lockTimeout</em>: an optional numeric value that can be used to set a timeout for waiting on collection locks. If not specified, a default value will be used. Setting <em>lockTimeout</em> to <em>0</em> will make ArangoDB not time out waiting for a lock. <li><em>params</em>: optional arguments passed to <em>action</em>. </ul> If the transaction is fully executed and committed on the server, <em>HTTP 200</em> will be returned. Additionally, the return value of the code defined in <em>action</em> will be returned in the <em>result</em> attribute. <br><br> For successfully committed transactions, the returned JSON object has the following properties: <br><br> <ul class=\"swagger-list\"><li><em>error</em>: boolean flag to indicate if an error occurred (<em>false</em> in this case) <li><em>code</em>: the HTTP status code <li><em>result</em>: the return value of the transaction </ul> If the transaction specification is either missing or malformed, the server will respond with <em>HTTP 400</em>. <br><br> The body of the response will then contain a JSON object with additional error details. The object has the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case) <li><em>code</em>: the HTTP status code <li><em>errorNum</em>: the server error number <li><em>errorMessage</em>: a descriptive error message </ul> If a transaction fails to commit, either by an exception thrown in the <em>action</em> code, or by an internal error, the server will respond with an error. Any other errors will be returned with any of the return codes <em>HTTP 400</em>, <em>HTTP 409</em>, or <em>HTTP 500</em>. <br><br>",
"summary": " Execute transaction",
"httpMethod": "POST",
"examples": "<br><br> Executing a transaction on a single collection: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n \"collections\" : { \n \"write\" : \"products\" \n }, \n \"action\" : \"function () { var db = require('internal').db; db.products.save({}); return db.products.count(); }\" \n}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Executing a transaction using multiple collections: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n \"collections\" : { \n \"write\" : [ \n \"products\", \n \"materials\" \n ] \n }, \n \"action\" : \"function () { var db = require('internal').db; db.products.save({}); db.materials.save({}); return 'worked!'; }\" \n}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : \"worked!\", \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Aborting a transaction due to an internal error: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n \"collections\" : { \n \"write\" : \"products\" \n }, \n \"action\" : \"function () { var db = require('internal').db; db.products.save({ _key: 'abc'}); db.products.save({ _key: 'abc'}); }\" \n}\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 1210, \n \"errorMessage\" : \"unique constraint violated\" \n}\n</code></pre><br><br><br> Aborting a transaction by explicitly throwing an exception: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n \"collections\" : { \n \"read\" : \"products\" \n }, \n \"action\" : \"function () { throw 'doh!'; }\" \n}\n\nHTTP/1.1 500 Internal Error\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 500, \n \"errorNum\" : 500, \n \"errorMessage\" : \"doh!\" \n}\n</code></pre><br><br><br> Referring to a non-existing collection: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n \"collections\" : { \n \"read\" : \"products\" \n }, \n \"action\" : \"function () { return true; }\" \n}\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1203, \n \"errorMessage\" : \"collection not found\" \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Executing a transaction on a single collection: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n \"collections\" : { \n \"write\" : \"products\" \n }, \n \"action\" : \"function () { var db = require('internal').db; db.products.save({}); return db.products.count(); }\" \n}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Executing a transaction using multiple collections: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n \"collections\" : { \n \"write\" : [ \n \"products\", \n \"materials\" \n ] \n }, \n \"action\" : \"function () {var db = require('internal').db;db.products.save({});db.materials.save({});return 'worked!';}\" \n}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : \"worked!\", \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Aborting a transaction due to an internal error: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n \"collections\" : { \n \"write\" : \"products\" \n }, \n \"action\" : \"function () {var db = require('internal').db;db.products.save({ _key: 'abc'});db.products.save({ _key: 'abc'});}\" \n}\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 1210, \n \"errorMessage\" : \"Error: unique constraint violated\\n at eval (<anonymous>:2:99)\\n at eval (<anonymous>:2:122)\\n at post_api_transaction (js/actions/api-transaction.js:268:16)\\n at Function.actions.defineHttp.callback (js/actions/api-transaction.js:288:11)\\n\" \n}\n</code></pre><br><br><br> Aborting a transaction by explicitly throwing an exception: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n \"collections\" : { \n \"read\" : \"products\" \n }, \n \"action\" : \"function () { throw 'doh!'; }\" \n}\n\nHTTP/1.1 500 Internal Error\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 500, \n \"errorNum\" : 500, \n \"errorMessage\" : \"doh!\" \n}\n</code></pre><br><br><br> Referring to a non-existing collection: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n \"collections\" : { \n \"read\" : \"products\" \n }, \n \"action\" : \"function () { return true; }\" \n}\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1203, \n \"errorMessage\" : \"Error: collection not found\\n at post_api_transaction (js/actions/api-transaction.js:268:16)\\n at Function.actions.defineHttp.callback (js/actions/api-transaction.js:288:11)\\n\" \n}\n</code></pre><br>@endDocuBlock",
"nickname": "ExecuteTransaction"
}
],

File diff suppressed because one or more lines are too long

View File

@ -24,7 +24,7 @@
"notes": "Returns the server name and version number. The response is a JSON object with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>server</em>: will always contain <em>arango</em> <li><em>version</em>: the server version string. The string has the format \"<em>major</em>.*minor<em>.*sub</em>\". <em>major</em> and <em>minor</em> will be numeric, and <em>sub</em> may contain a number or a textual version. <li><em>details</em>: an optional JSON object with additional details. This is returned only if the <em>details</em> URL parameter is set to <em>true</em> in the request.",
"summary": " Return server version",
"httpMethod": "GET",
"examples": "<br><br> Returns the version information. <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"server\" : \"arango\", \n \"version\" : \"2.2.2-rc1\" \n}\n</code></pre><br><br><br> Returns the version information with details. <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/version?details=true\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"server\" : \"arango\", \n \"version\" : \"2.2.2-rc1\", \n \"details\" : { \n \"build-date\" : \"Aug 6 2014 16:32:54\", \n \"configure\" : \"'./configure' '--enable-all-in-one-icu' '--enable-relative' '--enable-maintainer-mode'\", \n \"icu-version\" : \"52.1\", \n \"libev-version\" : \"4.11\", \n \"openssl-version\" : \"OpenSSL 0.9.8y 5 Feb 2013\", \n \"repository-version\" : \"tags/v2.2.2-rc1-0-gb8df91e175fba53212b464304531234b7559636b\", \n \"server-version\" : \"2.2.2-rc1\", \n \"sizeof int\" : \"4\", \n \"sizeof void*\" : \"8\", \n \"v8-version\" : \"3.16.14\" \n } \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Returns the version information. <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"server\" : \"arango\", \n \"version\" : \"2.3.0-alpha1\" \n}\n</code></pre><br><br><br> Returns the version information with details. <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/version?details=true\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"server\" : \"arango\", \n \"version\" : \"2.3.0-alpha1\", \n \"details\" : { \n \"build-date\" : \"2014-09-14 17:10:02\", \n \"configure\" : \"'./configure' '--enable-all-in-one-v8' '--enable-all-in-one-libev' '--enable-all-in-one-icu' '--enable-maintainer-mode' '--disable-mruby'\", \n \"icu-version\" : \"52.1\", \n \"libev-version\" : \"4.11\", \n \"openssl-version\" : \"OpenSSL 0.9.8y 5 Feb 2013\", \n \"repository-version\" : \"heads/2.3-0-g397c1fc062e174e96efc3650ac84746e53fa453a-dirty\", \n \"server-version\" : \"2.3.0-alpha1\", \n \"sizeof int\" : \"4\", \n \"sizeof void*\" : \"8\", \n \"v8-version\" : \"3.16.14\" \n } \n}\n</code></pre><br>@endDocuBlock",
"nickname": "ReturnServerVersion"
}
],