apyhub
DEVELOPER TOOLS · FILE CONVERSION

Convert YAML to JSON API

Hosted on ApyHub

What it does

YAML to JSON Converter turns YAML into JSON from a raw request body, an uploaded file, or a public URL. You can receive the result inline, as a downloadable JSON file, or as a pre-signed S3 URL.

Use it when your app needs to ingest YAML config, migration data, or partner files and hand back JSON to another service. Send raw YAML in content, or provide a YAML file upload, or pass a public url to a YAML document. For URL- and file-based flows, you can also set the optional output query parameter to name the generated artifact.

The inline endpoints return parsed JSON as an object or array. The file endpoints return a downloadable JSON file. The URL endpoints return a data field containing a pre-signed S3 URL that points to the converted JSON file and expires after 5 minutes.

YAML to JSON Converter is a fit for build pipelines, content ingestion, and backend tooling where you need a predictable JSON form of YAML without writing your own parser.

▣ ENDPOINT 01 / 09
POST
Convert YAML at URL → S3 signed URL
http://localhost:8080/apyhub/convert-yaml-to-json/yaml-url-json-url
QUICKSTARTGUIDE

Quickstart

Convert a YAML file from a public URL into JSON and return a pre-signed download link.

curl -X POST "http://localhost:8080/apyhub/convert-yaml-to-json/yaml-url-json-url?output=my-converted-data" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.yaml"}'

What you'll get back

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

{
  "data": "https://s3.amazonaws.com/bucket/uuid_sample-output.json?..."
}
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*
Publicly accessible URL pointing to a YAML file.

About this endpoint

What it does

Converts a YAML file fetched from a publicly accessible URL into JSON and returns a pre-signed S3 URL where the converted JSON file can be downloaded.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name used when generating the converted file URL. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible URL pointing to a YAML file. Must be a URI.

Response

Returns a JSON object with a data string field containing a pre-signed S3 URL for the converted JSON file. The URL is valid for 5 minutes.

ParameterTypeMandatoryDescription
dataStringYesPre-signed S3 URL pointing to the converted JSON file. Must be a URI.

Notes

The returned data URL is time-limited and valid for 5 minutes, so download the converted file before it expires.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 09
POST
Convert raw YAML body → downloadable JSON file
http://localhost:8080/apyhub/convert-yaml-to-json/yaml-raw-json-file
QUICKSTARTGUIDE

Quickstart

Convert raw YAML into a downloadable JSON file.

curl -X POST "http://localhost:8080/apyhub/convert-yaml-to-json/yaml-raw-json-file?output=sample-output" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content":"name: Alice\nage: 30"}'

What you'll get back

Returns a downloadable JSON file as binary content (string with format: "binary"), containing the converted data.

<JSON 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*
Raw YAML string to convert.

About this endpoint

What it does

Converts a raw YAML string into a downloadable JSON file. The request sends the YAML content in the body and can optionally set an output query parameter to influence the output file name or label.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoDefault: sample-output

Request Body

ParameterTypeMandatoryDescription
contentStringYesRaw YAML string to convert.

Response

Returns a binary file response containing the converted data as JSON. The output schema is a string with binary format, so the success response is a downloadable JSON file rather than a JSON object.

ParameterTypeMandatoryDescription
responseStringYesBinary JSON file containing the converted data.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 03 / 09
POST
Convert raw YAML body → inline JSON
http://localhost:8080/apyhub/convert-yaml-to-json/yaml-raw-json-raw
QUICKSTARTGUIDE

Quickstart

Send raw YAML in the request body to convert it to JSON.

curl -X POST "http://localhost:8080/apyhub/convert-yaml-to-json/yaml-raw-json-raw" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content":"name: Alice\nage: 30"}'

What you'll get back

Returns either a JSON object with arbitrary top-level fields, or a JSON array. The schema does not define any specific response keys.

{
  "any": "value"
}
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*
Raw YAML string to convert.

About this endpoint

What it does

Converts a raw YAML string in the request body into JSON. The response is either a JSON object or a JSON array, depending on the YAML content.

Request Body

ParameterTypeMandatoryDescription
contentStringYesRaw YAML string to convert.

