2021-10-06 10:15:14 +03:00
|
|
|
- description: Try to add a GET rest endpoint with no argument
|
|
|
|
url: /v1/query
|
|
|
|
status: 200
|
|
|
|
response:
|
|
|
|
message: success
|
|
|
|
query:
|
|
|
|
type: create_rest_endpoint
|
|
|
|
args:
|
|
|
|
url: simple
|
|
|
|
name: simple
|
|
|
|
methods:
|
2021-12-22 11:30:15 +03:00
|
|
|
- GET
|
2021-10-06 10:15:14 +03:00
|
|
|
definition:
|
|
|
|
query:
|
|
|
|
collection_name: test_collection
|
|
|
|
query_name: simple_query
|
|
|
|
|
|
|
|
|
|
|
|
- description: Call openapi json endpoint
|
|
|
|
url: /api/swagger/json
|
|
|
|
method: GET
|
|
|
|
status: 200
|
|
|
|
query:
|
|
|
|
response:
|
|
|
|
openapi: 3.0.0
|
|
|
|
info:
|
|
|
|
version: ''
|
|
|
|
title: Rest Endpoints
|
2021-12-22 11:30:15 +03:00
|
|
|
description: This OpenAPI specification is automatically generated by Hasura.
|
2021-10-06 10:15:14 +03:00
|
|
|
paths:
|
|
|
|
/api/rest/simple:
|
|
|
|
get:
|
|
|
|
summary: simple
|
2021-12-22 11:30:15 +03:00
|
|
|
description: "***\nThe GraphQl query for this endpoint is:\n``` graphql\n\
|
|
|
|
query { test_table { first_name last_name } }\n```"
|
2021-10-14 13:31:21 +03:00
|
|
|
parameters:
|
2021-12-22 11:30:15 +03:00
|
|
|
- schema:
|
|
|
|
type: string
|
|
|
|
in: header
|
|
|
|
name: x-hasura-admin-secret
|
|
|
|
description: Your x-hasura-admin-secret will be used for authentication
|
|
|
|
of the API request.
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
properties:
|
|
|
|
test_table:
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
first_name:
|
|
|
|
title: String
|
|
|
|
type: string
|
|
|
|
last_name:
|
|
|
|
title: String
|
|
|
|
type: string
|
|
|
|
type: array
|
|
|
|
nullable: false
|
|
|
|
description: Responses for GET /api/rest/simple
|
2021-10-06 10:15:14 +03:00
|
|
|
components: {}
|
|
|
|
- description: Try to remove the endpoint
|
|
|
|
url: /v1/query
|
|
|
|
status: 200
|
|
|
|
response:
|
|
|
|
message: success
|
|
|
|
query:
|
|
|
|
type: drop_rest_endpoint
|
|
|
|
args:
|
2021-10-14 13:31:21 +03:00
|
|
|
name: simple
|