Webservice - Data Export
Through this functionality it is possible, via request to the WebService, to obtain data from the CITSmart Database tables for an XML file.The query conditions for the records that will be returned are passed as parameters via URL as the example below:
http://localhost/citsmart/services/data/cargos/19 This request returns the records of the positions table where the idcargo, that is, the primary key of the charges table, is equal to 19. The query generated with this request is this:
SELECT IDCARGO, NOMECARGO, DATAINICIO, DATAFIM, IDDESCRICAOCARGO FROM CARGOS WHERE IDCARGO = 19 Below are listed the possibilities and parameters that can be used for data recovery using this feature:
PK Consultation
It is possible to obtain a record according to a Primary Key field of the reported table.
http://<SERVER ADDRESS>/citsmart/services/data/<TABLE>/<PK VALUE>Query by Pk and Where
It is possible to obtain a record according to a Primary Key field of the given table and that meets the conditions of a where clause.
http://<SERVER ADDRESS*>/citsmart/services/data/<TABLE>/<PK_VALUE>?cond=<ADDITIONAL_CLAUSES>Where And Ordered Consultation
It is possible to obtain ordered records of a table according to the conditions of a where clause and field for sorted ordering.
http://<SERVER ADDRESS*>/citsmart/services/data/<TABLE>?cond=<WHERE_CRITERIA>&order=<ORDERING FIELD>Query with links to Where and Ordering
It is possible to obtain ordered records of a table, along with the records with which they are linked, according to the conditions of a where clause and field for ordering.
http://<SERVER ADDRESS*>/citsmart/services/data/<TABLE>?cond=<WHERE_CRITERIA>&order=<ORDERING FIELD>&links=<s_ou_n>