Vertopal
API Menu

Get Format

POST /v1/format/get

Gets the properties of a specific format.

Request

Parameter Keys

format string required

The specific format that you want to get its properties. If the format also has a type, separate it with a hyphen.

Example
txt-markdown
The example code of this section shows the structure of the Get Format request. You may see the other request structure keys such as data keys and see how the request is authenticated.
HTTP
cURL
CLI
POST https://api.vertopal.com/v1/format/get
Authorization: Bearer [APP_TOKEN]

data={
    "app": "[APP_ID]",
    "parameters": {
        "format": "png"
    }
}
curl -L -X POST 'https://api.vertopal.com/v1/format/get' \
-H 'Authorization: Bearer [APP_TOKEN]' \
-F 'data={
    "app": "[APP_ID]",
    "parameters": {
        "format": "png"
    }
}'
vertopal api -v 1 format/get \
--app "[APP_ID]" \
--token "[APP_TOKEN]" \
-F data='{
    "app": "%app-id%",
    "parameters": {
        "format": "png"
    }
}'

Response

Output Keys

format string

The combination of format extension and format type with a hyphen. If the format has no type, it is just an extension.

extension string

The extension of format.

type string

The type of format.

name string

The full form of the format.

title string

The format in a form that is easy for humans to read.

categories array

The category hierarchy for the format.

HTTP Status Codes

OK 200

The task has been executed successfully without any errors.

INVALID_FORMAT 200

The [FORMAT] format is not found in the valid formats.

WRONG_FORMAT_STRUCTURE 200

The format has the wrong structure.

The example code of this section shows the structure of the Get Format response. You may see the other response structure keys such as entity keys.
JSON
{
    "result": {
        "output": {
            "format": "png",
            "extension": "png",
            "type": null,
            "name": "Portable Network Graphics",
            "title": "PNG",
            "categories": [
                "picture"
            ]
        },
        "error": {},
        "warning": {}
    }
}
Loading, Please Wait...