OBJECT

EwaiAsset

This is the main EWAI asset object information.

link GraphQL Schema definition

  • type EwaiAsset {
  • # The asset id, @example 1
  • id: Int!
  • # The asset main uuid. this is the primary identifier used in the GraphQL API.
  • # @example '4883e023-2528-4ac7-9b19-c1c7225e1feb'
  • uuid: String!
  • # The uuid to be used in the asset data preview REST API call. This uuid can be
  • # given publicly, as it only returns a small number of asset data records (the
  • # oldest N records). @example '7004dfa7-ee94-4800-96f8-eca2cf7228cf'
  • previewUuid: String!
  • # The uuid to be used in the full data retrieve REST API call. This should never
  • # be given out publicly, as it can data leak the asset data. @example
  • # 'a2d12579-fab1-40eb-9535-b1c1cf8181d1'
  • dataUuid: String!
  • # When the asset was created. @example '2021-02-08 09:51:11.016021-08'
  • createdOn: IsoDateTime!
  • # The DID of the Web3 wallet user who created this asset. @example
  • # '0x882001eb216Dc32435aB7202ac09EcdC053f3376' or
  • # 'did:ethr:0x882001eb216Dc32435aB7202ac09EcdC053f3376'
  • createdBy: String!
  • # The EWNS of this asset. @example 'hydro1.market1.adivate.ewc'
  • ewns: String!
  • # The EW-Switchboard role which DER DIDs much possess in order to send messages to
  • # this asset. @example 'datapub.roles.market1.apps.adivate.iam.ewc'
  • dataPublishRole: String!
  • # The type of PTD data packets (messages) which are sent into this asset, must be
  • # Json or Text. @example 'json'
  • incomingMsgFormat: IncomingMessageFormat!
  • # Not currently implemented.
  • incomingMsgCustomHandler: String
  • # Where in the incoming message the timestamp field is from the DER. For text,
  • # this should be a RegEx to extract the timestamp value, for Json, it should be a
  • # Json Path specification down into the message for the timestamp property.
  • # @example true
  • pathToMsgTimestamp: String
  • # If true, and incoming message format is Json, and a msgSchema has been set, EWAI
  • # will validate incoming PTD messages to ensure they comply with the schema
  • # required before storing them in the asset data table. Schema validation is only
  • # supported for Json incoming message format type assets. @example true
  • schemaValidationOn: Boolean!
  • # The Json Schema validation object to be used to validate incoming messages for
  • # this data asset. Messages which do not meet this schema are rejected.
  • msgSchema: JSON
  • # Not currently implemented.
  • customSchemaValidator: String
  • # The output formats supported for the REST API data retrieve call for this
  • # asset's data. @example 'json' | 'csv' | 'xml'
  • outputFormatsSupported: [OutputDataFormat!]!
  • # The default output format for the REST API data retrieve call for this asset's
  • # data. @example 'json'
  • defaultOutputFormat: OutputDataFormat!
  • # The number of records to send in the preview REST API data retrieve calls for
  • # this asset. @example 10
  • previewNumberOfRecords: Int!
  • # The number of days of data to send on asset data REST API data retrieve calls.
  • # The latest "N" days of data is returned. @example 30
  • dataNumberOfDays: Int!
  • # The identifier of an external entity to which this EWAI asset is linked in the
  • # EWAI-MARKET (or other dApp/App). This is completely user defined. For
  • # EWAI-MARKET which uses Ocean Protocol to publish EWAI Assets on the marketplace,
  • # this external did is the Ocean Protocol Data Asset DID. @example
  • # 'did:op:D55B682cdf8443f04257aB46461783CA7Ca65EB2'
  • externalDid: String
  • # Json object containing user definable fields. @example
  • # {"tags":["solar","energy","energyweb"],"title":"Solar Farm
  • # 1","vendor":"Sunspec","category":"Solar","description":"This is the description
  • # for solar farm 1"}
  • metadata: JSON
  • # The data retrieve REST API Urls for this asset. The first URL is always the
  • # "default output format" URL call.
  • dataUrls: [String!]!
  • # The preview data retrieve REST API Urls for this asset. The first URL is always
  • # the "default output format" URL call.
  • previewUrls: [String!]!
  • # Get the Data Preview for this asset using the asset's defined default output
  • # data format.
  • #
  • # Arguments
  • # format: [Not documented]
  • dataPreview(format: OutputDataFormat!): JSON!
  • # Get the Data Preview for this asset in CSV format.
  • dataPreviewCsv: JSON!
  • # Get the Data Preview for this asset in Json format.
  • dataPreviewJson: JSON!
  • }