odf-query

Execute a batch query

Changed on

Functions exactly like the POST version of the endpoint with all parameters passed in the query string instead of the body.

get/query

Request

  • The document declares no server URL.
  • Auth
    • none
    • or HTTP bearer

Query parameters

querystring required

Query to execute (e.g. SQL)

queryDialectstring

Dialect of the query

skipinteger

Number of leading records to skip when returning result (used for pagination)

limitinteger

Maximum number of records to return (used for pagination)

dataFormat'JsonAoS' | 'JsonSoA' | 'JsonAoA'

How the output data should be encoded

schemaFormat'ArrowJson' | 'OdfJson' | 'OdfYaml' | 'Parquet' | 'ParquetJson' required

How to encode the schema of the result

includestring

What information to include in the response

Response

query result

Example response

{
  "commitment": {
    "inputHash": "f162070983d692f648185febe6d6fa607630ae68649f7e6fc45b94680096c06e4fadb",
    "outputHash": "f162070983d692f648185febe6d6fa607630ae68649f7e6fc45b94680096c06e4fadb",
    "subQueriesHash": "f162070983d692f648185febe6d6fa607630ae68649f7e6fc45b94680096c06e4fadb"
  },
  "input": {
    "datasets": [
      {
        "alias": "kamu/eth-to-usd",
        "blockHash": "f162070983d692f648185febe6d6fa607630ae68649f7e6fc45b94680096c06e4fadb",
        "id": "did:odf:fed01969b7413a41f25ba969b7413a41f25ba4016461736574607650ec170632ade10"
      }
    ],
    "query": "select event_time, from, to, close from \"kamu/eth-to-usd\""
  },
  "proof": {
    "proofValue": "uAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
    "verificationMethod": "did:key:z6MkmgVreHBu2ABaD59Jq1J2JneXwzpsUWwEWXS4kLhjb4V4"
  },
  "subQueries": []
}

Changes

    • warning

      added the new EcdsaSecp256k1Signature2019 enum value to the / response property for the response status

    • warning

      added the new EcdsaSecp256k1Signature2019 enum value to the /// response property for the response status

    • breaking

      removed the enum value OdfJson from the query request parameter schemaFormat

    • breaking

      removed the enum value OdfYaml from the query request parameter schemaFormat

    • info

      removed the EcdsaSecp256k1Signature2019 enum value from the / response property for the response status

    • info

      removed the EcdsaSecp256k1Signature2019 enum value from the /// response property for the response status

    • info

      removed the OdfJson enum value from the / response property for the response status

    • info

      removed the OdfJson enum value from the / response property for the response status

    • info

      removed the OdfJson enum value from the /// response property for the response status

    • info

      removed the OdfYaml enum value from the / response property for the response status

    • info

      removed the OdfYaml enum value from the / response property for the response status

    • info

      removed the OdfYaml enum value from the /// response property for the response status