apyhub
Back
▣ DEVELOPER TOOLS · FILE CONVERSION

Convert JSON to YAML API

Hosted on ApyHub

What it does

JSON to YAML Converter turns JSON into YAML and returns it as either a downloadable file, raw text, or a pre-signed S3 URL. You can send JSON as an uploaded file, pass a public JSON URL, or submit a raw JSON body.

Use the file-based endpoints when you want a .yaml download, the raw-text endpoints when you want YAML inline in the response, and the URL endpoints when your workflow stores the converted file in S3. The URL inputs accept publicly accessible JSON resources, and the uploaded-file endpoints require a JSON file with application/json mimetype.

This is useful when you need to convert configuration files, sample payloads, or API responses from JSON into YAML for documentation, tooling, or manual review. Send a JSON object and get the same data back in YAML form, without changing the structure by hand.

The service also includes raw-body conversion for non-empty JSON objects, so you can post structured data directly when you already have the payload in your request.

▣ ENDPOINT 01 / 09
POST
Convert JSON from URL to YAML (downloadable file)
https://api.eu.apyhub.com/apyhub/convert-json-to-yaml/json-url-yaml-file

QUICKSTART

GUIDE

Quickstart

Convert a JSON file from a public URL into a downloadable YAML file.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-json-to-yaml/json-url-yaml-file" \
  -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 YAML file (.yaml) as binary content.

# binary file content
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 JSON resource. The URL must return a content-type of application/json, text/plain, application/octet-stream, or binary/octet-stream, or the Content-Disposition / URL path must include ".json".

About this endpoint

What it does

Converts a JSON resource fetched from a public URL into a downloadable YAML file. The request body supplies the source URL, and the response is a binary .yaml file containing the converted data.

Query Parameter(s)

AttributeTypeDescription
outputStringOutput filename prefix. Default: sample-output.

Request Body

ParameterTypeDescription
urlStringPublicly accessible URL pointing to a JSON resource. The URL must return application/json, text/plain, application/octet-stream, or binary/octet-stream, or the Content-Disposition / URL path must include .json. Format: URI.

Response

Returns a binary string representing a downloadable YAML (.yaml) file containing the converted data. The success response is a single binary payload, not a JSON object.

ParameterTypeDescription
responseStringBinary YAML file content. Format: binary.
▣ ENDPOINT 02 / 09
POST
Convert uploaded JSON file to YAML (downloadable file)
https://api.eu.apyhub.com/apyhub/convert-json-to-yaml/json-file-yaml-file

QUICKSTART

GUIDE

Quickstart

Upload a JSON file to convert it into a downloadable YAML file.

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

What you'll get back

Returns a downloadable YAML file (.yaml) as binary content.

# 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.
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. The uploaded file must have mimetype application/json.

About this endpoint

What it does

Converts an uploaded JSON file into a downloadable YAML file. The request sends a binary file upload containing JSON, and the response is a binary YAML file.

Query Parameter(s)

AttributeTypeDescription
outputStringDefault: sample-output; example: my-output

Request Body

ParameterTypeDescription
fileBinaryBinary JSON file to convert. The uploaded file must have mimetype application/json.

Response

Returns a binary downloadable file in YAML format (.yaml) containing the converted data. Success response: 200 OK.

ParameterTypeDescription
binaryStringDownloadable YAML file containing the converted data.

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

▣ ENDPOINT 03 / 09
POST
Convert uploaded JSON file to YAML (S3 signed URL)
https://api.eu.apyhub.com/apyhub/convert-json-to-yaml/json-file-yaml-url

QUICKSTART

GUIDE

Quickstart

Upload a JSON file to convert it to YAML and get back a download URL.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-json-to-yaml/json-file-yaml-url" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.json"

What you'll get back

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

{
  "data": "https://example-bucket.s3.amazonaws.com/converted-file.yaml"
}
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. The uploaded file must have mimetype application/json.

About this endpoint

What it does

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

Query Parameter(s)

AttributeTypeDescription
outputStringDefault: sample-output.

Request Body

ParameterTypeDescription
fileBinaryJSON file to convert. The uploaded file must have mimetype application/json.

Response

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

ParameterTypeDescription
dataStringPre-signed S3 URL to the converted file.

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 raw JSON body to YAML (downloadable file)
https://api.eu.apyhub.com/apyhub/convert-json-to-yaml/json-raw-yaml-file

QUICKSTART

GUIDE

Quickstart

Convert a JSON object to a downloadable YAML file with the required JSON body.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-json-to-yaml/json-raw-yaml-file" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Sample Project","active":true}'

What you'll get back

Returns a downloadable YAML (.yaml) file as binary content.

# 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*
Any non-empty JSON object. Sent as the request body with Content-Type application/json. The body must not be empty.

About this endpoint

What it does

Converts a raw JSON request body into a downloadable YAML file. The endpoint accepts a non-empty JSON object in the body and returns the converted content as a binary .yaml file.

Query Parameter(s)

AttributeTypeDescription
outputStringOutput name for the generated file. Default: sample-output.

Request Body

ParameterTypeDescription
bodyObjectAny non-empty JSON object. Must contain at least 1 property. Additional properties are allowed.

Response

Returns a downloadable YAML file as a binary response. The response body is a string with binary format, representing the converted .yaml file.

