RPC API#

Application RPCs are exposed under /app and require authentication with a valid user identity. You can read what application endpoints may look like, as generated by the example C++ logging app, in Example app RPC API.

Built-ins#

By default, CCF will also add some built-in endpoints:

GET /app/api#

Example request:

GET /app/api HTTP/1.1
Host: example.com
Status Codes
  • 200 OK

    Default response description

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • default

    An error occurred

    Example response:

    HTTP/1.1 default -
    Content-Type: application/json
    
    {
        "error": {
            "code": "string",
            "message": "string"
        }
    }
    

GET /app/api/metrics#

Example request:

GET /app/api/metrics HTTP/1.1
Host: example.com
Status Codes
  • 200 OK

    Default response description

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {
        "metrics": [
            {
                "calls": 1,
                "errors": 1,
                "failures": 1,
                "method": "string",
                "path": "string",
                "retries": 1
            }
        ]
    }
    

  • default

    An error occurred

    Example response:

    HTTP/1.1 default -
    Content-Type: application/json
    
    {
        "error": {
            "code": "string",
            "message": "string"
        }
    }
    

GET /app/tx#
Query Parameters
  • transaction_id (string) – (Required)

Example request:

GET /app/tx?transaction_id=string HTTP/1.1
Host: example.com
Status Codes
  • 200 OK

    Default response description

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {
        "status": "Unknown",
        "transaction_id": "string"
    }
    

  • default

    An error occurred

    Example response:

    HTTP/1.1 default -
    Content-Type: application/json
    
    {
        "error": {
            "code": "string",
            "message": "string"
        }
    }
    

GET /app/commit#
Query Parameters
  • view_history (boolean) –

  • view_history_since (integer) –

Example request:

GET /app/commit HTTP/1.1
Host: example.com
Status Codes
  • 200 OK

    Default response description

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {
        "transaction_id": "string",
        "view_history": [
            "string"
        ]
    }
    

  • default

    An error occurred

    Example response:

    HTTP/1.1 default -
    Content-Type: application/json
    
    {
        "error": {
            "code": "string",
            "message": "string"
        }
    }
    

GET /app/receipt#
Query Parameters
  • transaction_id (string) – (Required)

Example request:

GET /app/receipt?transaction_id=string HTTP/1.1
Host: example.com
Status Codes
  • 200 OK

    Default response description

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {}
    

  • default

    An error occurred

    Example response:

    HTTP/1.1 default -
    Content-Type: application/json
    
    {
        "error": {
            "code": "string",
            "message": "string"
        }
    }