Apache/CXF: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 1: | Line 1: | ||
==Versioning== | ==Versioning== | ||
<source lang="bash"> | <source lang="bash"> | ||
curl http://api.chorke.org/academia | curl http://api.chorke.org/academia/v1.0.00/api/projects | ||
curl http://api.chorke.org/academia | curl http://api.chorke.org/academia/v1.0.01/api/projects | ||
curl http://api.chorke.org/academia | curl http://api.chorke.org/academia/v1.1.00/api/projects | ||
curl http://api.chorke.org/academia | curl http://api.chorke.org/academia/v1.1.10/api/projects | ||
</source> | |||
<source lang="bash"> | |||
curl http://api.chorke.org/academia/v1.1.10/app/projects | |||
curl http://api.chorke.org/academia/v1.1.10/gui/projects | |||
</source> | </source> | ||
Line 14: | Line 16: | ||
# find all | # find all | ||
curl --request GET \ | curl --request GET \ | ||
--url http://api.chorke.org/academia | --url http://api.chorke.org/academia/v1.0.00/api/projects \ | ||
--header 'authorization: Basic dXNlcjpwYXNz' \ | --header 'authorization: Basic dXNlcjpwYXNz' \ | ||
--header 'content-type: application/json' \ | --header 'content-type: application/json' \ | ||
Line 23: | Line 25: | ||
# find by id | # find by id | ||
curl --request GET \ | curl --request GET \ | ||
--url http://api.chorke.org/academia | --url http://api.chorke.org/academia/v1.0.00/api/projects/1 \ | ||
--header 'authorization: Basic dXNlcjpwYXNz' \ | --header 'authorization: Basic dXNlcjpwYXNz' \ | ||
--header 'content-type: application/json' \ | --header 'content-type: application/json' \ | ||
Line 32: | Line 34: | ||
# create/save | # create/save | ||
curl --request POST \ | curl --request POST \ | ||
--url http://api.chorke.org/academia | --url http://api.chorke.org/academia/v1.0.00/api/projects \ | ||
--header 'authorization: Basic dXNlcjpwYXNz' \ | --header 'authorization: Basic dXNlcjpwYXNz' \ | ||
--header 'content-type: application/json' \ | --header 'content-type: application/json' \ | ||
Line 42: | Line 44: | ||
# update by id | # update by id | ||
curl --request PUT \ | curl --request PUT \ | ||
--url http://api.chorke.org/academia | --url http://api.chorke.org/academia/v1.0.00/api/projects/1 \ | ||
--header 'authorization: Basic dXNlcjpwYXNz' \ | --header 'authorization: Basic dXNlcjpwYXNz' \ | ||
--header 'content-type: application/json' \ | --header 'content-type: application/json' \ | ||
Line 52: | Line 54: | ||
# delete by id | # delete by id | ||
curl --request DELETE \ | curl --request DELETE \ | ||
--url http://api.chorke.org/academia | --url http://api.chorke.org/academia/v1.0.00/api/projects/1 \ | ||
--header 'authorization: Basic dXNlcjpwYXNz' \ | --header 'authorization: Basic dXNlcjpwYXNz' \ | ||
--header 'content-type: application/json' \ | --header 'content-type: application/json' \ |
Revision as of 23:35, 2 March 2019
Versioning
curl http://api.chorke.org/academia/v1.0.00/api/projects
curl http://api.chorke.org/academia/v1.0.01/api/projects
curl http://api.chorke.org/academia/v1.1.00/api/projects
curl http://api.chorke.org/academia/v1.1.10/api/projects
curl http://api.chorke.org/academia/v1.1.10/app/projects
curl http://api.chorke.org/academia/v1.1.10/gui/projects
JAX-RS
# find all
curl --request GET \
--url http://api.chorke.org/academia/v1.0.00/api/projects \
--header 'authorization: Basic dXNlcjpwYXNz' \
--header 'content-type: application/json' \
--header 'cache-control: no-cache'
# find by id
curl --request GET \
--url http://api.chorke.org/academia/v1.0.00/api/projects/1 \
--header 'authorization: Basic dXNlcjpwYXNz' \
--header 'content-type: application/json' \
--header 'cache-control: no-cache'
# create/save
curl --request POST \
--url http://api.chorke.org/academia/v1.0.00/api/projects \
--header 'authorization: Basic dXNlcjpwYXNz' \
--header 'content-type: application/json' \
--header 'cache-control: no-cache' \
--data '{"name": "Academia"}'
# update by id
curl --request PUT \
--url http://api.chorke.org/academia/v1.0.00/api/projects/1 \
--header 'authorization: Basic dXNlcjpwYXNz' \
--header 'content-type: application/json' \
--header 'cache-control: no-cache' \
--data '{"id": "1", "name": "Academia"}'
# delete by id
curl --request DELETE \
--url http://api.chorke.org/academia/v1.0.00/api/projects/1 \
--header 'authorization: Basic dXNlcjpwYXNz' \
--header 'content-type: application/json' \
--header 'cache-control: no-cache' \
--data '{"id": "1", "name": "Academia"}'