Response

Returns either a JSON object or a JSON array.

ParameterTypeMandatoryDescription
objectObjectNoReturned when the YAML converts to a JSON object.
arrayObject ArrayNoReturned when the YAML converts to a JSON array.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 04 / 09
POST
Convert raw YAML body → S3 signed URL
http://localhost:8080/apyhub/convert-yaml-to-json/yaml-raw-json-url
QUICKSTARTGUIDE

Quickstart

Convert raw YAML into a JSON file and get back a pre-signed download URL.

curl -X POST "http://localhost:8080/apyhub/convert-yaml-to-json/yaml-raw-json-url?output=my-converted-data" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content":"name: Alice\nage: 30"}'

What you'll get back

Returns a JSON object with a data string field. The data value is a pre-signed S3 URL pointing to the converted JSON file, valid for 5 minutes.

{
  "data": "https://s3.amazonaws.com/bucket/uuid_sample-output.json?..."
}
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*
Raw YAML string to convert.

About this endpoint

What it does

Converts a raw YAML string in the request body into JSON and returns a pre-signed S3 URL for the generated JSON file.

Query Parameter(s)

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

Request Body

ParameterTypeMandatoryDescription
contentStringYesRaw YAML string to convert.

Response

Returns a JSON object with a data string field containing a URI to the converted JSON file.

ParameterTypeMandatoryDescription
dataStringYesPre-signed S3 URL pointing to the converted JSON file. Valid for 5 minutes.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 05 / 09
POST
Convert uploaded YAML file → downloadable JSON file
http://localhost:8080/apyhub/convert-yaml-to-json/yaml-file-json-file
QUICKSTARTGUIDE

Quickstart

Convert a YAML file into a downloadable JSON file.

curl -X POST "http://localhost:8080/apyhub/convert-yaml-to-json/yaml-file-json-file" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.yaml"

What you'll get back

Returns a downloadable JSON file (binary) containing the converted data.

<binary JSON 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*
YAML file to convert. Accepted MIME types: `application/x-yaml`, `text/yaml`, `text/x-yaml`, `application/octet-stream`, `binary/octet-stream`, `text/plain`. Files with `.yaml` or `.yml` extension are also accepted.

About this endpoint

What it does

Converts an uploaded YAML file into a downloadable JSON file. The request uploads the source file, and the response returns the converted JSON as a binary file.

Query Parameter(s)

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

Request Body

ParameterTypeMandatoryDescription
fileStringYesYAML file to convert. Accepted MIME types: application/x-yaml, text/yaml, text/x-yaml, application/octet-stream, binary/octet-stream, text/plain. Files with .yaml or .yml extension are also accepted.

Response

Returns a downloadable JSON file as a binary response containing the converted data.

ParameterTypeMandatoryDescription
binary fileStringYesDownloadable JSON file containing the converted data.

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 06 / 09
POST
Convert uploaded YAML file → inline JSON
http://localhost:8080/apyhub/convert-yaml-to-json/yaml-file-json-raw
QUICKSTARTGUIDE

Quickstart

Upload a YAML file to convert it to JSON.

curl -X POST "http://localhost:8080/apyhub/convert-yaml-to-json/yaml-file-json-raw" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.yaml"

What you'll get back

Returns a JSON object or a JSON array, depending on the converted YAML content. The object form allows any additional properties; the array form contains items of any shape.

{
  "example": "value"
}
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*
YAML file to convert. Accepted MIME types: `application/x-yaml`, `text/yaml`, `text/x-yaml`, `application/octet-stream`, `binary/octet-stream`, `text/plain`. Files with `.yaml` or `.yml` extension are also accepted.

About this endpoint

What it does

Converts an uploaded YAML file into JSON and returns the converted content inline in the response. The request accepts a binary file upload, and the response shape is either a JSON object or a JSON array.

Request Body

ParameterTypeMandatoryDescription
fileStringYesYAML file to convert. Accepted MIME types: application/x-yaml, text/yaml, text/x-yaml, application/octet-stream, binary/octet-stream, text/plain. Files with .yaml or .yml extension are also accepted.

Response

