API

Last updated: July 24th, 2018

JSON API

How it works

Our system supports connection with any other system via API (Application Interface) through Internet. Our API is based on JSON data interchange format and is fully described by JSON schemas. We prepared 50+ JSON schemas for exchanging data with our application.

JSON API examples

This example shows message which is sent to ControlServer and requests loading of specific CNC file:

                                            
{
    "data": {
        "command": "cnc/open",
        "file": "file.xyz"
    }
}
                                        

Server executes command and responses:

                                            
{
    "data": {
        "command": "command which file...",
        "file": "file.xyz",
        "status": 0
    }
}
                                            

The request message is described as following JSON schema:

                                            
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "$id": "http://example.com/example.json",
    "self": {
        "vendor": "com.logimic",
        "name": "loadFile-request",
        "format": "jsonschema",
        "version": "1-0-0"
    },
    "type": "object",
    "properties": {
        "data": {
            "type": "object",
            "properties": {
                "command": {
                    "type": "string",
                    "description": "Specific command to Server...",
                    "default": "cnc/open",
                    "enum": [
                        "cnc/open",
                        "LoadFromJson"
                    ]
                },
                "file": {
                    "type": "string",
                    "description": "Name of file on server.",
                    "default": "file.xyz"
                }                
            },
            "required": [
                "command",
                "file"
            ]
        }
    },
    "required": [
        "data"
    ]
}
                                            

The response message is described as following JSON schema:

                                            
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "$id": "http://example.com/example.json",
    "self": {
        "vendor": "com.logimic",
        "name": "loadFile-response",
        "format": "jsonschema",
        "version": "1-0-0"
    },
    "type": "object",
    "properties": {
        "data": {
            "type": "object",
            "properties": {
                "command": {
                    "type": "string",
                    "description": "Specific command to Server...",
                    "default": "command which file...",
                    "enum": [
                        "cnc/open",
                        "LoadFromJson"
                    ]
                },
                "file": {
                    "type": "string",
                    "description": "Name of file on server.",
                    "default": "file.xyz"
                },
                "status": {
                    "type": "integer",
                    "description": "Return value from server function.",
                    "default": 0
                }                
            },
            "required": [
                "command",
                "file",
                "status"
            ]
        }
    },
    "required": [
        "data"
    ]
}
                                            

JSON API Documentation

Generated documentation

This doc is auto-generated documentation from JSON schemates.

Note:

Following content is autogenerated by latest version of JSON schemas.