Preview

createUsageReader is in Preview status and is subject to change without notice. For more information about Preview status, see the GraphQL API policy.

createUsageReader

Create a Usage Reader

This page contains

    Authorization Rules

    This request requires authorization with at least one of the following scopes:

    Scopes

    ROLE_PARTNER

    ROLE_DEVELOPER

    ROLE_CHANNEL_ADMIN

    Arguments

    input CreateUsageReaderInput! PREVIEW

    Attributes to create a Usage Reader

    CreateUsageReaderInput fields

    name String!

    Name for usage reader

    vendorId String!

    Unique ID for vendor of the product

    productId String!

    Unique ID of the product

    usageProcessingType UsageProcessingType! PREVIEW

    Processing Type of usage

    billable Boolean

    If true, usage associating with this reader are billable

    parser CreateUsageEventParserInput! PREVIEW

    Usage reader specific Parsing information

    usageRequestFieldDefinitions [CreateUsageEventFieldDefinitionsInput!] PREVIEW

    List of fields which are part of usage event. eg. accountId, quantity, unitPrice, etc

    enrichment [CreateUsageReaderEnrichFieldTransformInput!] PREVIEW

    Enrichment/transformation to be applied on the individual field definition

    rating [CreateUsageReaderRatingConfigurationsInput!] PREVIEW

    Pricing specific attributes used for Rating

    additionalAttributesEnrichment [CreateUsageReaderEnrichFieldTransformInput!] PREVIEW

    Enrichment/transformation to be applied on the Additional field definitions

    createdDate DateTime

    Creation date of Usage Reader

    updatedDate DateTime!

    DateTime when usage reader is updated

    Return Fields

    id String!

    Unique identifier for each usage reader

    vendorId String!

    Unique identifier for vendor of the product

    productId String!

    Unique identifier of the product

    name String

    Name of usage reader

    usageItemType UsageItemType! PREVIEW

    Type of incoming usage item i.e METERED or IAAS

    billable Boolean!

    If true, reader is used for processing usage items that are billable

    parser UsageEventParser! PREVIEW

    Parser information to parse the usage payload, contains ParserType i.e CSV or JSON and Parameters from usage payload

    rawFields [UsageEventRawField!] PREVIEW

    List of fields which will be the part of usage request and their fieldReference from usage payload. Also contains Validator Parameters if some usage fields requires validations

    usageItemIdTransform UsageEventFieldTransformer PREVIEW

    Transformation that needs to be applied on usageItemId field, contains TopologyType i.e GRAPH or DIRECT. If its GRAPH then it has transformerId field which is unique name for transformer, parameters field for that transformer for eg: key - 'generation_scheme', value: 'uuid' and arguments field which tells on which fields transformation needs to be applied.

    usageItemDateTransform UsageEventFieldTransformer PREVIEW

    Transformation that needs to be applied on usageItemDate field, contains TopologyType i.e GRAPH or DIRECT. If its GRAPH then it has transformerId field for eg: 'epoch-transformer', parameters field and arguments field which tells on which fields transformation needs to be applied.

    enrichment [UsageEventFieldEnrichmentTransformer!] PREVIEW

    Enrichment to be applied on the fields, contains map for fields for eg: key - usage payload fieldName ('quantity'), value - Transformation that needs to be applied on given key ('quantity') field, contains TopologyType i.eGRAPH or DIRECT. If its GRAPH then it has transformerId field which is unique name for transformer, parameters field for that transformer for eg: key - 'precision', value: '10' and arguments field which tells on which fields transformation needs to be applied.

    rating [UsageEventRating!] PREVIEW

    Rating configurations contains a map used for pricing properties for eg: key: exchange-rate, value: partner-exchange-rate

    additionalAttributesEnrichment [UsageEventFieldEnrichmentTransformer!] PREVIEW

    Enrichment to be applied on the additionalAttributes of usage paylaod, contains map for fields for eg: key - usage payload fieldName ('effectiveUnitPrice'), value - Transformation that needs to be applied on given key ('effectiveUnitPrice') field, contains TopologyType i.eGRAPH or DIRECT. If its GRAPH then it has transformerId field which is unique name for transformer, parameters field for that transformer for eg: key - 'precision', value: '10' and arguments field which tells on which fields transformation needs to be applied.

    Interactive example

    This is an example mutation query. Use the embedded interactive tool below to edit the query.

    Hint: use Ctrl + Space for autocompleting fields.