ParameterTypeDescription
stringStringBinary YAML file content.
▣ ENDPOINT 05 / 09
POST
Convert JSON from URL to YAML (raw text)
https://api.eu.apyhub.com/apyhub/convert-json-to-yaml/json-url-yaml-raw

QUICKSTART

GUIDE

Quickstart

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

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-json-to-yaml/json-url-yaml-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 string containing the converted YAML output.

name: Example
active: true
items:
  - one
  - two
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 JSON resource. The URL must return a content-type of application/json, text/plain, application/octet-stream, or binary/octet-stream, or the Content-Disposition / URL path must include ".json".

About this endpoint

What it does

Fetches JSON from a publicly accessible URL and converts it to YAML, returning the result as raw text. The request body supplies the source URL; the response is a plain string containing the YAML output.

Request Body

ParameterTypeDescription
urlStringPublicly accessible URL pointing to a JSON resource. Must be a valid URI. The URL must return application/json, text/plain, application/octet-stream, or binary/octet-stream, or the Content-Disposition / URL path must include .json.

Response

Returns a plain string containing the converted YAML representation of the JSON fetched from the provided URL.

ParameterTypeDescription
stringStringYAML output as raw text.
▣ ENDPOINT 06 / 09
POST
Convert JSON from URL to YAML (S3 signed URL)
https://api.eu.apyhub.com/apyhub/convert-json-to-yaml/json-url-yaml-url

QUICKSTART

GUIDE

Quickstart

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

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-json-to-yaml/json-url-yaml-url" \
  -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*
Publicly accessible URL pointing to a JSON resource. The URL must return a content-type of application/json, text/plain, application/octet-stream, or binary/octet-stream, or the Content-Disposition / URL path must include ".json".

About this endpoint

What it does

Converts JSON fetched from a publicly accessible URL into YAML and returns a pre-signed S3 URL for the converted file. The request body supplies the source url, and the response contains the resulting file URL in data.

Query Parameter(s)

AttributeTypeDescription
outputStringOutput filename or identifier used for the generated file. Default: sample-output.

Request Body

ParameterTypeDescription
urlStringPublicly accessible URL pointing to a JSON resource. The URL must return a content-type of application/json, text/plain, application/octet-stream, or binary/octet-stream, or the Content-Disposition / URL path must include .json. Format: URI.

Response

Returns a JSON object with a data string field — a pre-signed S3 URL to the converted file. The success response is an object with one top-level field: data (String).

ParameterTypeDescription
dataStringPre-signed S3 URL to the converted file. Format: URI.
▣ ENDPOINT 07 / 09
POST
Convert uploaded JSON file to YAML (raw text)
https://api.eu.apyhub.com/apyhub/convert-json-to-yaml/json-file-yaml-raw

QUICKSTART

GUIDE

Quickstart

Convert a JSON file to raw YAML by uploading it as multipart form data.

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

What you'll get back

Returns a JSON string containing the converted YAML output.

"key: value\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.
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. The uploaded file must have mimetype application/json.

About this endpoint

What it does

Converts an uploaded JSON file into YAML and returns the result as raw text. The request body must include a JSON file upload in the file field.

Request Body

ParameterTypeDescription
fileBinaryJSON file to convert. The uploaded file must have mimetype application/json.

Response

Returns a raw YAML string as the success response.

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 raw JSON body to YAML (raw text)
https://api.eu.apyhub.com/apyhub/convert-json-to-yaml/json-raw-yaml-raw

QUICKSTART

GUIDE

Quickstart

Convert a JSON object to raw YAML by sending the JSON in the request body.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-json-to-yaml/json-raw-yaml-raw" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"ApyHub","enabled":true}'

What you'll get back

Returns a JSON string containing the converted YAML output.

"name: ApyHub\nenabled: true\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*
Any non-empty JSON object. Sent as the request body with Content-Type application/json. The body must not be empty.

About this endpoint

What it does

Converts a non-empty JSON object sent as the request body into YAML and returns the converted YAML as raw text. The endpoint accepts the JSON payload directly in the body with Content-Type: application/json.

Request Body

ParameterTypeDescription
bodyObjectAny non-empty JSON object. The body must not be empty. Additional properties are allowed.

Response

Returns raw YAML text as a string. The success response body is a plain string rather than a JSON object.

ParameterTypeDescription
responseStringYAML output converted from the input JSON object.
▣ ENDPOINT 09 / 09
POST
Convert raw JSON body to YAML (S3 signed URL)
https://api.eu.apyhub.com/apyhub/convert-json-to-yaml/json-raw-yaml-url

QUICKSTART

GUIDE

Quickstart

Send a JSON object to convert it to YAML and get back a pre-signed download URL.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-json-to-yaml/json-raw-yaml-url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"ApyHub","enabled":true}'

What you'll get back

Returns a JSON object with a data string field containing a pre-signed S3 URL for 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*
Any non-empty JSON object. Sent as the request body with Content-Type application/json. The body must not be empty.

About this endpoint

What it does

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

Query Parameter(s)

AttributeTypeDescription
outputStringDefault: sample-output

Request Body

ParameterTypeDescription
bodyObjectAny non-empty JSON object. The body must not be empty. Additional properties are allowed.

Response

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

ParameterTypeDescription
dataStringPre-signed S3 URL to the converted file.
▣ 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.