Questions tagged [metamug]
Metamug is an API server for building REST APIs. Metamug uses XML files for configuring resources. Metamug primarily uses MySQL as its database. Use this tag to ask questions related to resource configuration, querying and API development with metamug.
17
questions
1
vote
1
answer
57
views
404 for an existing valid REST API resource
I saved the below xml resource file as state.xml and was trying to access it from localhost:7000/covid/v1.0/state
<?xml version="1.0" encoding="UTF-8" ?>
<Resource xmlns="http://xml.metamug....
1
vote
1
answer
108
views
Empty JSON Http Response for Text
<Resource xmlns="http://xml.metamug.net/resource/1.0" v="1.0">
<Request method="GET">
<Desc> Example Resource </Desc>
<Text id="msg"> Hello World </Text>
&...
0
votes
1
answer
82
views
REST API Design two resources together
How to make API as /account/login in the metamug console. I already have the account resource. But I want login to be accessible with it.
Since metamug doesn't allow two resources together, how can I ...
1
vote
1
answer
53
views
Stop API execution flow on empty result set
I want the execution of my request to stop if one of my query tags returns an empty result set.
<Query> Select * from sample_table </Query>
1
vote
1
answer
403
views
Multiple query result in a single result json
Below is my request tag.
<Request method="GET" >
<Query>
select colA as "a", colB as "b", colC "c"
from tableX
</Query>
<Query>
select colP as "a", ...
2
votes
2
answers
928
views
Query IN Clause with parameter
Here is my query,
<Request method="GET">
<Query>
select user_id from user
where user_type in ($userTypes)
</Query>
</Request>
How do I sent multiple values ...
2
votes
1
answer
70
views
Save Form Insert Query
My resource file is correct. But When I call the api. I get 500 error.
I checked the query in SQL Editor it works correctly.
<?xml version="1.0" encoding="UTF-8" ?>
<Resource xmlns="http://...
3
votes
1
answer
75
views
Mutliple SQL statements in a single HTTP Request - metamug
In the following resource file, I'm trying to perform 2 insert operations for the same request.(form submit)
But getting 500 error from the API.
<?xml version="1.0" encoding="UTF-8" ?>
<...
2
votes
1
answer
36
views
Invalid content was found starting with element metamug
I'm getting the following error, when trying to save the resource file
Invalid content was found starting with element '{"http://xml.metamug.net/resource/1.0":update}'. One of '{"http://xml.metamug....
2
votes
1
answer
25
views
When condition not working metamug resource file
<?xml version="1.0" encoding="UTF-8" ?>
<Resource xmlns="http://xml.metamug.net/resource/1.0" v="1.0">
<Request method="GET">
<Desc> Example Resource </Desc>
...
3
votes
1
answer
51
views
how to get "int" value result in json as "string" using metamug
for example: I'm getting [{"id":100}]
while i require: [{"id":"100"}]
1
vote
1
answer
42
views
LIKE Query Not working Metamug
I'm sending $q parameter for performing text search with LIKE as follows.
But I'm getting error in the json response.
<Query when="$type eq 'search'">
SELECT name, rating FROM movie
...
4
votes
2
answers
3k
views
How to use less than < and greater than > symbols in metamug XML
How to use less than "<" and greater than ">" symbols in metamug XML in the resource file and SQL console
select *
from tbl_reservation
where fare > 100
and fare < 50000
1
vote
1
answer
253
views
Pagination on select query metamug
This is my current resource file. I'm using MySQL Query Pagination Feature
<?xml version="1.0" encoding="UTF-8" ?>
<Resource xmlns="http://xml.metamug.net/resource/1.0" v="1.0">
<...
1
vote
1
answer
49
views
Insert query not working - Incorrect query or constraint violation
I've created a sample resource file for testing on metamug's API.
<Resource v="0.8" xmlns="http://xml.metamug.net/resource/1.0">
<Request method="GET" >
<Query>
insert ...
2
votes
1
answer
413
views
generate json event for full calendar from sql query
I'm using item request to retrieve attendance information for a student using his/her student id.
<Request method="GET" item="true">
<Query>
select subject, in_time, out_time
...
2
votes
1
answer
94
views
Unable to get data for id
I'm using metamug to build my REST API. I wrote a query to fetch name of student, provided the id. But doesn't work. Gives 204 status code in response.
<Request method="GET">
<Desc> ...