Returns converted JSON inline as either a JSON object with arbitrary properties or a JSON array. The output schema does not define a fixed wrapper or named top-level fields.

ParameterTypeMandatoryDescription
object responseObjectNoA JSON object response with additional, schema-undefined properties.
array responseArrayNoA JSON array response whose item schema is not defined.

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 07 / 09
POST
Convert uploaded YAML file → S3 signed URL
http://localhost:8080/apyhub/convert-yaml-to-json/yaml-file-json-url
QUICKSTARTGUIDE

Quickstart

Upload a YAML file to convert it into a JSON file and return a temporary download link.

curl -X POST "http://localhost:8080/apyhub/convert-yaml-to-json/yaml-file-json-url?output=my-converted-data" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.yaml"

What you'll get back

Returns a JSON object with a data string field containing a pre-signed S3 URL for the converted JSON file, valid for 5 minutes.

{
  "data": "https://s3.amazonaws.com/bucket/uuid_sample-output.json?..."
}
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*
YAML file to convert. Accepted MIME types: `application/x-yaml`, `text/yaml`, `text/x-yaml`, `application/octet-stream`, `binary/octet-stream`, `text/plain`. Files with `.yaml` or `.yml` extension are also accepted.

About this endpoint

What it does

Converts an uploaded YAML file into JSON and returns a pre-signed S3 URL for the generated JSON file.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput file name suffix or label used when generating the converted JSON file. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
fileStringYesYAML file to convert. Accepted MIME types: application/x-yaml, text/yaml, text/x-yaml, application/octet-stream, binary/octet-stream, text/plain. Files with .yaml or .yml extension are also accepted.

Response

Returns a JSON object with a data string field formatted as a URI. The data value is a pre-signed S3 URL pointing to the converted JSON file and is valid for 5 minutes.

AttributeTypeMandatoryDescription
dataStringYesPre-signed S3 URL pointing to the converted JSON file (valid for 5 minutes).

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 08 / 09
POST
Convert YAML at URL → downloadable JSON file
http://localhost:8080/apyhub/convert-yaml-to-json/yaml-url-json-file
QUICKSTARTGUIDE

Quickstart

Convert a YAML file from a public URL and download the resulting JSON file.

curl -X POST "http://localhost:8080/apyhub/convert-yaml-to-json/yaml-url-json-file?output=my-converted-data" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.yaml"}'

What you'll get back

Returns a downloadable JSON file as binary content containing the converted data.

(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.
body*
Publicly accessible URL pointing to a YAML file.

About this endpoint

What it does

Converts a YAML file fetched from a public URL into a downloadable JSON file. You send the source file URL in the request body, and the response is a binary JSON file.

Query Parameter(s)

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

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible URL pointing to a YAML file. Format: URI.

Response

Returns a downloadable JSON file as a binary response. The output schema is a binary string, so the success payload is the converted JSON file content rather than a JSON object.

ParameterTypeMandatoryDescription
fileStringYesBinary JSON file containing the converted data.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 09 / 09
POST
Convert YAML at URL → inline JSON
http://localhost:8080/apyhub/convert-yaml-to-json/yaml-url-json-raw
QUICKSTARTGUIDE

Quickstart

Convert a YAML file from a public URL into JSON by sending the file URL in the request body.

curl -X POST "http://localhost:8080/apyhub/convert-yaml-to-json/yaml-url-json-raw" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.yaml"}'

What you'll get back

Returns a JSON object or a JSON array, depending on the input and conversion result. The response schema does not declare any fixed top-level fields.

{}
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*
Publicly accessible URL pointing to a YAML file.

About this endpoint

What it does

Converts a YAML file fetched from a publicly accessible URL into inline JSON. The response schema allows either a JSON object or a JSON array.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible URL pointing to a YAML file. Must be a valid URI.

Response

Returns JSON in one of two shapes: either a JSON object with arbitrary top-level properties, or a JSON array. The schema does not define fixed response fields beyond that.

ParameterTypeMandatoryDescription
objectObjectNoA JSON object with additional properties allowed.
arrayArrayNoA JSON array.

Body

Name
Type
Description
bodyREQUIRED
object
▣ 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.