ApiController

Extends \Symfony\Bundle\FrameworkBundle\Controller\AbstractController

Endpoint controller for Incoming XML bounce, fetch, and target /api routes

Route

("/api")

package

App\Controller

Methods

ApiController constructor.

__construct(\Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface $params, \Psr\Log\LoggerInterface $logger, \Symfony\Component\HttpKernel\Profiler\Profiler|NULL $profiler = null) 

Arguments

$params

\Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface

$logger

\Psr\Log\LoggerInterface

$profiler

\Symfony\Component\HttpKernel\Profiler\Profiler|NULL

Fetch the Incoming data by either {id} or the default last 25 rows

fetchApiAction(string $type = 'incoming', integer $count = 10, string $order = 'DESC', string $counter = null) : \Symfony\Component\HttpFoundation\Response
FOSRest\Get

("/fetch/{type}/{count}/{order}/{counter}", name="api_fetch")

SWG\Get

( path="/api/fetch/{type}/{count}/{order}/{counter}", summary="Get data received or sent", description="Fetch data received or sent from the database tables Incoming and Outgoing", operationId="fetchApiAction", produces={"application/json"},

SWG\Response

( response=200, description="Returns JSON output of type: incoming OR outgoing, count: 1 ~ nth, order: desc or asc" ) )

Arguments

$type

string

$count

integer

$order

string

$counter

string

Response

\Symfony\Component\HttpFoundation\Response

Provides /api/incoming endpoint to receive incoming data and resend to assigned targets

incomingApiAction(\Symfony\Component\HttpFoundation\Request $request, \Symfony\Component\HttpKernel\KernelInterface $kernel, boolean $target = false) : \Symfony\Component\HttpFoundation\Response
FOSRest\Post

("/incoming", name="api_incoming")

SWG\Post

( path="/api/incoming", summary="Incoming GPS XML POST data endpoint", description="Receives incoming Moovbox GPS traffic and transmits the data to outgoing target groups", operationId="incomingApiAction", produces={"plain/text", "plain/html"}, @SWG\Response( response=200, description="Incoming URL to receive and transmit data to proxy target groups" ) )

Throws
\Exception

Arguments

$request

\Symfony\Component\HttpFoundation\Request

$kernel

\Symfony\Component\HttpKernel\KernelInterface

$target

boolean

Response

\Symfony\Component\HttpFoundation\Response

Render the documentation in an IFRAME locally with our template seamlessly

phpDocApiAction() : \Symfony\Component\HttpFoundation\Response
Route

("/php", methods={"GET"}, name="app.phpdoc")

Response

\Symfony\Component\HttpFoundation\Response

Provides /api/target endpoint to receive XML post data and record in database

postApiAction(\Symfony\Component\HttpFoundation\Request $request) : \Symfony\Component\HttpFoundation\Response
FOSRest\Post

("/target", name="api_target")

SWG\Post

( path="/api/target", summary="Post GPS XML data but do not bounce - pseudo endpoint", description="Target Endpoint for testing incoming data and performing analysis", operationId="postApiAction", produces={"application/json","applicaton/xml","plain/html"}, @SWG\Response( response=200, description="Target endpoint for incoming data analysis and testing" ) )

Throws
\Exception

Arguments

$request

\Symfony\Component\HttpFoundation\Request

Response

\Symfony\Component\HttpFoundation\Response

Renders /api/endpoint template in response to a received target post

renderOutput(\Symfony\Component\HttpFoundation\Request $request, string $content, array $headers) : \Symfony\Component\HttpFoundation\Response

Arguments

$request

\Symfony\Component\HttpFoundation\Request

$content

string

$headers

array

Response

\Symfony\Component\HttpFoundation\Response

Properties

Application parameters from config/*.yaml

params : \Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface
var

Type(s)

\Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface

Pass in the system logger interface

logger : \Psr\Log\LoggerInterface
var

Type(s)

\Psr\Log\LoggerInterface