agitation / api-bundle
This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.
1.8.4
2018-04-03 14:19 UTC
Requires
- agitation/base-bundle: ~1.0
- agitation/intl-bundle: ~1.0
- agitation/seed-bundle: ~1.0
- agitation/validation-bundle: ~1.1
Suggests
- agitation/user-bundle: Required to check for user capabilities. Without it, all calls requiring a user capability will fail.
This package is not auto-updated.
Last update: 2022-07-24 12:08:56 UTC
README
Agitation is an e-commerce framework, based on Symfony2, focussed on extendability through plugged-in APIs, UIs, payment modules and other components.
AgitApiBundle
This bundle provides a pluggable API handler. It allows other bundles to define their own, independent API endpoints, calls and request/response objects.
API URLs
A simple call may look like this:
https://example.com/api/namespace.v1/ExampleEndpoint.doSomething?request={"foo":"bar"}
namespace ^^^^^^^^^
namespace version ^^
controller name ^^^^^^^^^^^^^^^
endpoint name ^^^^^^^^^^^
actual request ^^^^^^^^^^^^^^^^^^^^^
API annotations
The controllers, endpoints and objects are annotated, these annotations provide meta information to ensure consistent API calls, such as:
- Authentication/authorization: Endpoint calls define the required capabilities (through
agitation/user) to access a call. - Validation: Expected request/response objects, and their allowed values.
- Automatical documentation: The AgitSdkDocBundle provides tools to automatically generate Markdown documentation.
- Export API endpoints and objects to JavaScript for simple client-side usage.