{"name":"reporting-api","organization":{"key":"nccloud"},"application":{"key":"reporting-api"},"namespace":"de.nccloud.reporting.api.v0","version":"0.0.1","info":{"license":{"name":"MIT","url":"http://opensource.org/licenses/MIT"}},"headers":[],"imports":[{"uri":"https://app.apibuilder.io/nccloud/common/latest/service.json","namespace":"de.nccloud.common.v0","organization":{"key":"nccloud"},"application":{"key":"common"},"version":"0.0.1","enums":["error_source_type","health_status","sort_direction"],"interfaces":[],"unions":["link"],"models":["audit","error_links","error_source","generic_error","health_check","link_object","page_response","paging_form","service_info","sort"],"annotations":[]}],"enums":[{"name":"scalar_type","plural":"scalar_types","values":[{"name":"boolean","attributes":[]},{"name":"date-iso8601","attributes":[]},{"name":"date-time-iso8601","attributes":[]},{"name":"decimal","attributes":[]},{"name":"double","attributes":[]},{"name":"integer","attributes":[]},{"name":"long","attributes":[]},{"name":"string","attributes":[]},{"name":"uuid","attributes":[]},{"name":"object","attributes":[],"description":"Note: when a type is set to `object`, the additional fields **must** be defined in the schema."}],"attributes":[],"description":"A type for a topic's schema field."}],"interfaces":[],"unions":[{"name":"reporting_event","plural":"reporting_events","types":[{"type":"update_event","attributes":[],"discriminator_value":"update_event"},{"type":"delete_event","attributes":[],"discriminator_value":"delete_event"}],"attributes":[],"interfaces":[],"discriminator":"type"}],"models":[{"name":"delete_event","plural":"delete_events","fields":[{"name":"tracking_id","type":"string","required":true,"attributes":[],"annotations":[],"description":"A unique id, which identifies the association of multiple events. This can i.e. be a user guid, for events related to a user. It is important, that this id is unique and immutable."},{"name":"audit","type":"de.nccloud.common.v0.models.audit","required":true,"attributes":[],"annotations":[],"description":"Audit information about this event."}],"attributes":[],"interfaces":[],"description":"Deletes a reporting entity defined by its `tracking_id`."},{"name":"field","plural":"fields","fields":[{"name":"type","type":"scalar_type","required":true,"attributes":[],"annotations":[],"description":"The (scalar) type of the field. Fields can only be primitive types."},{"name":"is_array","type":"boolean","required":true,"attributes":[],"annotations":[],"description":"Setting this to `true` means the field is an array of given type."},{"name":"fields","type":"map[field]","required":false,"attributes":[],"annotations":[],"description":"Nested fields for type `object`. When defining fields but not having set the type to `object`, the fields will be ignored. When setting the type to `object`, the fields need to be defined."},{"name":"label","type":"string","required":false,"attributes":[],"annotations":[],"description":"A human-readable label for the field."},{"name":"description","type":"string","required":false,"attributes":[],"annotations":[],"description":"A human-readable description of the field."}],"attributes":[],"interfaces":[],"description":"Single field of a topic schema. A field can be used for projecting, filtering and sorting in reports."},{"name":"filter","plural":"filters","fields":[{"name":"expression","type":"string","required":false,"attributes":[],"annotations":[],"description":"An SQL-like expression."},{"name":"variables","type":"map[json]","required":false,"attributes":[],"annotations":[],"description":"A map of values, which can be used in the expression. Variables can be access by prepending them with `$`."}],"attributes":[],"interfaces":[],"description":"Defines a condition for values."},{"name":"projection_field","plural":"projection_fields","fields":[{"name":"label","type":"string","required":false,"attributes":[],"annotations":[],"description":"A human-readable label for the field."},{"name":"description","type":"string","required":false,"attributes":[],"annotations":[],"description":"A human-readable description for the field."},{"name":"source","type":"projection_field_source","required":false,"attributes":[],"annotations":[],"description":"The source of the field. Either `source` or `fields` must be set."},{"name":"fields","type":"map[projection_field]","required":false,"attributes":[],"annotations":[],"description":"Defines nested fields for this projection. Either `source` or `fields` must be set."}],"attributes":[],"interfaces":[],"description":"A single field of a projection schema."},{"name":"projection_field_source","plural":"projection_field_sources","fields":[{"name":"topic","type":"string","required":true,"attributes":[],"annotations":[],"description":"Name of the originating topic."},{"name":"path","type":"string","required":true,"attributes":[],"annotations":[],"description":"A slimmed down variant of [JSON Path](https://gregsdennis.github.io/Manatee.Json/usage/path.html) to point to a specific field in a topic's schema."},{"name":"filter","type":"string","required":true,"attributes":[],"annotations":[],"description":"A conditional filter expression. The expression can contain variables, which will be passed in when evaluating the projection."}],"attributes":[],"interfaces":[],"description":"Represents the source for a single projection field from a topic's schema."},{"name":"query_form","plural":"query_forms","fields":[{"name":"view","type":"string","required":false,"attributes":[],"annotations":[],"description":"The name of a defined `view` used for projecting. If the view defines variables, they must be provided as well. Either `view` or `projection` must be set."},{"name":"projection","type":"map[projection_field]","required":false,"attributes":[],"annotations":[],"description":"Projected fields to return. Either `view` or `projection` must be set."},{"name":"variables","type":"map[json]","required":true,"attributes":[],"annotations":[],"description":"Variables to pass to the projection or the view."},{"name":"sort","type":"[de.nccloud.common.v0.models.sort]","required":false,"attributes":[],"annotations":[],"description":"The defined properties refer to the fields of the projection."}],"attributes":[],"interfaces":[],"description":"Form for querying and projecting data."},{"name":"query_response","plural":"query_responses","fields":[{"name":"page","type":"de.nccloud.common.v0.models.page_response","required":true,"attributes":[],"annotations":[]},{"name":"data","type":"object","required":true,"attributes":[],"annotations":[],"description":"The returned data in the projected form."}],"attributes":[],"interfaces":[],"description":"The result of a query, returning data in a projected form."},{"name":"topic","plural":"topics","fields":[{"name":"name","type":"string","required":true,"attributes":[],"annotations":[]},{"name":"service","type":"de.nccloud.common.v0.models.service_info","required":true,"attributes":[],"annotations":[],"description":"Info about the producing service."},{"name":"schema","type":"map[field]","required":true,"attributes":[],"annotations":[],"description":"The schema of the topics' provided data."}],"attributes":[],"interfaces":[],"description":"Represents a single topic, which will be consumed by the reporting service."},{"name":"topic_response","plural":"topic_responses","fields":[{"name":"page","type":"de.nccloud.common.v0.models.page_response","required":true,"attributes":[],"annotations":[]},{"name":"data","type":"[topic]","required":true,"attributes":[],"annotations":[]}],"attributes":[],"interfaces":[]},{"name":"update_event","plural":"update_events","fields":[{"name":"tracking_id","type":"string","required":true,"attributes":[],"annotations":[],"description":"A unique id, which identifies the association of multiple events. This can i.e. be a user guid, for events related to a user. It is important, that this id is unique and immutable."},{"name":"payload","type":"object","required":true,"attributes":[],"annotations":[],"description":"One or more fields defined in the reporting schema, which will be updated."},{"name":"audit","type":"de.nccloud.common.v0.models.audit","required":true,"attributes":[],"annotations":[],"description":"Audit information about this event."}],"attributes":[],"interfaces":[],"description":"Updates one or more data fields."},{"name":"view","plural":"views","fields":[{"name":"guid","type":"uuid","required":true,"attributes":[],"annotations":[],"description":"Globally unique identifier of the projection."},{"name":"name","type":"string","required":true,"attributes":[],"annotations":[],"description":"Name of this projection used to reference it in a human-friendly way. The name must be unique."},{"name":"projection","type":"map[projection_field]","required":true,"attributes":[],"annotations":[],"description":"Projected fields of this view."},{"name":"variables","type":"map[scalar_type]","required":true,"attributes":[],"annotations":[],"description":"Definition of variables which can be passed to the view. All `scalar_type`s are allowed, except `object`."}],"attributes":[],"interfaces":[],"description":"A stored view containing data from one or more topics."},{"name":"view_form","plural":"view_forms","fields":[{"name":"name","type":"string","required":true,"attributes":[],"annotations":[],"description":"Name of the view."},{"name":"projection","type":"map[projection_field]","required":true,"attributes":[],"annotations":[],"description":"Projected fields of this view."},{"name":"variables","type":"map[scalar_type]","required":true,"attributes":[],"annotations":[],"description":"Definition of variables which can be passed to the view. All `scalar_type`s are allowed, except `object`."}],"attributes":[],"interfaces":[],"description":"Form for creating a new `view`."},{"name":"view_response","plural":"view_responses","fields":[{"name":"page","type":"de.nccloud.common.v0.models.page_response","required":true,"attributes":[],"annotations":[]},{"name":"data","type":"[view]","required":true,"attributes":[],"annotations":[]}],"attributes":[],"interfaces":[]}],"resources":[{"type":"query_response","plural":"query_responses","operations":[{"method":"POST","path":"/query","parameters":[],"responses":[{"code":{"integer":{"value":200}},"type":"query_response","attributes":[]},{"code":{"integer":{"value":400}},"type":"[de.nccloud.common.v0.models.generic_error]","attributes":[]}],"attributes":[],"body":{"type":"query_form","attributes":[]}}],"attributes":[],"path":"/query","description":"Query data and display it with a given projection."},{"type":"topic","plural":"topics","operations":[{"method":"GET","path":"/topics","parameters":[{"name":"offset","type":"integer","location":"Query","required":true,"default":"0"},{"name":"limit","type":"integer","location":"Query","required":true,"default":"25"},{"name":"sort_by","type":"string","location":"Query","required":true,"default":"name"},{"name":"direction","type":"de.nccloud.common.v0.enums.sort_direction","location":"Query","required":true,"default":"asc"}],"responses":[{"code":{"integer":{"value":200}},"type":"topic_response","attributes":[]}],"attributes":[]},{"method":"GET","path":"/topics/:guid","parameters":[{"name":"guid","type":"string","location":"Path","required":true}],"responses":[{"code":{"integer":{"value":200}},"type":"topic","attributes":[]},{"code":{"integer":{"value":404}},"type":"unit","attributes":[]}],"attributes":[]}],"attributes":[],"path":"/topics"},{"type":"view","plural":"views","operations":[{"method":"GET","path":"/views","parameters":[{"name":"offset","type":"integer","location":"Query","required":true,"default":"0"},{"name":"limit","type":"integer","location":"Query","required":true,"default":"25"},{"name":"sort_by","type":"string","location":"Query","required":true,"default":"name"},{"name":"direction","type":"de.nccloud.common.v0.enums.sort_direction","location":"Query","required":true,"default":"asc"}],"responses":[{"code":{"integer":{"value":200}},"type":"view_response","attributes":[]}],"attributes":[]},{"method":"GET","path":"/views/:guid","parameters":[{"name":"guid","type":"uuid","location":"Path","required":true}],"responses":[{"code":{"integer":{"value":200}},"type":"view","attributes":[]},{"code":{"integer":{"value":404}},"type":"unit","attributes":[]}],"attributes":[]},{"method":"POST","path":"/views","parameters":[],"responses":[{"code":{"integer":{"value":201}},"type":"view","attributes":[]},{"code":{"integer":{"value":400}},"type":"[de.nccloud.common.v0.models.generic_error]","attributes":[]}],"attributes":[],"body":{"type":"view_form","attributes":[]}},{"method":"PUT","path":"/views/:guid","parameters":[{"name":"guid","type":"uuid","location":"Path","required":true}],"responses":[{"code":{"integer":{"value":200}},"type":"view","attributes":[]},{"code":{"integer":{"value":400}},"type":"[de.nccloud.common.v0.models.generic_error]","attributes":[]},{"code":{"integer":{"value":404}},"type":"unit","attributes":[]}],"attributes":[],"body":{"type":"view_form","attributes":[]}},{"method":"DELETE","path":"/views/:guid","parameters":[{"name":"guid","type":"uuid","location":"Path","required":true}],"responses":[{"code":{"integer":{"value":200}},"type":"unit","attributes":[]},{"code":{"integer":{"value":404}},"type":"unit","attributes":[]}],"attributes":[]}],"attributes":[],"path":"/views"}],"attributes":[],"annotations":[],"apidoc":{"version":"0.0.1"},"description":"Reporting service which aggregates events from dedicated Kafka topics."}