Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
651588a8
Commit
651588a8
authored
Jun 21, 2019
by
Carsten Rose
Browse files
Update Manual.rst for new Api path
parent
ca865635
Pipeline
#2006
passed with stages
in 2 minutes and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Documentation/Manual.rst
View file @
651588a8
...
...
@@ -7608,24 +7608,24 @@ four most used REST HTTP methods:
GET - Read
Shows a list of database records or a single record. The QFQ form holds the definition which and what to show.
List: ``curl -X GET "http://localhost/qfq/typo3conf/ext/qfq/Classes/
a
pi/rest.php/person/``
List: ``curl -X GET "http://localhost/qfq/typo3conf/ext/qfq/Classes/
A
pi/rest.php/person/``
Data (id=123): ``curl -X GET "http://localhost/qfq/typo3conf/ext/qfq/Classes/
a
pi/rest.php/person/123``
Data (id=123): ``curl -X GET "http://localhost/qfq/typo3conf/ext/qfq/Classes/
A
pi/rest.php/person/123``
POST - Create new record
The QFQ form defines wich columns will be written in which table. Most of QFQ Form functionality can be used. Example:
``curl -X POST "http://localhost/qfq/typo3conf/ext/qfq/Classes/
a
pi/rest.php/person/" -d '
{
"name":"Miller","firstname":"Joe"
}
'``
``curl -X POST "http://localhost/qfq/typo3conf/ext/qfq/Classes/
A
pi/rest.php/person/" -d '
{
"name":"Miller","firstname":"Joe"
}
'``
PUT - Update a record
Similar to POST, but a given record will be updated.
``curl -X PUT "http://localhost/qfq/typo3conf/ext/qfq/Classes/
a
pi/rest.php/person/123" -d '
{
"name":"Miller","firstname":"Joe"
}
'``
``curl -X PUT "http://localhost/qfq/typo3conf/ext/qfq/Classes/
A
pi/rest.php/person/123" -d '
{
"name":"Miller","firstname":"Joe"
}
'``
DELETE
-
Delete
a
record
Similar
to
a
QFQ
Delete
form
.
``
curl
-X
DELETE
"http://localhost/qfq/typo3conf/ext/qfq/Classes/
a
pi/rest.php/person/123"
``
``
curl
-X
DELETE
"http://localhost/qfq/typo3conf/ext/qfq/Classes/
A
pi/rest.php/person/123"
``
All
data
will
imported
/
exported
in
JSON
notation
.
...
...
@@ -7636,19 +7636,19 @@ Endpoint
..
tip
::
The
basic
REST
API
endpoint
:
``
<
domain
>/
typo3conf
/
ext
/
qfq
/
Classes
/
a
pi
/
rest
.php
``
The
basic
REST
API
endpoint
:
``
<
domain
>/
typo3conf
/
ext
/
qfq
/
Classes
/
A
pi
/
rest
.php
``
``
<
domain
>/
typo3conf
/
ext
/
qfq
/
Classes
/
a
pi
/
rest
.php
/<
level1
>/<
id1
>/<
level2
>/<
id2
>/.../?<
var1
>=<
value1
>&...
``
``
<
domain
>/
typo3conf
/
ext
/
qfq
/
Classes
/
A
pi
/
rest
.php
/<
level1
>/<
id1
>/<
level2
>/<
id2
>/.../?<
var1
>=<
value1
>&...
``
Append
level
names
and
ids
after
`
.../
rest
.php
/
`
,
each
separated
by
'/'
.
E
.g
.:
1
.
List
of
all
persons
:
`
<
domain
>/
typo3conf
/
ext
/
qfq
/
Classes
/
a
pi
/
rest
.php
/
person
`
2
.
Data
of
person
123
:
`
<
domain
>/
typo3conf
/
ext
/
qfq
/
Classes
/
a
pi
/
rest
.php
/
person
/
123`
3
.
Adresses
of
person
123
:
`
<
domain
>/
typo3conf
/
ext
/
qfq
/
Classes
/
a
pi
/
rest
.php
/
person
/
123
/
address
`
4
.
Adress
details
of
address
45
from
person
123
:
`
<
domain
>/
typo3conf
/
ext
/
qfq
/
Classes
/
a
pi
/
rest
.php
/
person
/
123
/
address
/
45`
1
.
List
of
all
persons
:
`
<
domain
>/
typo3conf
/
ext
/
qfq
/
Classes
/
A
pi
/
rest
.php
/
person
`
2
.
Data
of
person
123
:
`
<
domain
>/
typo3conf
/
ext
/
qfq
/
Classes
/
A
pi
/
rest
.php
/
person
/
123`
3
.
Adresses
of
person
123
:
`
<
domain
>/
typo3conf
/
ext
/
qfq
/
Classes
/
A
pi
/
rest
.php
/
person
/
123
/
address
`
4
.
Adress
details
of
address
45
from
person
123
:
`
<
domain
>/
typo3conf
/
ext
/
qfq
/
Classes
/
A
pi
/
rest
.php
/
person
/
123
/
address
/
45`
QFQ
'Forms'
are
used
as
a
'container'
(
to
define
all
details
).
...
...
@@ -7862,7 +7862,7 @@ Example: ::
form
.parameter.restToken
=
myCrypticString0123456789
Test
via
commandline
:
curl
-X
GET
-H
'Authorization: Token token=myCrypticString0123456789'
"http://localhost/qfq/typo3conf/ext/qfq/Classes/
a
pi/rest.php/person/123/address/"
Test
via
commandline
:
curl
-X
GET
-H
'Authorization: Token token=myCrypticString0123456789'
"http://localhost/qfq/typo3conf/ext/qfq/Classes/
A
pi/rest.php/person/123/address/"
The
static
setup
with
``
form
.parameter.restToken
=
myCrypticString0123456789
``
is
fine
,
as
long
as
only
one
token
exist
.
In
case
of
multiple
tokens
,
replace
the
static
string
against
a
SQL
query
.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment