apyhub
DEVELOPER TOOLS · FILE CONVERSION

Convert JSON to GraphQL Schema API

What it does

JSON to GraphQL SDL converts a JSON object into GraphQL schema definition language (SDL). Send raw JSON, upload a JSON file, or point it at a public JSON URL, and get SDL back as inline text, a downloadable .graphql file, or a pre-signed S3 URL depending on the endpoint you choose.

Use it when you need to bootstrap a GraphQL schema from an existing payload shape, turn sample responses into a starting schema, or generate a schema artifact for internal tooling. The conversion endpoints accept a non-empty JSON object for raw input, or a JSON file/URL that resolves to a JSON document. File-based endpoints require application/json and a non-empty JSON object.

The outputs are simple and explicit: inline endpoints return the SDL as a string, file endpoints return a downloadable GraphQL SDL file, and URL endpoints return an object with a data field containing a pre-signed S3 URL. That makes it easy to wire the result into build steps, schema review flows, or automated code generation.

▣ ENDPOINT 01 / 09
POST
Convert JSON from URL to GraphQL SDL (inline response)
https://api.eu.apyverse.com/apyhub/convert-json-to-graphql-sdl/json-url-graphql-raw

QUICKSTART

GUIDE

Quickstart

Convert a JSON file at a public URL into GraphQL SDL by sending the file URL.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-json-to-graphql-sdl/json-url-graphql-raw" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.json"}'

What you'll get back

Returns a JSON string containing the generated GraphQL SDL.

"type Query {\n  ..."
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Public URL pointing to a JSON file. The response must have a content-type that includes `application/json`, `text/plain`, `application/octet-stream`, or `binary/octet-stream`; or a `content-disposition` header / URL path that includes `.json`.

About this endpoint

What it does

Converts the JSON document available at the provided URL into GraphQL SDL, returning the SDL inline in the response body. The request body must include a url pointing to a publicly accessible JSON resource.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublic URL pointing to a JSON file. Must be a valid URI. The response must have a content-type including application/json, text/plain, application/octet-stream, or binary/octet-stream; or a content-disposition header / URL path that includes .json.

Response

Returns a plain string containing the GraphQL SDL generated from the JSON at the supplied URL.

ParameterTypeMandatoryDescription
valueStringYesThe generated GraphQL SDL returned inline as the response body.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 09
POST
Convert JSON from URL to GraphQL SDL (S3 signed URL)
https://api.eu.apyverse.com/apyhub/convert-json-to-graphql-sdl/json-url-graphql-url

QUICKSTART

GUIDE

Quickstart

Convert a publicly accessible JSON file URL into GraphQL SDL and save the output with a name.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-json-to-graphql-sdl/json-url-graphql-url?output=my-schema" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.json"}'

What you'll get back

Returns a JSON object with a data string field containing a pre-signed S3 URL to the converted file.

{
  "data": "https://..."
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Public URL pointing to a JSON file. The response must have a content-type that includes `application/json`, `text/plain`, `application/octet-stream`, or `binary/octet-stream`; or a `content-disposition` header / URL path that includes `.json`.

About this endpoint

What it does

Converts JSON fetched from a URL into GraphQL SDL, then returns a pre-signed S3 URL for the generated file. The request body provides the source url; an optional output query parameter lets you specify the output name.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublic URL pointing to a JSON file. Must be a URI. The response must have a content-type that includes application/json, text/plain, application/octet-stream, or binary/octet-stream; or a content-disposition header / URL path that includes .json.

Response

Returns a JSON object with a data string field. The data value is a URI for the pre-signed S3 URL to the converted file.

ParameterTypeMandatoryDescription
dataStringYesPre-signed S3 URL to the converted file.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 03 / 09
POST
Convert uploaded JSON file to GraphQL SDL (downloadable file)
https://api.eu.apyverse.com/apyhub/convert-json-to-graphql-sdl/json-file-graphql-file

QUICKSTART

GUIDE

Quickstart

Upload a JSON file to convert it into a GraphQL SDL file.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-json-to-graphql-sdl/json-file-graphql-file" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/input.json" \
  -F "output=my-schema"

What you'll get back

Returns a downloadable GraphQL SDL file (.graphql) as binary content.

(binary file)
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
JSON file to convert. Must have MIME type application/json and contain a non-empty JSON object.

About this endpoint

What it does

Converts an uploaded JSON file into a downloadable GraphQL SDL file. The request sends a JSON file in the body, and the response is a binary .graphql file.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name for the generated file. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
fileStringYesJSON file to convert. Must be uploaded as a binary file, use MIME type application/json, and contain a non-empty JSON object.

Response

Returns a binary downloadable GraphQL SDL (.graphql) file.

ParameterTypeMandatoryDescription

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 04 / 09
POST
Convert uploaded JSON file to GraphQL SDL (S3 signed URL)
https://api.eu.apyverse.com/apyhub/convert-json-to-graphql-sdl/json-file-graphql-url

QUICKSTART

GUIDE

Quickstart

Upload a JSON file and get back a pre-signed URL for the converted GraphQL SDL file.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-json-to-graphql-sdl/json-file-graphql-url?output=my-schema" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/input.json"

What you'll get back

Returns a JSON object with a data string field containing a pre-signed S3 URL to the converted file.

{
  "data": "https://s3.amazonaws.com/..."
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
JSON file to convert. Must have MIME type application/json and contain a non-empty JSON object.

About this endpoint

What it does

Converts an uploaded JSON file into GraphQL SDL and returns a pre-signed S3 URL where the converted file can be retrieved. The request accepts a JSON file upload and an optional output query parameter to name the generated schema output.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name for the generated schema. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
fileStringYesJSON file to convert. Must be uploaded as binary data, use MIME type application/json, and contain a non-empty JSON object.

Response

Returns a JSON object with a data string field containing a URI. This URI is a pre-signed S3 URL for the converted file.

ParameterTypeMandatoryDescription
dataStringYesPre-signed S3 URL to the converted file.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 05 / 09
POST
Convert raw JSON body to GraphQL SDL (inline response)
https://api.eu.apyverse.com/apyhub/convert-json-to-graphql-sdl/json-raw-graphql-raw

QUICKSTART

GUIDE

Quickstart

Convert a JSON object to GraphQL SDL with a minimal JSON body.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-json-to-graphql-sdl/json-raw-graphql-raw" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Acme","id":"123"}'

What you'll get back

Returns a JSON string containing the generated GraphQL SDL.

"type Query {\n  ...\n}"
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
A non-empty JSON object (not an array) to convert to GraphQL SDL.

About this endpoint

What it does

Converts a raw JSON object in the request body into GraphQL SDL and returns the SDL as a plain string response.

Request Body

ParameterTypeMandatoryDescription
bodyObjectYesA non-empty JSON object (not an array) to convert to GraphQL SDL. additionalProperties is allowed.

Response

Returns a plain string containing the generated GraphQL SDL.

ParameterTypeMandatoryDescription
responseStringYesThe converted GraphQL SDL returned inline as the response body.

Body

Name
Type
Description
bodyREQUIRED
object
A non-empty JSON object (not an array) to convert to GraphQL SDL.
▣ ENDPOINT 06 / 09
POST
Convert raw JSON body to GraphQL SDL (S3 signed URL)
https://api.eu.apyverse.com/apyhub/convert-json-to-graphql-sdl/json-raw-graphql-url

QUICKSTART

GUIDE

Quickstart

Convert a JSON object into GraphQL SDL and return a pre-signed download URL.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-json-to-graphql-sdl/json-raw-graphql-url?output=my-schema" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Example","age":30}'

What you'll get back

Returns a JSON object with a data string field containing a pre-signed S3 URL to the converted file.

{
  "data": "https://s3.amazonaws.com/..."
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
A non-empty JSON object (not an array) to convert to GraphQL SDL.

About this endpoint

What it does

Converts a raw JSON body into GraphQL SDL and returns a pre-signed S3 URL for the generated file. The request body must be a non-empty JSON object, and you can optionally provide an output query parameter to influence the output name.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name for the generated file. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
bodyObjectYesA non-empty JSON object to convert to GraphQL SDL. Additional properties are allowed.

Response

Returns a JSON object with a data string field formatted as a URI — a pre-signed S3 URL to the converted file. Success returns a 200 response.

ParameterTypeMandatoryDescription
dataStringYesPre-signed S3 URL to the converted file.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object
A non-empty JSON object (not an array) to convert to GraphQL SDL.
▣ ENDPOINT 07 / 09
POST
Convert JSON from URL to GraphQL SDL (downloadable file)
https://api.eu.apyverse.com/apyhub/convert-json-to-graphql-sdl/json-url-graphql-file

QUICKSTART

GUIDE

Quickstart

Convert a JSON file at a public URL into a downloadable GraphQL SDL file.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-json-to-graphql-sdl/json-url-graphql-file?output=my-schema" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.json"}'

What you'll get back

Returns a downloadable GraphQL SDL file (.graphql) as binary data.

(binary file download)
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Public URL pointing to a JSON file. The response must have a content-type that includes `application/json`, `text/plain`, `application/octet-stream`, or `binary/octet-stream`; or a `content-disposition` header / URL path that includes `.json`.

About this endpoint

What it does

Converts a JSON document available at a public URL into a GraphQL SDL file and returns it as a downloadable binary response.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput file name stem. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublic URL pointing to a JSON file. Must be a valid URI. The response must have a content-type that includes application/json, text/plain, application/octet-stream, or binary/octet-stream; or a content-disposition header / URL path that includes .json.

Response

Returns a downloadable binary file containing GraphQL SDL (.graphql). The response is a binary string with no JSON wrapper.

ParameterTypeMandatoryDescription
response bodyStringYesDownloadable GraphQL SDL (.graphql) file.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 08 / 09
POST
Convert uploaded JSON file to GraphQL SDL (inline response)
https://api.eu.apyverse.com/apyhub/convert-json-to-graphql-sdl/json-file-graphql-raw

QUICKSTART

GUIDE

Quickstart

Upload a JSON file to convert it into GraphQL SDL.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-json-to-graphql-sdl/json-file-graphql-raw" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/schema.json"

What you'll get back

Returns a plain string containing the generated GraphQL SDL.

type Query {
  ...
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
JSON file to convert. Must have MIME type application/json and contain a non-empty JSON object.

About this endpoint

What it does

Converts an uploaded JSON file into GraphQL SDL and returns the SDL inline in the response. The request body must include a JSON file upload in the file field.

Request Body

ParameterTypeMandatoryDescription
fileStringYesJSON file to convert. Must have MIME type application/json and contain a non-empty JSON object.

Response

Returns a plain string containing the generated GraphQL SDL. The success response body is a single string value, not a JSON object.

ParameterTypeMandatoryDescription
valueStringYesThe generated GraphQL SDL.

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 09 / 09
POST
Convert raw JSON body to GraphQL SDL (downloadable file)
https://api.eu.apyverse.com/apyhub/convert-json-to-graphql-sdl/json-raw-graphql-file

QUICKSTART

GUIDE

Quickstart

Convert a JSON object into a downloadable GraphQL SDL file.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-json-to-graphql-sdl/json-raw-graphql-file" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"title":"Hello","count":1}'

What you'll get back

Returns a downloadable GraphQL SDL file as binary content (string with format: binary). The response body is the .graphql file itself.

# binary file download
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
A non-empty JSON object (not an array) to convert to GraphQL SDL.

About this endpoint

What it does

Converts a raw JSON object in the request body into GraphQL SDL and returns the result as a downloadable .graphql file.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoDefault: sample-output

Request Body

ParameterTypeMandatoryDescription
bodyObjectYesA non-empty JSON object (not an array) to convert to GraphQL SDL. additionalProperties: true; minProperties: 1.

Response

Returns a downloadable GraphQL SDL file as a binary response. The output schema is a binary string, representing a .graphql file.

ParameterTypeMandatoryDescription
binaryStringYesBinary file content for the generated GraphQL SDL (.graphql).

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object
A non-empty JSON object (not an array) to convert to GraphQL SDL.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.