From 7ad4c034d4d54e3a7db2c3592b869a50ba163b51 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 2 Sep 2025 21:21:18 +0000 Subject: [PATCH 1/3] feat: Update OpenAPI file replicated from Notehub commit 6f89773 --- openapi.yaml | 4154 ++++++++++++++++++++++++-------------------------- 1 file changed, 1987 insertions(+), 2167 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index fb7b037..bbd624f 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1,54 +1,48 @@ ---- -openapi: "3.0.3" - +openapi: 3.0.3 info: title: Notehub API version: 1.2.0 - description: | - The OpenAPI definition for the Notehub.io API. + description: 'The OpenAPI definition for the Notehub.io API. + + ' contact: name: Blues Engineering email: engineering@blues.io url: https://dev.blues.io/support/ - # TODO - # license: - # termsOfService: https://notehub.io/subscription-agreement (?) - externalDocs: description: Find out more about Blues url: https://blues.io - servers: - - url: https://api.notefile.net - description: Production server - +- url: https://api.notefile.net + description: Production server tags: - - name: authorization - description: Authorization operations - - name: project - description: Project operations - - name: event - description: Event retrieval operations - - name: device - description: Device operations - - name: billing_account - description: Billing Account operations - - name: monitors - description: Management of monitors - - name: route - description: Route operations - - name: webhook - description: Webhook APIs for non-notecard event ingestion - - name: external devices - description: APIs for events and sessions for external devices - +- name: authorization + description: Authorization operations +- name: project + description: Project operations +- name: event + description: Event retrieval operations +- name: device + description: Device operations +- name: billing_account + description: Billing Account operations +- name: monitors + description: Management of monitors +- name: route + description: Route operations +- name: webhook + description: Webhook APIs for non-notecard event ingestion +- name: external devices + description: APIs for events and sessions for external devices +- name: analytics + description: Analytics operations paths: /auth/login: post: - tags: ["authorization"] + tags: + - authorization operationId: login - description: Gets a session token from the API from a username and - password. + description: Gets an API key from username and password requestBody: required: true content: @@ -64,7 +58,7 @@ paths: username: name@example.com password: test-password responses: - "200": + '200': description: Successful operation content: application/json: @@ -73,242 +67,199 @@ paths: properties: session_token: type: string - "400": + '400': description: Bad Request - # NOTE: We're already within `post`, so 405 should not occur here. - "500": + '500': description: Internal Server Error - /v1/projects/{projectOrProductUID}/routes: get: - tags: ["route"] + tags: + - route operationId: getRoutes description: Get all Routes within a Project security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' responses: - "200": + '200': description: Successful operation content: application/json: schema: type: array items: - $ref: "#/components/schemas/UserDbRoute" + $ref: '#/components/schemas/UserDbRoute' minItems: 0 example: - [ - { - "uid": "route:8d65a087d5d290ce5bdf03aeff2becc0", - "label": "success route", - "type": "http", - "modified": "2020-03-09T17:58:37Z", - "disabled": false, - }, - { - "uid": "route:a9eaad31d5cee8d01a42762f71fb777a", - "label": "failing route", - "type": "http", - "modified": "2020-03-09T17:59:15Z", - "disabled": false, - }, - { - "uid": "route:02ddc0e6e236c2a7e482da62047229ad", - "label": "disabled route", - "type": "http", - "modified": "2020-03-09T17:59:44Z", - "disabled": true, - }, - { - "uid": "route:0ac565deb7b478a250bb82348b9cfdd4", - "label": "Proxy Route", - "type": "proxy", - "modified": "2020-03-09T17:58:36Z", - "disabled": false, - }, - { - "uid": "route:fb1b9e0aba1bf030311ba2c3c1e3efd7", - "label": "Myjsonlive Webtest", - "type": "proxy", - "modified": "2020-03-09T17:58:35Z", - "disabled": false, - }, - { - "uid": "route:7804818f84a3be6193e14d804fe7fca7", - "label": "Myjsonlive Echo", - "type": "proxy", - "modified": "2020-03-09T17:58:34Z", - "disabled": false, - }, - ] + - uid: route:8d65a087d5d290ce5bdf03aeff2becc0 + label: success route + type: http + modified: '2020-03-09T17:58:37Z' + disabled: false + - uid: route:a9eaad31d5cee8d01a42762f71fb777a + label: failing route + type: http + modified: '2020-03-09T17:59:15Z' + disabled: false + - uid: route:02ddc0e6e236c2a7e482da62047229ad + label: disabled route + type: http + modified: '2020-03-09T17:59:44Z' + disabled: true + - uid: route:0ac565deb7b478a250bb82348b9cfdd4 + label: Proxy Route + type: proxy + modified: '2020-03-09T17:58:36Z' + disabled: false + - uid: route:fb1b9e0aba1bf030311ba2c3c1e3efd7 + label: Myjsonlive Webtest + type: proxy + modified: '2020-03-09T17:58:35Z' + disabled: false + - uid: route:7804818f84a3be6193e14d804fe7fca7 + label: Myjsonlive Echo + type: proxy + modified: '2020-03-09T17:58:34Z' + disabled: false default: - $ref: "#/components/responses/ErrorResponse" + $ref: '#/components/responses/ErrorResponse' post: - tags: ["route"] + tags: + - route operationId: createRoute description: Create Route within a Project security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' requestBody: description: Route to be Created required: true content: application/json: schema: - $ref: "#/components/schemas/NotehubRoute" - example: > - { - "label": "Route Label", - "type":"http", - "http": { - "fleets": ["fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d"], - "throttle_ms": 100, - "url": "http://route.url" - } - } + $ref: '#/components/schemas/NotehubRoute' + example: "{\n \"label\": \"Route Label\",\n \"type\":\"http\",\n \"\ + http\": {\n \"fleets\": [\"fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d\"\ + ],\n \"throttle_ms\": 100,\n \"url\": \"http://route.url\"\n \ + \ }\n}\n" responses: - "200": + '200': description: Successful operation content: application/json: schema: - $ref: "#/components/schemas/NotehubRoute" + $ref: '#/components/schemas/NotehubRoute' example: - { - "uid": "route:8d65a087d5d290ce5bdf03aeff2becc0", - "label": "Route Label", - "type": "http", - "modified": "2020-03-09T17:59:44Z", - "disabled": "false", - "http": - { - "fleets": ["fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d"], - "filter": { "type": "", "system_notefiles": false }, - "transform": {}, - "throttle_ms": 100, - "url": "http://route.url", - "http_headers": null, - "disable_http_headers": false, - "timeout": 0, - }, - } + uid: route:8d65a087d5d290ce5bdf03aeff2becc0 + label: Route Label + type: http + modified: '2020-03-09T17:59:44Z' + disabled: 'false' + http: + fleets: + - fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d + filter: + type: '' + system_notefiles: false + transform: {} + throttle_ms: 100 + url: http://route.url + http_headers: null + disable_http_headers: false + timeout: 0 default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/routes/{routeUID}: get: - tags: ["route"] + tags: + - route operationId: getRoute description: Get single route within a project security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/routeUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/routeUIDParam' responses: - "200": + '200': description: Successful operation content: application/json: schema: - $ref: "#/components/schemas/NotehubRoute" + $ref: '#/components/schemas/NotehubRoute' example: - { - "uid": "route:8d65a087d5d290ce5bdf03aeff2becc0", - "label": "Route Label", - "type": "http", - "modified": "2020-03-09T17:59:44Z", - "disabled": "false", - "http": - { - "fleets": ["fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d"], - "filter": { "type": "", "system_notefiles": false }, - "transform": {}, - "throttle_ms": 100, - "url": "http://route.url", - "http_headers": null, - "disable_http_headers": false, - "timeout": 0, - }, - } + uid: route:8d65a087d5d290ce5bdf03aeff2becc0 + label: Route Label + type: http + modified: '2020-03-09T17:59:44Z' + disabled: 'false' + http: + fleets: + - fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d + filter: + type: '' + system_notefiles: false + transform: {} + throttle_ms: 100 + url: http://route.url + http_headers: null + disable_http_headers: false + timeout: 0 default: - $ref: "#/components/responses/ErrorResponse" + $ref: '#/components/responses/ErrorResponse' put: - tags: ["route"] + tags: + - route operationId: updateRoute description: Update route by UID security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/routeUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/routeUIDParam' requestBody: description: Route settings to be updated required: true content: application/json: schema: - $ref: "#/components/schemas/NotehubRoute" - example: > - { - "http" { - "filter": { - "type": "include", - "system_notefiles": true, - "files": ["somefile.qo"], - }, - "throttle_ms": 50, - "url": "http://new-route.url", - }, - } - + $ref: '#/components/schemas/NotehubRoute' + example: "{\n \"http\" {\n \"filter\": {\n \"type\": \"include\"\ + ,\n \"system_notefiles\": true,\n \"files\": [\"somefile.qo\"\ + ],\n },\n \"throttle_ms\": 50,\n \"url\": \"http://new-route.url\"\ + ,\n },\n}\n" responses: - "200": + '200': description: Successful operation content: application/json: schema: - $ref: "#/components/schemas/NotehubRoute" - example: > - { - "uid": "route:8d65a087d5d290ce5bdf03aeff2becc0", - "label": "Route Label", - "type": "http", - "modified": "2020-03-09T17:59:44Z", - "disabled": "false", - "http": - { - "fleets": ["fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d"], - "filter": { - "type": "include", - "system_notefiles": true, - "files": ["somefile.qo"], - }, - "transform": {}, - "throttle_ms": 50, - "url": "http://new-route.url", - "http_headers": null, - "disable_http_headers": false, - "timeout": 0 - } - + $ref: '#/components/schemas/NotehubRoute' + example: "{\n \"uid\": \"route:8d65a087d5d290ce5bdf03aeff2becc0\",\n\ + \ \"label\": \"Route Label\",\n \"type\": \"http\",\n \"modified\"\ + : \"2020-03-09T17:59:44Z\",\n \"disabled\": \"false\",\n \"http\"\ + :\n {\n \"fleets\": [\"fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d\"\ + ],\n \"filter\": {\n \"type\": \"include\",\n \"system_notefiles\"\ + : true,\n \"files\": [\"somefile.qo\"],\n },\n \"transform\"\ + : {},\n \"throttle_ms\": 50,\n \"url\": \"http://new-route.url\"\ + ,\n \"http_headers\": null,\n \"disable_http_headers\": false,\n\ + \ \"timeout\": 0\n}\n" default: - $ref: "#/components/responses/ErrorResponse" + $ref: '#/components/responses/ErrorResponse' delete: - tags: ["route"] + tags: + - route operationId: deleteRoute description: Delete single route within a project security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/routeUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/routeUIDParam' responses: - "200": + '200': description: Successful operation content: application/json: @@ -316,73 +267,73 @@ paths: type: object default: {} default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/routes/{routeUID}/route-logs: get: - tags: ["route"] + tags: + - route operationId: getRouteLogsByRoute description: Get Route Logs by Route UID security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/routeUIDParam" - - $ref: "#/components/parameters/pageSizeParam" - - $ref: "#/components/parameters/pageNumParam" - - $ref: "#/components/parameters/deviceUIDParamQuery" - - $ref: "#/components/parameters/routeLogsSortByParam" - - $ref: "#/components/parameters/routeLogsSortOrderParam" - - $ref: "#/components/parameters/startDateParam" - - $ref: "#/components/parameters/endDateParam" - - $ref: "#/components/parameters/systemFilesOnlyParam" - - $ref: "#/components/parameters/mostRecentOnlyParam" - - $ref: "#/components/parameters/filesQueryParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/routeUIDParam' + - $ref: '#/components/parameters/pageSizeParam' + - $ref: '#/components/parameters/pageNumParam' + - $ref: '#/components/parameters/deviceUIDParamQuery' + - $ref: '#/components/parameters/routeLogsSortByParam' + - $ref: '#/components/parameters/routeLogsSortOrderParam' + - $ref: '#/components/parameters/startDateParam' + - $ref: '#/components/parameters/endDateParam' + - $ref: '#/components/parameters/systemFilesOnlyParam' + - $ref: '#/components/parameters/mostRecentOnlyParam' + - $ref: '#/components/parameters/filesQueryParam' responses: - "200": + '200': description: Successful operation content: application/json: schema: type: array items: - $ref: "#/components/schemas/RouteLog" + $ref: '#/components/schemas/RouteLog' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/products/{productUID}/project: get: - tags: ["project"] + tags: + - project operationId: getProjectByProduct description: Get a Project by ProductUID security: - - api_key: [] + - api_key: [] parameters: - - name: productUID - in: path - required: true - schema: - type: string - example: com.blues.airnote + - name: productUID + in: path + required: true + schema: + type: string + example: com.blues.airnote responses: - "200": + '200': description: Successful operation content: application/json: schema: - $ref: "#/components/schemas/Project" + $ref: '#/components/schemas/Project' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/billing-accounts: get: - tags: ["billing_account"] + tags: + - billing_account operationId: getBillingAccounts description: Get Billing Accounts accessible by the api_key security: - - api_key: [] + - api_key: [] responses: - "200": + '200': description: Successful operation content: application/json: @@ -392,19 +343,19 @@ paths: billing_accounts: type: array items: - $ref: "#/components/schemas/BillingAccount" + $ref: '#/components/schemas/BillingAccount' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects: get: - tags: ["project"] + tags: + - project operationId: getProjects description: Get Projects accessible by the api_key security: - - api_key: [] + - api_key: [] responses: - "200": + '200': description: Successful operation content: application/json: @@ -414,16 +365,16 @@ paths: projects: type: array items: - $ref: "#/components/schemas/Project" + $ref: '#/components/schemas/Project' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' post: - tags: ["project"] + tags: + - project operationId: createProject description: Create a Project security: - - api_key: [] + - api_key: [] requestBody: description: Project to be created required: true @@ -437,33 +388,33 @@ paths: description: The label for the project. billing_account_uid: type: string - description: > - The billing account UID for the project. - The caller of the API must be able to create projects - within the billing account, otherwise an error will be - returned. + description: 'The billing account UID for the project. The caller + of the API must be able to create projects within the billing + account, otherwise an error will be returned. + + ' required: - - label - - billing_account_uid + - label + - billing_account_uid responses: - "201": + '201': description: Successful operation content: application/json: schema: - $ref: "#/components/schemas/Project" + $ref: '#/components/schemas/Project' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/clone: post: - tags: ["project"] + tags: + - project operationId: cloneProject description: Clone a Project security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' requestBody: description: Project to be cloned required: true @@ -477,73 +428,74 @@ paths: description: The label for the project. billing_account_uid: type: string - description: The billing account UID for the project. - The caller of the API must be able to create projects - within the billing account, otherwise an error will be - returned. + description: The billing account UID for the project. The caller + of the API must be able to create projects within the billing + account, otherwise an error will be returned. disable_clone_routes: type: boolean - description: Whether to disallow the cloning of the routes from the parent project. Default is false if not specified. + description: Whether to disallow the cloning of the routes from + the parent project. Default is false if not specified. disable_clone_fleets: type: boolean - description: Whether to disallow the cloning of the fleets from the parent project. Default is false if not specified. + description: Whether to disallow the cloning of the fleets from + the parent project. Default is false if not specified. required: - - label - - billing_account_uid + - label + - billing_account_uid responses: - "201": + '201': description: Successful operation content: application/json: schema: - $ref: "#/components/schemas/Project" + $ref: '#/components/schemas/Project' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectUID}: get: - tags: ["project"] + tags: + - project operationId: getProject description: Get a Project by ProjectUID security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' responses: - "200": + '200': description: Successful operation content: application/json: schema: - $ref: "#/components/schemas/Project" + $ref: '#/components/schemas/Project' default: - $ref: "#/components/responses/ErrorResponse" + $ref: '#/components/responses/ErrorResponse' delete: - tags: ["project"] + tags: + - project operationId: deleteProject description: Delete a Project by ProjectUID security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' responses: - "200": + '200': description: Successful operation default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/products: parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - + - $ref: '#/components/parameters/projectOrProductUIDParam' get: - tags: ["project"] + tags: + - project operationId: getProjectProducts description: Get Products within a Project security: - - api_key: [] + - api_key: [] responses: - "200": + '200': description: Successful operation content: application/json: @@ -553,16 +505,16 @@ paths: products: type: array items: - $ref: "#/components/schemas/Product" + $ref: '#/components/schemas/Product' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' post: - tags: ["project"] + tags: + - project operationId: createProduct description: Create Product within a Project security: - - api_key: [] + - api_key: [] requestBody: description: Product to be created required: true @@ -573,8 +525,8 @@ paths: properties: product_uid: type: string - description: The requested uid for the Product. Will be - prefixed with the user's reversed email. + description: The requested uid for the Product. Will be prefixed + with the user's reversed email. label: type: string description: The label for the Product. @@ -584,43 +536,42 @@ paths: type: string disable_devices_by_default: type: boolean - description: If `true`, devices provisioned to this product - will be automatically disabled by default. + description: If `true`, devices provisioned to this product will + be automatically disabled by default. required: - - product_uid - - label + - product_uid + - label responses: - "201": + '201': description: Successful operation content: application/json: schema: - $ref: "#/components/schemas/Product" + $ref: '#/components/schemas/Product' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/fleets: parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - + - $ref: '#/components/parameters/projectOrProductUIDParam' get: - tags: ["project"] + tags: + - project operationId: getProjectFleets description: Get Project Fleets security: - - api_key: [] + - api_key: [] responses: - "200": - $ref: "#/components/responses/FleetsResponse" + '200': + $ref: '#/components/responses/FleetsResponse' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' post: - tags: ["project"] + tags: + - project operationId: createFleet description: Create Fleet security: - - api_key: [] + - api_key: [] requestBody: description: Fleet to be added required: true @@ -633,30 +584,27 @@ paths: type: string description: The label, or name, for the Fleet. smart_rule: - $ref: "#/components/schemas/FleetRule" - - + $ref: '#/components/schemas/FleetRule' responses: - "201": + '201': description: Successful operation content: application/json: schema: - $ref: "#/components/schemas/Fleet" + $ref: '#/components/schemas/Fleet' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/fleets/{fleetUID}: parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/fleetUIDParam" - + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/fleetUIDParam' put: - tags: ["project"] + tags: + - project operationId: updateFleet description: Update Fleet security: - - api_key: [] + - api_key: [] requestBody: description: Fleet details to update required: true @@ -679,59 +627,59 @@ paths: type: string description: List of DeviceUIDs to remove from fleet smart_rule: - $ref: "#/components/schemas/FleetRule" + $ref: '#/components/schemas/FleetRule' watchdog_mins: type: integer format: int64 - description: A watchdog timer is used to generate an event every N minutes of inactivity. 0 means no watchdog + description: A watchdog timer is used to generate an event every + N minutes of inactivity. 0 means no watchdog responses: - "200": + '200': description: Successful operation content: application/json: schema: - $ref: "#/components/schemas/Fleet" + $ref: '#/components/schemas/Fleet' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' delete: - tags: ["project"] + tags: + - project operationId: deleteFleet description: Delete Fleet security: - - api_key: [] + - api_key: [] responses: - "204": + '204': description: Successful operation default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' get: - tags: [ "project" ] + tags: + - project operationId: getFleet description: Get Fleet security: - - api_key: [ ] + - api_key: [] responses: - "200": + '200': description: Successful operation content: application/json: schema: - $ref: "#/components/schemas/Fleet" - + $ref: '#/components/schemas/Fleet' /v1/projects/{projectOrProductUID}/members: parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - + - $ref: '#/components/parameters/projectOrProductUIDParam' get: - tags: ["project"] + tags: + - project operationId: getProjectMembers description: Get Project Members security: - - api_key: [] + - api_key: [] responses: - "200": + '200': description: Successful operation content: application/json: @@ -741,49 +689,48 @@ paths: members: type: array items: - $ref: "#/components/schemas/ProjectMember" + $ref: '#/components/schemas/ProjectMember' required: - - members + - members default: - $ref: "#/components/responses/ErrorResponse" - - # devices endpoints + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices: get: - tags: ["device"] + tags: + - device operationId: getProjectDevices description: Get Devices of a Project security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/pageSizeParam" - - $ref: "#/components/parameters/pageNumParam" - - $ref: "#/components/parameters/deviceUIDParamQuery" - - $ref: "#/components/parameters/tagParam" - - $ref: "#/components/parameters/serialNumberParam" - - $ref: "#/components/parameters/fleetUIDsQueryParam" - - $ref: "#/components/parameters/notecardFirmwareParam" - - $ref: "#/components/parameters/locationParam" - - $ref: "#/components/parameters/hostFirmwareParam" - - $ref: "#/components/parameters/productUIDQueryParam" - - $ref: "#/components/parameters/skuParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/pageSizeParam' + - $ref: '#/components/parameters/pageNumParam' + - $ref: '#/components/parameters/deviceUIDParamQuery' + - $ref: '#/components/parameters/tagParam' + - $ref: '#/components/parameters/serialNumberParam' + - $ref: '#/components/parameters/fleetUIDsQueryParam' + - $ref: '#/components/parameters/notecardFirmwareParam' + - $ref: '#/components/parameters/locationParam' + - $ref: '#/components/parameters/hostFirmwareParam' + - $ref: '#/components/parameters/productUIDQueryParam' + - $ref: '#/components/parameters/skuParam' responses: - "200": - $ref: "#/components/responses/DevicesResponse" + '200': + $ref: '#/components/responses/DevicesResponse' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/provision: post: - tags: ["device"] + tags: + - device operationId: postProvisionProjectDevice description: Provision Device for a Project security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' requestBody: description: Provision a device to a specific ProductUID required: true @@ -805,9 +752,9 @@ paths: description: The fleetUIDs to provision the device to. nullable: true required: - - product_uid + - product_uid responses: - "200": + '200': description: Successful operation content: application/json: @@ -815,47 +762,47 @@ paths: type: object default: {} default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/devices: get: - tags: ["device"] + tags: + - device operationId: getProjectFleetDevices description: Get Devices of a Fleet within a Project security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/fleetUIDParam" - - $ref: "#/components/parameters/pageSizeParam" - - $ref: "#/components/parameters/pageNumParam" - - $ref: "#/components/parameters/deviceUIDParamQuery" - - $ref: "#/components/parameters/tagParam" - - $ref: "#/components/parameters/serialNumberParam" - - $ref: "#/components/parameters/notecardFirmwareParam" - - $ref: "#/components/parameters/locationParam" - - $ref: "#/components/parameters/hostFirmwareParam" - - $ref: "#/components/parameters/productUIDQueryParam" - - $ref: "#/components/parameters/skuParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/fleetUIDParam' + - $ref: '#/components/parameters/pageSizeParam' + - $ref: '#/components/parameters/pageNumParam' + - $ref: '#/components/parameters/deviceUIDParamQuery' + - $ref: '#/components/parameters/tagParam' + - $ref: '#/components/parameters/serialNumberParam' + - $ref: '#/components/parameters/notecardFirmwareParam' + - $ref: '#/components/parameters/locationParam' + - $ref: '#/components/parameters/hostFirmwareParam' + - $ref: '#/components/parameters/productUIDQueryParam' + - $ref: '#/components/parameters/skuParam' responses: - "200": - $ref: "#/components/responses/DevicesResponse" + '200': + $ref: '#/components/responses/DevicesResponse' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/public-keys: get: - tags: ["device"] + tags: + - device operationId: getProjectDevicePublicKeys description: Get Device Public Keys of a Project security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/pageSizeParam" - - $ref: "#/components/parameters/pageNumParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/pageSizeParam' + - $ref: '#/components/parameters/pageNumParam' responses: - "200": + '200': description: Successful operation content: application/json: @@ -874,83 +821,79 @@ paths: has_more: type: boolean required: - - device_public_keys - - has_more + - device_public_keys + - has_more default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}: parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" - + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' get: - tags: ["device"] + tags: + - device operationId: getDevice description: Get Device security: - - api_key: [] + - api_key: [] responses: - "200": + '200': description: Successful operation content: application/json: schema: - $ref: "#/components/schemas/Device" + $ref: '#/components/schemas/Device' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' delete: - tags: ["device"] + tags: + - device operationId: deleteProjectDevice description: Delete Device security: - - api_key: [] + - api_key: [] parameters: - - name: purge - in: query - required: true - schema: - type: boolean - default: false - + - name: purge + in: query + required: true + schema: + type: boolean + default: false responses: - "204": + '204': description: Successful operation default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets: parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" - + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' get: - tags: ["project"] + tags: + - project operationId: getDeviceFleets description: Get Device Fleets security: - - api_key: [] + - api_key: [] responses: - "200": - $ref: "#/components/responses/FleetsResponse" + '200': + $ref: '#/components/responses/FleetsResponse' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' put: - tags: ["project"] + tags: + - project operationId: putDeviceFleets description: Add Device to Fleets security: - - api_key: [] + - api_key: [] requestBody: - description: > - The fleets to add to the device. - Note that the endpoint takes an array of fleetUIDs, - to facilitate multi-fleet devices. - Multi-fleet is not yet enabled on all SaaS plans - - unless it is supported by the SaaS plan of the project, - passing more than a single fleetUID in the array is an error. + description: 'The fleets to add to the device. Note that the endpoint takes + an array of fleetUIDs, to facilitate multi-fleet devices. Multi-fleet is + not yet enabled on all SaaS plans - unless it is supported by the SaaS plan + of the project, passing more than a single fleetUID in the array is an error. + + ' required: true content: application/json: @@ -963,27 +906,27 @@ paths: type: string description: The fleetUIDs to add to the device. required: - - fleet_uids + - fleet_uids responses: - "200": - $ref: "#/components/responses/FleetsResponse" + '200': + $ref: '#/components/responses/FleetsResponse' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' delete: - tags: ["project"] + tags: + - project operationId: deleteDeviceFleets description: Remove Device from Fleets security: - - api_key: [] + - api_key: [] requestBody: - description: > - The fleets to remove from the device. - Note that the endpoint takes an array of fleetUIDs, - to facilitate multi-fleet devices. - Multi-fleet is not yet enabled on all SaaS plans - - unless it is supported by the SaaS plan of the project, - passing more than a single fleetUID in the array is an error. + description: 'The fleets to remove from the device. Note that the endpoint + takes an array of fleetUIDs, to facilitate multi-fleet devices. Multi-fleet + is not yet enabled on all SaaS plans - unless it is supported by the SaaS + plan of the project, passing more than a single fleetUID in the array is + an error. + + ' required: true content: application/json: @@ -996,25 +939,25 @@ paths: type: string description: The fleetUIDs to remove from the device. required: - - fleet_uids + - fleet_uids responses: - "200": - $ref: "#/components/responses/FleetsResponse" + '200': + $ref: '#/components/responses/FleetsResponse' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key: get: - tags: ["device"] + tags: + - device operationId: getDevicePublicKey description: Get Device Public Key security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' responses: - "200": + '200': description: Successful operation content: application/json: @@ -1025,42 +968,40 @@ paths: type: string key: type: string - required: - - uid - - key + - uid + - key default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/latest: get: - tags: ["device"] + tags: + - device operationId: getDeviceLatest description: Get Device Latest Events security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' responses: - "200": - $ref: "#/components/responses/LatestResponse" - + '200': + $ref: '#/components/responses/LatestResponse' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log: get: - tags: ["device"] + tags: + - device operationId: getDeviceHealthLog description: Get Device Health Log security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' responses: - "200": + '200': description: Successful operation content: application/json: @@ -1080,319 +1021,301 @@ paths: text: type: string required: - - when - - alert - - text + - when + - alert + - text required: - - health_log + - health_log default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable: post: - tags: ["device"] + tags: + - device operationId: enableDevice description: Enable Device security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' responses: - "200": + '200': description: Successful operation default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable: post: - tags: ["device"] + tags: + - device operationId: disableDevice description: Disable Device security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' responses: - "200": + '200': description: Successful operation default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable-connectivity-assurance: post: - tags: ["device"] + tags: + - device operationId: enableDeviceConnectivityAssurance description: Enable Connectivity Assurance security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' responses: - "200": + '200': description: Successful operation default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable-connectivity-assurance: post: - tags: ["device"] + tags: + - device operationId: disableDeviceConnectivityAssurance description: Disable Connectivity Assurance security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' responses: - "200": + '200': description: Successful operation default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/sessions: get: - tags: ["device"] + tags: + - device operationId: getDeviceSessions description: Get Device Sessions security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" - - $ref: "#/components/parameters/pageSizeParam" - - $ref: "#/components/parameters/pageNumParam" - - $ref: "#/components/parameters/startDateParam" - - $ref: "#/components/parameters/endDateParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + - $ref: '#/components/parameters/pageSizeParam' + - $ref: '#/components/parameters/pageNumParam' + - $ref: '#/components/parameters/startDateParam' + - $ref: '#/components/parameters/endDateParam' responses: - "200": - $ref: "#/components/responses/SessionResponse" + '200': + $ref: '#/components/responses/SessionResponse' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/events: get: - tags: ["event"] + tags: + - event operationId: getProjectEvents description: Get Events of a Project security: - - api_key: [] - + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - # query params - - $ref: "#/components/parameters/pageSizeParam" - - $ref: "#/components/parameters/pageNumParam" - - $ref: "#/components/parameters/deviceUIDParamQuery" - - $ref: "#/components/parameters/sortByParam" - - $ref: "#/components/parameters/sortOrderParam" - - $ref: "#/components/parameters/startDateParam" - - $ref: "#/components/parameters/endDateParam" - - $ref: "#/components/parameters/dateTypeParam" - - $ref: "#/components/parameters/systemFilesOnlyParam" - - $ref: "#/components/parameters/filesQueryParam" - - $ref: "#/components/parameters/formatParam" - - $ref: "#/components/parameters/serialNumberFilterParam" - - $ref: "#/components/parameters/fleetUIDFilterQueryParam" - - $ref: "#/components/parameters/sessionUIDFilterParam" - - $ref: "#/components/parameters/eventUIDFilterQueryParam" - - $ref: "#/components/parameters/selectFieldsParam" - - - name: deviceUIDs - description: Deprecated. - in: query - required: false - deprecated: true - schema: - type: array - items: - type: string - - name: since - description: Deprecated. - in: query - required: false - deprecated: true - schema: + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/pageSizeParam' + - $ref: '#/components/parameters/pageNumParam' + - $ref: '#/components/parameters/deviceUIDParamQuery' + - $ref: '#/components/parameters/sortByParam' + - $ref: '#/components/parameters/sortOrderParam' + - $ref: '#/components/parameters/startDateParam' + - $ref: '#/components/parameters/endDateParam' + - $ref: '#/components/parameters/dateTypeParam' + - $ref: '#/components/parameters/systemFilesOnlyParam' + - $ref: '#/components/parameters/filesQueryParam' + - $ref: '#/components/parameters/formatParam' + - $ref: '#/components/parameters/serialNumberFilterParam' + - $ref: '#/components/parameters/fleetUIDFilterQueryParam' + - $ref: '#/components/parameters/sessionUIDFilterParam' + - $ref: '#/components/parameters/eventUIDFilterQueryParam' + - $ref: '#/components/parameters/selectFieldsParam' + - name: deviceUIDs + description: Deprecated. + in: query + required: false + deprecated: true + schema: + type: array + items: type: string - + - name: since + description: Deprecated. + in: query + required: false + deprecated: true + schema: + type: string responses: - "200": - $ref: "#/components/responses/EventsResponse" + '200': + $ref: '#/components/responses/EventsResponse' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/events-cursor: get: - tags: ["event"] + tags: + - event operationId: getProjectEventsByCursor description: Get Events of a Project by cursor security: - - api_key: [] - + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - # query params - - $ref: "#/components/parameters/limitParam" - - $ref: "#/components/parameters/cursorParam" - - $ref: "#/components/parameters/sortOrderParam" - - $ref: "#/components/parameters/systemFilesOnlyParam" - - $ref: "#/components/parameters/filesQueryParam" - - $ref: "#/components/parameters/fleetUIDQueryParam" - - $ref: "#/components/parameters/deviceUIDParamQuery" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/limitParam' + - $ref: '#/components/parameters/cursorParam' + - $ref: '#/components/parameters/sortOrderParam' + - $ref: '#/components/parameters/systemFilesOnlyParam' + - $ref: '#/components/parameters/filesQueryParam' + - $ref: '#/components/parameters/fleetUIDQueryParam' + - $ref: '#/components/parameters/deviceUIDParamQuery' responses: - "200": - $ref: "#/components/responses/EventsByCursorResponse" + '200': + $ref: '#/components/responses/EventsByCursorResponse' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/events/{eventUID}/route-logs: get: - tags: ["event"] + tags: + - event operationId: getRouteLogsByEvent description: Get Route Logs by Event UID security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/eventUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/eventUIDParam' responses: - "200": + '200': description: Successful operation content: application/json: schema: type: array items: - $ref: "#/components/schemas/RouteLog" + $ref: '#/components/schemas/RouteLog' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events: get: - tags: ["event"] + tags: + - event operationId: getFleetEvents description: Get Events of a Fleet security: - - api_key: [] - + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/fleetUIDParam" - - # query params - - $ref: "#/components/parameters/pageSizeParam" - - $ref: "#/components/parameters/pageNumParam" - - $ref: "#/components/parameters/deviceUIDParamQuery" - - $ref: "#/components/parameters/sortByParam" - - $ref: "#/components/parameters/sortOrderParam" - - $ref: "#/components/parameters/startDateParam" - - $ref: "#/components/parameters/endDateParam" - - $ref: "#/components/parameters/dateTypeParam" - - $ref: "#/components/parameters/systemFilesOnlyParam" - - $ref: "#/components/parameters/filesQueryParam" - - $ref: "#/components/parameters/formatParam" - - $ref: "#/components/parameters/serialNumberFilterParam" - - $ref: "#/components/parameters/sessionUIDFilterParam" - - $ref: "#/components/parameters/eventUIDFilterQueryParam" - - $ref: "#/components/parameters/selectFieldsParam" - - name: deviceUIDs - description: Deprecated. - in: query - required: false - deprecated: true - schema: - type: array - items: - type: string - - name: since - description: Deprecated. - in: query - required: false - deprecated: true - schema: + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/fleetUIDParam' + - $ref: '#/components/parameters/pageSizeParam' + - $ref: '#/components/parameters/pageNumParam' + - $ref: '#/components/parameters/deviceUIDParamQuery' + - $ref: '#/components/parameters/sortByParam' + - $ref: '#/components/parameters/sortOrderParam' + - $ref: '#/components/parameters/startDateParam' + - $ref: '#/components/parameters/endDateParam' + - $ref: '#/components/parameters/dateTypeParam' + - $ref: '#/components/parameters/systemFilesOnlyParam' + - $ref: '#/components/parameters/filesQueryParam' + - $ref: '#/components/parameters/formatParam' + - $ref: '#/components/parameters/serialNumberFilterParam' + - $ref: '#/components/parameters/sessionUIDFilterParam' + - $ref: '#/components/parameters/eventUIDFilterQueryParam' + - $ref: '#/components/parameters/selectFieldsParam' + - name: deviceUIDs + description: Deprecated. + in: query + required: false + deprecated: true + schema: + type: array + items: type: string - + - name: since + description: Deprecated. + in: query + required: false + deprecated: true + schema: + type: string responses: - "200": - $ref: "#/components/responses/EventsResponse" + '200': + $ref: '#/components/responses/EventsResponse' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events-cursor: get: - tags: ["event"] + tags: + - event operationId: getFleetEventsByCursor description: Get Events of a Fleet by cursor security: - - api_key: [] - + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/fleetUIDParam" - - # query params - - $ref: "#/components/parameters/limitParam" - - $ref: "#/components/parameters/cursorParam" - - $ref: "#/components/parameters/sortOrderParam" - - $ref: "#/components/parameters/systemFilesOnlyParam" - - $ref: "#/components/parameters/filesQueryParam" - - $ref: "#/components/parameters/deviceUIDParamQuery" - - $ref: "#/components/parameters/startDateParam" - - $ref: "#/components/parameters/endDateParam" - + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/fleetUIDParam' + - $ref: '#/components/parameters/limitParam' + - $ref: '#/components/parameters/cursorParam' + - $ref: '#/components/parameters/sortOrderParam' + - $ref: '#/components/parameters/systemFilesOnlyParam' + - $ref: '#/components/parameters/filesQueryParam' + - $ref: '#/components/parameters/deviceUIDParamQuery' + - $ref: '#/components/parameters/startDateParam' + - $ref: '#/components/parameters/endDateParam' responses: - "200": - $ref: "#/components/responses/EventsByCursorResponse" + '200': + $ref: '#/components/responses/EventsByCursorResponse' default: - $ref: "#/components/responses/ErrorResponse" - - # project environment variables + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/environment_variables: parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - + - $ref: '#/components/parameters/projectOrProductUIDParam' get: description: Get environment variables of a project - tags: ["project"] + tags: + - project operationId: getProjectEnvironmentVariables security: - - api_key: [] + - api_key: [] responses: - "200": - $ref: "#/components/responses/EnvironmentVariablesResponse" + '200': + $ref: '#/components/responses/EnvironmentVariablesResponse' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' put: description: Put environment variables of a project - tags: ["project"] + tags: + - project operationId: putProjectEnvironmentVariables security: - - api_key: [] + - api_key: [] requestBody: content: application/json: schema: - $ref: "#/components/schemas/EnvironmentVariables" + $ref: '#/components/schemas/EnvironmentVariables' responses: - "200": - $ref: "#/components/responses/EnvironmentVariablesResponse" + '200': + $ref: '#/components/responses/EnvironmentVariablesResponse' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/environment_hierarchy: get: summary: Get environment variable hierarchy for a device - tags: ["project"] + tags: + - project operationId: getProjectEnvironmentHierarchy security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' responses: '200': description: Successfully retrieved project environment hierarchy @@ -1404,127 +1327,126 @@ paths: description: Project or device not found '500': description: Server error - /v1/projects/{projectOrProductUID}/environment_variables/{key}: delete: description: Delete an environment variable of a project by key - tags: ["project"] + tags: + - project operationId: deleteProjectEnvironmentVariable security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - name: key - in: path - required: true - schema: - type: string - description: The environment variable key to delete. + - $ref: '#/components/parameters/projectOrProductUIDParam' + - name: key + in: path + required: true + schema: + type: string + description: The environment variable key to delete. responses: - "200": - $ref: "#/components/responses/EnvironmentVariablesResponse" + '200': + $ref: '#/components/responses/EnvironmentVariablesResponse' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/global-transformation/enable: post: description: Enable the project-level event JSONata transformation - tags: ["project"] + tags: + - project operationId: enableGlobalTransformation security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' responses: - "200": + '200': description: Successful operation default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/global-transformation/disable: post: description: Disable the project-level event JSONata transformation - tags: ["project"] + tags: + - project operationId: disableGlobalTransformation security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' responses: - "200": + '200': description: Successful operation default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/global-transformation: post: description: Set the project-level event JSONata transformation - tags: ["project"] + tags: + - project operationId: setGlobalTransformation security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' requestBody: - description: JSONata expression which will be applied to each event before it is persisted and routed + description: JSONata expression which will be applied to each event before + it is persisted and routed required: true content: application/json: schema: - $ref: "#/components/schemas/JSONata" + $ref: '#/components/schemas/JSONata' responses: - "200": + '200': description: Successful operation default: - $ref: "#/components/responses/ErrorResponse" - - # fleet environment variables + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables: parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/fleetUIDParam" - + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/fleetUIDParam' get: description: Get environment variables of a fleet - tags: ["project"] + tags: + - project operationId: getFleetEnvironmentVariables security: - - api_key: [] + - api_key: [] responses: - "200": - $ref: "#/components/responses/EnvironmentVariablesResponse" + '200': + $ref: '#/components/responses/EnvironmentVariablesResponse' default: - $ref: "#/components/responses/ErrorResponse" + $ref: '#/components/responses/ErrorResponse' put: description: Put environment variables of a fleet - tags: ["project"] + tags: + - project operationId: putFleetEnvironmentVariables security: - - api_key: [] + - api_key: [] requestBody: description: Environment variables to be added to the fleet required: true content: application/json: schema: - $ref: "#/components/schemas/EnvironmentVariables" + $ref: '#/components/schemas/EnvironmentVariables' responses: - "200": - $ref: "#/components/responses/EnvironmentVariablesResponse" + '200': + $ref: '#/components/responses/EnvironmentVariablesResponse' default: - $ref: "#/components/responses/ErrorResponse" - - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_hierarchy: get: summary: Get environment variable hierarchy for a device - tags: ["project"] + tags: + - project operationId: getFleetEnvironmentHierarchy security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/fleetUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/fleetUIDParam' responses: '200': description: Successfully retrieved fleet environment hierarchy @@ -1536,75 +1458,74 @@ paths: description: Project or device not found '500': description: Server error - /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables/{key}: delete: description: Delete environment variables of a fleet - tags: ["project"] + tags: + - project operationId: deleteFleetEnvironmentVariable security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/fleetUIDParam" - - name: key - in: path - required: true - schema: - type: string - description: The environment variable key to delete. + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/fleetUIDParam' + - name: key + in: path + required: true + schema: + type: string + description: The environment variable key to delete. responses: - "200": - $ref: "#/components/responses/EnvironmentVariablesResponse" + '200': + $ref: '#/components/responses/EnvironmentVariablesResponse' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables: parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" - + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' get: description: Get environment variables of a device - tags: ["device"] + tags: + - device operationId: getDeviceEnvironmentVariables security: - - api_key: [] + - api_key: [] responses: - "200": - $ref: "#/components/responses/GetDeviceEnvironmentVariablesResponse" + '200': + $ref: '#/components/responses/GetDeviceEnvironmentVariablesResponse' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' put: description: Put environment variables of a device - tags: ["device"] + tags: + - device operationId: putDeviceEnvironmentVariables security: - - api_key: [] + - api_key: [] requestBody: description: Environment variables to be added to the device required: true content: application/json: schema: - $ref: "#/components/schemas/EnvironmentVariables" + $ref: '#/components/schemas/EnvironmentVariables' responses: - "200": - $ref: "#/components/responses/EnvironmentVariablesResponse" + '200': + $ref: '#/components/responses/EnvironmentVariablesResponse' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_hierarchy: get: summary: Get environment variable hierarchy for a device - tags: ["device"] + tags: + - device operationId: getDeviceEnvironmentHierarchy security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' responses: '200': description: Successfully retrieved device environment hierarchy @@ -1616,161 +1537,157 @@ paths: description: Project or device not found '500': description: Server error - /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables/{key}: delete: description: Delete environment variable of a device - tags: ["device"] + tags: + - device operationId: deleteDeviceEnvironmentVariable security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" - - name: key - in: path - required: true - schema: - type: string - description: The environment variable key to delete. + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + - name: key + in: path + required: true + schema: + type: string + description: The environment variable key to delete. responses: - "200": - $ref: "#/components/responses/EnvironmentVariablesResponse" + '200': + $ref: '#/components/responses/EnvironmentVariablesResponse' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin: parameters: - - $ref: "#/components/parameters/productUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" - + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' get: - description: Get environment variables of a device with device pin - authorization - tags: ["device"] + description: Get environment variables of a device with device pin authorization + tags: + - device operationId: getDeviceEnvironmentVariablesByPin security: - - pin: [] + - pin: [] responses: - "200": - $ref: "#/components/responses/GetDeviceEnvironmentVariablesResponse" + '200': + $ref: '#/components/responses/GetDeviceEnvironmentVariablesResponse' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' put: - description: Put environment variables of a device with device pin - authorization - tags: ["device"] + description: Put environment variables of a device with device pin authorization + tags: + - device operationId: putDeviceEnvironmentVariablesByPin security: - - pin: [] + - pin: [] requestBody: description: Environment variables to be added to the device required: true content: application/json: schema: - $ref: "#/components/schemas/EnvironmentVariables" + $ref: '#/components/schemas/EnvironmentVariables' responses: - "200": - $ref: "#/components/responses/EnvironmentVariablesResponse" + '200': + $ref: '#/components/responses/EnvironmentVariablesResponse' default: - $ref: "#/components/responses/ErrorResponse" - - # note endpoints + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}: post: - tags: ["device"] + tags: + - device operationId: HandleNoteAdd - description: Adds a Note to a Notefile, creating the Notefile if it - doesn't yet exist. + description: Adds a Note to a Notefile, creating the Notefile if it doesn't + yet exist. security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" - - $ref: "#/components/parameters/notefileIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + - $ref: '#/components/parameters/notefileIDParam' requestBody: description: Body or payload of note to be added to the device required: true content: application/json: schema: - $ref: "#/components/schemas/Note" + $ref: '#/components/schemas/Note' responses: - "200": + '200': description: An empty object means success default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}: post: - tags: ["device"] + tags: + - device operationId: HandleNoteCreateAdd - description: Adds a Note to a Notefile, creating the Notefile if it - doesn't yet exist. + description: Adds a Note to a Notefile, creating the Notefile if it doesn't + yet exist. security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" - - $ref: "#/components/parameters/notefileIDParam" - - $ref: "#/components/parameters/noteIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + - $ref: '#/components/parameters/notefileIDParam' + - $ref: '#/components/parameters/noteIDParam' requestBody: description: Body or payload of note to be added to the device required: true content: application/json: schema: - $ref: "#/components/schemas/Note" + $ref: '#/components/schemas/Note' responses: - "200": + '200': description: An empty object means success default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' delete: - tags: ["device"] + tags: + - device operationId: HandleNoteDelete description: Delete a note from a DB notefile security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" - - $ref: "#/components/parameters/notefileIDParam" - - $ref: "#/components/parameters/noteIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + - $ref: '#/components/parameters/notefileIDParam' + - $ref: '#/components/parameters/noteIDParam' responses: - "200": + '200': description: An empty object means success default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' get: - tags: ["device"] + tags: + - device operationId: HandleNoteGet description: Get a note from a DB notefile security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" - - $ref: "#/components/parameters/notefileIDParam" - - $ref: "#/components/parameters/noteIDParam" - - name: delete - in: query - required: false - schema: - type: boolean - description: Whether to delete the note from the DB notefile - - name: deleted - in: query - required: false - schema: - type: boolean - description: Whether to return deleted notes + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + - $ref: '#/components/parameters/notefileIDParam' + - $ref: '#/components/parameters/noteIDParam' + - name: delete + in: query + required: false + schema: + type: boolean + description: Whether to delete the note from the DB notefile + - name: deleted + in: query + required: false + schema: + type: boolean + description: Whether to return deleted notes responses: - "200": + '200': description: The requested note content: application/json: @@ -1787,81 +1704,81 @@ paths: type: integer description: The time the Note was added to the Notecard or Notehub default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' put: - tags: ["device"] + tags: + - device operationId: HandleNoteUpdate description: Update a note in a DB notefile security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" - - $ref: "#/components/parameters/notefileIDParam" - - $ref: "#/components/parameters/noteIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + - $ref: '#/components/parameters/notefileIDParam' + - $ref: '#/components/parameters/noteIDParam' requestBody: description: Body or payload of note to be added to the device required: true content: application/json: schema: - $ref: "#/components/schemas/Note" + $ref: '#/components/schemas/Note' responses: - "200": + '200': description: An empty object means success default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/changes: get: - tags: ["device"] + tags: + - device operationId: HandleNoteChanges description: Incrementally retrieve changes within a specific Notefile. security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" - - $ref: "#/components/parameters/notefileIDParam" - - name: tracker - description: The change tracker ID. - in: query - required: false - schema: - type: string - - name: max - description: The maximum number of Notes to return in the request. - in: query - required: false - schema: - type: integer - - name: start - description: true to reset the tracker to the beginning. - in: query - required: false - schema: - type: boolean - - name: stop - description: true to delete the tracker. - in: query - required: false - schema: - type: boolean - - name: deleted - description: true to return deleted notes. - in: query - required: false - schema: - type: boolean - - name: delete - description: true to delete the notes returned by the request. - in: query - required: false - schema: - type: boolean + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + - $ref: '#/components/parameters/notefileIDParam' + - name: tracker + description: The change tracker ID. + in: query + required: false + schema: + type: string + - name: max + description: The maximum number of Notes to return in the request. + in: query + required: false + schema: + type: integer + - name: start + description: true to reset the tracker to the beginning. + in: query + required: false + schema: + type: boolean + - name: stop + description: true to delete the tracker. + in: query + required: false + schema: + type: boolean + - name: deleted + description: true to return deleted notes. + in: query + required: false + schema: + type: boolean + - name: delete + description: true to delete the notes returned by the request. + in: query + required: false + schema: + type: boolean responses: - "200": + '200': description: The note changes object content: application/json: @@ -1876,36 +1793,38 @@ paths: description: The number of pending changes in the Notefile. notes: type: object - description: An object with a key for each note and a value object with the body of each Note and the time the Note was added. + description: An object with a key for each note and a value object + with the body of each Note and the time the Note was added. default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/files/changes: get: - tags: ["device"] + tags: + - device operationId: HandleNotefileChanges - description: Used to perform queries on a single or multiple files to determine if new Notes are available to read + description: Used to perform queries on a single or multiple files to determine + if new Notes are available to read security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" - - name: tracker - description: The change tracker ID. - in: query - required: false - schema: + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + - name: tracker + description: The change tracker ID. + in: query + required: false + schema: + type: string + - name: files + description: One or more files to obtain change information from. + in: query + required: false + schema: + type: array + items: type: string - - name: files - description: One or more files to obtain change information from. - in: query - required: false - schema: - type: array - items: - type: string responses: - "200": + '200': description: The notefile changes object content: application/json: @@ -1920,22 +1839,25 @@ paths: description: The number of pending changes in the Notefile. info: type: object - description: An object with a key for each Notefile that matched the request parameters, and value object with the changes and total for each file. + description: An object with a key for each Notefile that matched + the request parameters, and value object with the changes and + total for each file. default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/files/changes/pending: get: - tags: ["device"] + tags: + - device operationId: HandleNotefileChangesPending - description: Returns info about file changes that are pending upload to Notehub or download to the Notecard. + description: Returns info about file changes that are pending upload to Notehub + or download to the Notecard. security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' responses: - "200": + '200': description: The notefile pending changes object content: application/json: @@ -1953,20 +1875,22 @@ paths: description: Whether there are pending changes. info: type: object - description: An object with a key for each Notefile that matched the request parameters, and value object with the changes and total for each file. + description: An object with a key for each Notefile that matched + the request parameters, and value object with the changes and + total for each file. default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/files: delete: - tags: ["device"] + tags: + - device operationId: HandleNotefileDelete description: Deletes Notefiles and the Notes they contain. security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' requestBody: required: true content: @@ -1980,30 +1904,30 @@ paths: items: type: string responses: - "200": + '200': description: An empty object means success default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/signal: post: - tags: ["device"] + tags: + - device operationId: HandleNoteSignal description: Send a signal from Notehub to a Notecard. security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' requestBody: description: Body or payload of singnal to be sent to the device required: true content: application/json: schema: - $ref: "#/components/schemas/Body" + $ref: '#/components/schemas/Body' responses: - "200": + '200': description: A status response. content: application/json: @@ -2014,143 +1938,146 @@ paths: type: boolean description: true if the Notecard is connected to Notehub. default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/monitors: get: - tags: ["monitor"] + tags: + - monitor operationId: getMonitors description: Get list of defined Monitors security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' responses: - "200": - $ref: "#/components/responses/MonitorsResponse" + '200': + $ref: '#/components/responses/MonitorsResponse' default: - $ref: "#/components/responses/ErrorResponse" + $ref: '#/components/responses/ErrorResponse' post: - tags: ["monitor"] + tags: + - monitor operationId: createMonitor description: Create a new Monitor security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' requestBody: description: Body or payload of monitor to be created required: true content: application/json: schema: - $ref: "#/components/schemas/CreateMonitor" + $ref: '#/components/schemas/CreateMonitor' responses: - "201": + '201': description: Successful operation content: application/json: schema: - $ref: "#/components/schemas/Monitor" + $ref: '#/components/schemas/Monitor' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/monitors/{monitorUID}: get: - tags: ["monitor"] + tags: + - monitor operationId: getMonitor description: Get Monitor security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/monitorUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/monitorUIDParam' responses: - "200": + '200': description: Successful operation content: application/json: schema: - $ref: "#/components/schemas/Monitor" + $ref: '#/components/schemas/Monitor' default: - $ref: "#/components/responses/ErrorResponse" + $ref: '#/components/responses/ErrorResponse' put: - tags: ["monitor"] + tags: + - monitor operationId: updateMonitor description: Update Monitor security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/monitorUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/monitorUIDParam' requestBody: description: Body or payload of monitor to be created required: true content: application/json: schema: - $ref: "#/components/schemas/Monitor" + $ref: '#/components/schemas/Monitor' responses: - "200": + '200': description: Successful operation content: application/json: schema: - $ref: "#/components/schemas/Monitor" + $ref: '#/components/schemas/Monitor' default: - $ref: "#/components/responses/ErrorResponse" + $ref: '#/components/responses/ErrorResponse' delete: - tags: ["monitor"] + tags: + - monitor operationId: deleteMonitor description: Delete Monitor security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/monitorUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/monitorUIDParam' responses: - "200": + '200': description: Successful operation content: application/json: schema: - $ref: "#/components/schemas/Monitor" + $ref: '#/components/schemas/Monitor' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/alerts: get: - tags: ["alert"] + tags: + - alert operationId: getAlerts description: Get list of defined Alerts security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/pageSizeParam" - - $ref: "#/components/parameters/pageNumParam" - - $ref: "#/components/parameters/monitorUIDQueryParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/pageSizeParam' + - $ref: '#/components/parameters/pageNumParam' + - $ref: '#/components/parameters/monitorUIDQueryParam' responses: - "200": - $ref: "#/components/responses/AlertsResponse" + '200': + $ref: '#/components/responses/AlertsResponse' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}: put: - tags: ["project"] + tags: + - project operationId: uploadFirmware description: Upload firmware binary security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/firmwareTypeParam" - - name: filename - in: path - required: true - schema: - type: string + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/firmwareTypeParam' + - name: filename + in: path + required: true + schema: + type: string requestBody: description: contents of the firmware binary required: true @@ -2165,27 +2092,26 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/FirmwareInfo" + $ref: '#/components/schemas/FirmwareInfo' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/firmware: get: - tags: ["project"] + tags: + - project operationId: getFirmwareInfo description: Get Available Firmware Information security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/productQueryParam" - - $ref: "#/components/parameters/firmwareTypeQueryParam" - - $ref: "#/components/parameters/versionQueryParam" - - $ref: "#/components/parameters/targetQueryParam" - - $ref: "#/components/parameters/filenameQueryParam" - - $ref: "#/components/parameters/md5QueryParam" - - $ref: "#/components/parameters/unpublishedQueryParam" - + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/productQueryParam' + - $ref: '#/components/parameters/firmwareTypeQueryParam' + - $ref: '#/components/parameters/versionQueryParam' + - $ref: '#/components/parameters/targetQueryParam' + - $ref: '#/components/parameters/filenameQueryParam' + - $ref: '#/components/parameters/md5QueryParam' + - $ref: '#/components/parameters/unpublishedQueryParam' responses: 200: description: Success @@ -2194,394 +2120,160 @@ paths: schema: type: array items: - $ref: "#/components/schemas/FirmwareInfo" + $ref: '#/components/schemas/FirmwareInfo' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/history: get: - tags: ["project"] + tags: + - project operationId: getDeviceDfuHistory description: Get device DFU history for host or Notecard firmware security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" - - $ref: "#/components/parameters/firmwareTypeParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + - $ref: '#/components/parameters/firmwareTypeParam' responses: 200: description: Success content: application/json: schema: - $ref: "#/components/schemas/DeviceDfuHistory" + $ref: '#/components/schemas/DeviceDfuHistory' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/status: get: - tags: ["project"] + tags: + - project operationId: getDeviceDfuStatus description: Get device DFU history for host or Notecard firmware security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/deviceUIDParam" - - $ref: "#/components/parameters/firmwareTypeParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + - $ref: '#/components/parameters/firmwareTypeParam' responses: 200: description: Success content: application/json: schema: - $ref: "#/components/schemas/DeviceDfuStatus" + $ref: '#/components/schemas/DeviceDfuStatus' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/history: get: - tags: ["project"] + tags: + - project operationId: getDevicesDfuHistory - description: Get host or Notecard DFU history for all devices that match the filter criteria + description: Get host or Notecard DFU history for all devices that match the + filter criteria security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/firmwareTypeParam" - - $ref: "#/components/parameters/pageSizeParam" - - $ref: "#/components/parameters/pageNumParam" - - $ref: "#/components/parameters/sortByParam" - - $ref: "#/components/parameters/sortOrderParam" - - $ref: "#/components/parameters/deviceUIDParamQuery" - - $ref: "#/components/parameters/tagParam" - - $ref: "#/components/parameters/serialNumberParam" - - $ref: "#/components/parameters/fleetUIDQueryParam" - - $ref: "#/components/parameters/notecardFirmwareParam" - - $ref: "#/components/parameters/locationParam" - - $ref: "#/components/parameters/hostFirmwareParam" - - $ref: "#/components/parameters/productUIDQueryParam" - - $ref: "#/components/parameters/skuParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/firmwareTypeParam' + - $ref: '#/components/parameters/pageSizeParam' + - $ref: '#/components/parameters/pageNumParam' + - $ref: '#/components/parameters/sortByParam' + - $ref: '#/components/parameters/sortOrderParam' + - $ref: '#/components/parameters/deviceUIDParamQuery' + - $ref: '#/components/parameters/tagParam' + - $ref: '#/components/parameters/serialNumberParam' + - $ref: '#/components/parameters/fleetUIDQueryParam' + - $ref: '#/components/parameters/notecardFirmwareParam' + - $ref: '#/components/parameters/locationParam' + - $ref: '#/components/parameters/hostFirmwareParam' + - $ref: '#/components/parameters/productUIDQueryParam' + - $ref: '#/components/parameters/skuParam' responses: 200: description: Success content: application/json: schema: - $ref: "#/components/schemas/DeviceDfuHistoryPage" + $ref: '#/components/schemas/DeviceDfuHistoryPage' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/status: get: - tags: ["project"] + tags: + - project operationId: getDevicesDfuStatus - description: Get host or Notecard DFU history for all devices that match the filter criteria + description: Get host or Notecard DFU history for all devices that match the + filter criteria security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/firmwareTypeParam" - - $ref: "#/components/parameters/pageSizeParam" - - $ref: "#/components/parameters/pageNumParam" - - $ref: "#/components/parameters/sortByParam" - - $ref: "#/components/parameters/sortOrderParam" - - $ref: "#/components/parameters/deviceUIDParamQuery" - - $ref: "#/components/parameters/tagParam" - - $ref: "#/components/parameters/serialNumberParam" - - $ref: "#/components/parameters/fleetUIDQueryParam" - - $ref: "#/components/parameters/notecardFirmwareParam" - - $ref: "#/components/parameters/locationParam" - - $ref: "#/components/parameters/hostFirmwareParam" - - $ref: "#/components/parameters/productUIDQueryParam" - - $ref: "#/components/parameters/skuParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/firmwareTypeParam' + - $ref: '#/components/parameters/pageSizeParam' + - $ref: '#/components/parameters/pageNumParam' + - $ref: '#/components/parameters/sortByParam' + - $ref: '#/components/parameters/sortOrderParam' + - $ref: '#/components/parameters/deviceUIDParamQuery' + - $ref: '#/components/parameters/tagParam' + - $ref: '#/components/parameters/serialNumberParam' + - $ref: '#/components/parameters/fleetUIDQueryParam' + - $ref: '#/components/parameters/notecardFirmwareParam' + - $ref: '#/components/parameters/locationParam' + - $ref: '#/components/parameters/hostFirmwareParam' + - $ref: '#/components/parameters/productUIDQueryParam' + - $ref: '#/components/parameters/skuParam' responses: 200: description: Success content: application/json: schema: - $ref: "#/components/schemas/DeviceDfuStatusPage" + $ref: '#/components/schemas/DeviceDfuStatusPage' default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/{action}: post: - tags: ["project"] - operationId: dfuAction + tags: + - project + operationId: dfuAction description: Update/cancel host or notecard firmware updates security: - - api_key: [] + - api_key: [] parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" - - $ref: "#/components/parameters/firmwareTypeParam" - - $ref: "#/components/parameters/dfuActionParam" - - $ref: "#/components/parameters/deviceUIDParamQuery" - - $ref: "#/components/parameters/tagParam" - - $ref: "#/components/parameters/serialNumberParam" - - $ref: "#/components/parameters/fleetUIDQueryParam" - - $ref: "#/components/parameters/notecardFirmwareParam" - - $ref: "#/components/parameters/locationParam" - - $ref: "#/components/parameters/hostFirmwareParam" - - $ref: "#/components/parameters/productUIDQueryParam" - - $ref: "#/components/parameters/skuParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/firmwareTypeParam' + - $ref: '#/components/parameters/dfuActionParam' + - $ref: '#/components/parameters/deviceUIDParamQuery' + - $ref: '#/components/parameters/tagParam' + - $ref: '#/components/parameters/serialNumberParam' + - $ref: '#/components/parameters/fleetUIDQueryParam' + - $ref: '#/components/parameters/notecardFirmwareParam' + - $ref: '#/components/parameters/locationParam' + - $ref: '#/components/parameters/hostFirmwareParam' + - $ref: '#/components/parameters/productUIDQueryParam' + - $ref: '#/components/parameters/skuParam' requestBody: - description: Which firmware in the case of an update action + description: Which firmware in the case of an update action required: false content: application/json: schema: - $ref: "#/components/schemas/DfuActionRequest" + $ref: '#/components/schemas/DfuActionRequest' responses: 200: description: Success default: - $ref: "#/components/responses/ErrorResponse" - - /v1/repositories: - post: - tags: ["repository"] - operationId: createRepository - description: Create a new repository - security: - - api_key: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/CreateUpdateRepository" - responses: - "201": - description: Repository created successfully - content: - application/json: - schema: - $ref: "#/components/schemas/Repository" - default: - $ref: "#/components/responses/ErrorResponse" - - /v1/repositories/{repositoryUID}: - get: - tags: ["repository"] - operationId: getRepository - description: Get repository information - security: - - api_key: [] - parameters: - - $ref: "#/components/parameters/repositoryUIDParam" - - $ref: "#/components/parameters/repositoryKey" - responses: - "200": - description: Dataset updated successfully - content: - application/json: - schema: - $ref: "#/components/schemas/Repository" - default: - $ref: "#/components/responses/ErrorResponse" - put: - tags: ["repository"] - operationId: putRepository - description: Update a repository - security: - - api_key: [] - parameters: - - $ref: "#/components/parameters/repositoryUIDParam" - - $ref: "#/components/parameters/repositoryKey" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/CreateUpdateRepository" - responses: - "200": - description: Dataset updated successfully - content: - application/json: - schema: - $ref: "#/components/schemas/Repository" - default: - $ref: "#/components/responses/ErrorResponse" - delete: - tags: ["repository"] - operationId: deleteRepository - description: Delete a repository - security: - - api_key: [] - parameters: - - $ref: "#/components/parameters/repositoryUIDParam" - - $ref: "#/components/parameters/repositoryKey" - responses: - "200": - description: Dataset deleted successfully - default: - $ref: "#/components/responses/ErrorResponse" - - /v1/repositories/{repositoryUID}/datasets: - put: - tags: ["repository"] - operationId: createRepositoryDataset - description: Create a new dataset within a repository - security: - - api_key: [] - parameters: - - $ref: "#/components/parameters/repositoryUIDParam" - - $ref: "#/components/parameters/repositoryKey" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/DataSet" - responses: - "201": - description: Dataset created successfully - content: - application/json: - schema: - $ref: "#/components/schemas/DataSet" - default: - $ref: "#/components/responses/ErrorResponse" - - /v1/repositories/{repositoryUID}/datasets/{name}: - get: - tags: ["repository"] - operationId: getRepositoryDataset - description: Get the details of a dataset - security: - - api_key: [] - parameters: - - $ref: "#/components/parameters/repositoryUIDParam" - - $ref: '#/components/parameters/datasetNameParam' - - $ref: "#/components/parameters/repositoryKey" - responses: - "200": - description: Dataset details - content: - application/json: - schema: - $ref: "#/components/schemas/DataSet" - default: - $ref: "#/components/responses/ErrorResponse" - delete: - tags: ["repository"] - operationId: deleteRepositoryDataset - description: Delete a dataset - security: - - api_key: [] - parameters: - - $ref: "#/components/parameters/repositoryUIDParam" - - $ref: "#/components/parameters/datasetNameParam" - - $ref: "#/components/parameters/repositoryKey" - responses: - "200": - description: Dataset deleted successfully - default: - $ref: "#/components/responses/ErrorResponse" - - /v1/repositories/{repositoryUID}/sql: - post: - tags: ["repository"] - operationId: queryRepositorySql - description: Run a raw Clickhouse-compatible SQL statement against the repository's database. Results are returned in CSV format - security: - - api_key: [] - parameters: - - $ref: "#/components/parameters/repositoryUIDParam" - - $ref: "#/components/parameters/repositoryKey" - - in: header - description: Specify the format of the response data. This functions the same as the - ClickHouse `FORMAT` clause. Supported values include `CSV`, `JSON`, `JSONEachRow`, - `TabSeparated`, and `NDJSON`. If not specified, defaults to `TabSeparated`. - name: X-ClickHouse-Format - schema: - type: string - requestBody: - description: Clickhouse-compatible SQL statement - required: true - content: - text/plain: - schema: - type: string - responses: - "200": - description: Successful query - content: - text/plain: - schema: - type: string - format: binary - default: - $ref: "#/components/responses/ErrorResponse" - - /v1/repositories/{repositoryUID}/datasets/{name}/query: - get: - tags: ["repository"] - operationId: queryRepositoryDataset - description: Query a dataset with support for time ranges, field selection, filtering, and location-based queries - security: - - api_key: [] - parameters: - - $ref: "#/components/parameters/repositoryKey" - - $ref: "#/components/parameters/repositoryUIDParam" - - $ref: "#/components/parameters/datasetNameParam" - - $ref: "#/components/parameters/datasetStartQueryParam" - - $ref: "#/components/parameters/datasetEndQueryParam" - - $ref: "#/components/parameters/datasetSelectQueryParam" - - $ref: "#/components/parameters/datasetWhereQueryParam" - - $ref: "#/components/parameters/datasetAggregateWindowQueryParam" - - $ref: "#/components/parameters/datasetLocationNearQueryParam" - - $ref: "#/components/parameters/datasetLocationRadiusQueryParam" - - $ref: "#/components/parameters/datasetLimitQueryParam" - - $ref: "#/components/parameters/datasetOrderByQueryParam" - - $ref: "#/components/parameters/datasetDistinctQueryParam" - responses: - "200": - description: Successful query - content: - text/csv: - schema: - type: string - format: binary - example: | - lat,lon,device,session_began - 42.393125,-71.185015,dev:1234,2024-01-01T12:34:56Z - default: - $ref: "#/components/responses/ErrorResponse" - - /v1/repositories/{repositoryUID}/data: - get: - tags: ["repository"] - operationId: getRepositoryData - description: Get event and session data from a repository in NDJSON format. - security: - - api_key: [] - parameters: - - $ref: "#/components/parameters/repositoryKey" - - $ref: "#/components/parameters/repositoryUIDParam" - - $ref: "#/components/parameters/datasetStartQueryParam" - - $ref: "#/components/parameters/datasetEndQueryParam" - responses: - "200": - description: Successful request returning NDJSON encoded event and session objects. - content: - text/csv: - schema: - type: string - format: binary - default: - $ref: "#/components/responses/ErrorResponse" - + $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/schemas: get: - tags: ["project"] + tags: + - project operationId: getNotefileSchemas summary: Get variable format for a notefile parameters: - - $ref: "#/components/parameters/projectOrProductUIDParam" + - $ref: '#/components/parameters/projectOrProductUIDParam' responses: '200': description: List of notefile schema definitions @@ -2591,19 +2283,19 @@ paths: type: array items: $ref: '#/components/schemas/NotefileSchema' - /v1/projects/{projectOrProductUID}/webhooks: get: - tags: ["webhook"] + tags: + - webhook security: - - api_key: [] + - api_key: [] operationId: GetWebhooks description: Retrieves all webhooks for the specified project parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/projectOrProductUIDParam' responses: default: - $ref: "#/components/responses/ErrorResponse" + $ref: '#/components/responses/ErrorResponse' 200: description: Webhooks retrieved successfully content: @@ -2615,18 +2307,18 @@ paths: type: array items: $ref: '#/components/schemas/WebhookSettings' - /v1/projects/{projectOrProductUID}/webhooks/{webhookUID}: post: - tags: ["webhook"] + tags: + - webhook security: - - api_key: [] + - api_key: [] operationId: CreateWebhook - description: Creates a webhook for the specified product with the given name. The name | - must be unique within the project. + description: Creates a webhook for the specified product with the given name. + The name | must be unique within the project. parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/webhookUIDParam' + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/webhookUIDParam' requestBody: required: true content: @@ -2635,25 +2327,26 @@ paths: $ref: '#/components/schemas/WebhookSettings' example: settings: - disabled: False + disabled: false id: Abc_123-2646f411-dc56-44a0-9743-4130f47a74h8 transform: '{"device":body.end_device_ids.dev_eui,"sn":body.end_device_ids.device_id,"body":body.uplink_message.decoded_payload,"details":body}' responses: default: - $ref: "#/components/responses/ErrorResponse" + $ref: '#/components/responses/ErrorResponse' 200: description: Webhook created successfully - put: - tags: ["webhook"] + tags: + - webhook security: - - api_key: [] + - api_key: [] operationId: UpdateWebhook description: Updates the configuration settings for the specified webhook. | - Webhook will be created if it does not exist. Update body will completely replace the existing settings. + Webhook will be created if it does not exist. Update body will completely + replace the existing settings. parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/webhookUIDParam' + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/webhookUIDParam' requestBody: required: true content: @@ -2661,25 +2354,26 @@ paths: schema: $ref: '#/components/schemas/WebhookSettings' example: - disabled: False + disabled: false transform: '{"device":body.end_device_ids.dev_eui,"sn":body.end_device_ids.device_id,"body":body.uplink_message.decoded_payload,"details":body}' responses: default: - $ref: "#/components/responses/ErrorResponse" + $ref: '#/components/responses/ErrorResponse' 200: description: Webhook updated successfully get: - tags: ["webhook"] + tags: + - webhook security: - - api_key: [] + - api_key: [] operationId: GetWebhook description: Retrieves the configuration settings for the specified webhook parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/webhookUIDParam' + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/webhookUIDParam' responses: default: - $ref: "#/components/responses/ErrorResponse" + $ref: '#/components/responses/ErrorResponse' 200: description: Webhook settings retrieved successfully content: @@ -2687,30 +2381,31 @@ paths: schema: $ref: '#/components/schemas/WebhookSettings' delete: - tags: ["webhook"] + tags: + - webhook security: - - api_key: [] + - api_key: [] operationId: DeleteWebhook description: Deletes the specified webhook parameters: - - $ref: '#/components/parameters/projectOrProductUIDParam' - - $ref: '#/components/parameters/webhookUIDParam' + - $ref: '#/components/parameters/projectOrProductUIDParam' + - $ref: '#/components/parameters/webhookUIDParam' responses: default: - $ref: "#/components/responses/ErrorResponse" + $ref: '#/components/responses/ErrorResponse' 200: description: Webhook deleted successfully - /v1/products/{productUID}/ext-devices/{deviceUID}/event: post: - tags: ["external devices"] + tags: + - external devices security: - - api_key: [] + - api_key: [] operationId: CreateEventExtDevice description: Creates an event using specified webhook parameters: - - $ref: '#/components/parameters/productUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' requestBody: required: true description: Event Object @@ -2720,22 +2415,21 @@ paths: $ref: '#/components/schemas/Event' responses: default: - $ref: "#/components/responses/ErrorResponse" + $ref: '#/components/responses/ErrorResponse' 200: description: Event Created Successfully - - /v1/products/{productUID}/ext-devices/{deviceUID}/session/open: post: - tags: ["external devices"] + tags: + - external devices security: - - api_key: [] + - api_key: [] operationId: ExtDeviceSessionOpen - description: Create a Session for the specified device. | - If a session is currently open it will be closed and a new one opened. + description: Create a Session for the specified device. | If a session is currently + open it will be closed and a new one opened. parameters: - - $ref: '#/components/parameters/productUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' requestBody: required: true description: Session Object @@ -2745,20 +2439,20 @@ paths: $ref: '#/components/schemas/DeviceSession' responses: default: - $ref: "#/components/responses/ErrorResponse" + $ref: '#/components/responses/ErrorResponse' 200: description: Session Created Successfully - /v1/products/{productUID}/ext-devices/{deviceUID}/session/close: post: - tags: ["external devices"] + tags: + - external devices security: - - api_key: [] + - api_key: [] operationId: ExtDeviceSessionClose description: Closes the session for the specified device if open parameters: - - $ref: '#/components/parameters/productUIDParam' - - $ref: '#/components/parameters/deviceUIDParam' + - $ref: '#/components/parameters/productUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' requestBody: required: true description: Session Object @@ -2768,29 +2462,27 @@ paths: $ref: '#/components/schemas/DeviceSession' responses: default: - $ref: "#/components/responses/ErrorResponse" + $ref: '#/components/responses/ErrorResponse' 200: description: Session closed - - components: - securitySchemes: api_key: type: apiKey in: header name: X-Session-Token - description: | - For accessing most endpoints. + description: 'For accessing most endpoints. + To retrieve the key, see the /auth/login endpoint. + ' pin: type: apiKey in: header name: X-Auth-Token - description: | - For accessing endpoints by Device pin. + description: 'For accessing endpoints by Device pin. + ' parameters: projectOrProductUIDParam: name: projectOrProductUID @@ -2798,9 +2490,7 @@ components: required: true schema: type: string - # NOTE: Airnote's Project UID example: app:2606f411-dea6-44a0-9743-1130f57d77d8 - productUIDParam: name: productUID in: path @@ -2808,7 +2498,6 @@ components: schema: type: string example: com.blues.bridge:sensors - eventUIDParam: name: eventUID in: path @@ -2816,14 +2505,12 @@ components: schema: type: string example: 4506f411-dea6-44a0-9743-1130f57d7747 - fleetUIDParam: name: fleetUID in: path required: true schema: type: string - fleetUIDsParam: name: fleetUIDs in: query @@ -2832,7 +2519,6 @@ components: type: array items: type: string - deviceTagsParam: name: deviceTags in: query @@ -2841,7 +2527,6 @@ components: type: array items: type: string - deviceUIDParam: name: deviceUID in: path @@ -2849,7 +2534,6 @@ components: schema: type: string example: dev:000000000000000 - firmwareTypeParam: name: firmwareType in: path @@ -2857,26 +2541,23 @@ components: schema: type: string enum: - - host - - notecard - + - host + - notecard dfuActionParam: - name: action + name: action in: path required: true schema: type: string enum: - - update - - cancel - + - update + - cancel notefileIDParam: name: notefileID in: path required: true schema: type: string - routeUIDParam: name: routeUID in: path @@ -2884,14 +2565,12 @@ components: schema: type: string example: route:cbd20093cba58392c9f9bbdd0cdeb1a0 - noteIDParam: name: noteID in: path required: true schema: type: string - monitorUIDParam: name: monitorUID in: path @@ -2899,7 +2578,6 @@ components: schema: type: string example: monitor:8bAdf00d-000f-51c-af-01d5eaf00dbad - repositoryUIDParam: name: repositoryUID in: path @@ -2907,7 +2585,6 @@ components: schema: type: string example: rid:2606f411-dea6-44a0-9743-1130f57d77d8 - datasetNameParam: name: name in: path @@ -2915,31 +2592,30 @@ components: schema: type: string description: The name of the data set - datasetStartQueryParam: name: start in: query required: true schema: type: string - description: Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format. - + description: Start of the time range, as an ISO-8601 date or relative to now + (e.g. -1y). Relative dates follow the Postgres INTERVAL format. datasetEndQueryParam: name: end in: query required: false schema: type: string - description: End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used. - + description: End of the time range, as an ISO-8601 date or relative to now. + If omitted, current time is used. datasetSelectQueryParam: name: select in: query required: false schema: type: string - description: Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent). - + description: Comma separated list of fields to include. Supports aggregate functions + (avg, sum, min, max, count, most_recent). datasetWhereQueryParam: name: where in: query @@ -2947,15 +2623,14 @@ components: schema: type: string description: Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100)) - datasetAggregateWindowQueryParam: name: aggregate_window in: query required: false schema: type: string - description: Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format - + description: Aggregate results into buckets for a time duration, expressed in + Postgres INTERVAL format datasetLocationNearQueryParam: name: location_near in: query @@ -2963,16 +2638,16 @@ components: schema: type: string example: 42.393125,-71.185015 - description: Latitude and Longitude for location-based filtering, location_near_radius must also be provided - + description: Latitude and Longitude for location-based filtering, location_near_radius + must also be provided datasetLocationRadiusQueryParam: name: location_near_radius in: query required: false schema: type: integer - description: Distance from location_near in meters, location_near must also be provided - + description: Distance from location_near in meters, location_near must also + be provided datasetLimitQueryParam: name: limit in: query @@ -2980,7 +2655,6 @@ components: schema: type: integer description: Limit the number of results returned - datasetOrderByQueryParam: name: order_by in: query @@ -2988,7 +2662,6 @@ components: description: Order the results by a field schema: type: string - datasetDistinctQueryParam: name: distinct in: query @@ -2996,8 +2669,6 @@ components: schema: type: boolean description: Return only distinct results - - # querystring parameters pageSizeParam: name: pageSize in: query @@ -3007,7 +2678,6 @@ components: minimum: 1 maximum: 10000 default: 50 - pageNumParam: name: pageNum in: query @@ -3016,7 +2686,6 @@ components: type: integer minimum: 1 default: 1 - deviceUIDParamQuery: name: deviceUID description: A Device UID. @@ -3028,7 +2697,6 @@ components: type: string style: form explode: true - deviceUIDsParamQuery: name: deviceUIDs description: An array of Device UIDs. @@ -3038,7 +2706,6 @@ components: type: array items: type: string - sortByParam: name: sortBy in: query @@ -3046,17 +2713,16 @@ components: schema: type: string enum: - - best_id - - device_serial - - device_uid - - captured - - modified - - device_location - - tower_location - - triangulated_location - - best_location + - best_id + - device_serial + - device_uid + - captured + - modified + - device_location + - tower_location + - triangulated_location + - best_location default: captured - routeLogsSortByParam: name: sortBy in: query @@ -3064,11 +2730,9 @@ components: schema: type: string enum: - - date - - event + - date + - event default: date - - # same as sortOrderParam, but with a different default routeLogsSortOrderParam: name: sortOrder in: query @@ -3076,10 +2740,9 @@ components: schema: type: string enum: - - asc - - desc + - asc + - desc default: desc - sortOrderParam: name: sortOrder in: query @@ -3087,10 +2750,9 @@ components: schema: type: string enum: - - asc - - desc + - asc + - desc default: asc - startDateParam: name: startDate in: query @@ -3099,9 +2761,7 @@ components: schema: type: integer minimum: 0 - # August 10th, 2021 example: 1628631763 - endDateParam: name: endDate in: query @@ -3110,14 +2770,13 @@ components: schema: type: integer minimum: 0 - # July 15th, 2022 example: 1657894210 - dateTypeParam: name: dateType in: query required: false - description: Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters + description: Which date to filter on, either 'captured' or 'uploaded'. This + will apply to the startDate and endDate parameters schema: type: string default: captured @@ -3125,20 +2784,19 @@ components: - captured - uploaded example: uploaded - cursorParam: name: cursor in: query required: false - description: > - A cursor, which can be obtained from the `next_cursor` value from a previous call - to this endpoint. The results set returned will include this event as its first result - if the given identifier is actually the UID of an event. If this event UID is not - found, the parameter is ignored and the results set is the same as if the parameter - was not included. + description: 'A cursor, which can be obtained from the `next_cursor` value from + a previous call to this endpoint. The results set returned will include this + event as its first result if the given identifier is actually the UID of an + event. If this event UID is not found, the parameter is ignored and the results + set is the same as if the parameter was not included. + + ' schema: type: string - limitParam: name: limit in: query @@ -3147,28 +2805,24 @@ components: type: integer minimum: 1 default: 50 - systemFilesOnlyParam: name: systemFilesOnly in: query required: false schema: type: boolean - mostRecentOnlyParam: name: mostRecentOnly in: query required: false schema: type: boolean - fleetUIDQueryParam: name: fleetUID in: query required: false schema: type: string - fleetUIDsQueryParam: name: fleetUID in: query @@ -3177,7 +2831,6 @@ components: type: array items: type: string - filesQueryParam: name: files in: query @@ -3185,17 +2838,17 @@ components: schema: type: string example: _health.qo, data.qo - formatParam: name: format in: query required: false schema: type: string - enum: [json, csv] + enum: + - json + - csv default: json description: Response format (JSON or CSV) - serialNumberFilterParam: name: serialNumber in: query @@ -3207,7 +2860,6 @@ components: style: form explode: true description: Filter by Serial Number - fleetUIDFilterQueryParam: name: fleetUID in: query @@ -3219,7 +2871,6 @@ components: style: form explode: true description: Filter by Fleet UID - sessionUIDFilterParam: name: sessionUID in: query @@ -3231,7 +2882,6 @@ components: style: form explode: true description: Filter by Session UID - eventUIDFilterQueryParam: name: eventUID in: query @@ -3243,15 +2893,15 @@ components: style: form explode: true description: Filter by Event UID - selectFieldsParam: name: selectFields in: query required: false schema: type: string - description: Comma-separated list of fields to select from JSON payload (e.g., "field1,field2.subfield,field3"), this will reflect the columns in the CSV output. - + description: Comma-separated list of fields to select from JSON payload (e.g., + "field1,field2.subfield,field3"), this will reflect the columns in the CSV + output. filenameQueryParam: name: filename in: query @@ -3259,42 +2909,36 @@ components: schema: type: string example: notecard-7.2.2.16518$20240410043100.bin - md5QueryParam: name: md5 in: query required: false schema: type: string - unpublishedQueryParam: name: unpublished in: query required: false schema: type: boolean - versionQueryParam: name: version in: query required: false schema: type: string - targetQueryParam: name: target in: query required: false schema: type: string - firmwareTypeQueryParam: name: firmwareType in: query required: false schema: type: string - productUIDQueryParam: name: productUID in: query @@ -3305,14 +2949,12 @@ components: type: array items: type: string - productQueryParam: name: product in: query required: false schema: type: string - monitorUIDQueryParam: name: monitorUID in: query @@ -3321,7 +2963,6 @@ components: explode: true schema: type: string - tagParam: name: tag in: query @@ -3333,7 +2974,6 @@ components: type: array items: type: string - serialNumberParam: name: serialNumber in: query @@ -3345,7 +2985,6 @@ components: type: array items: type: string - notecardFirmwareParam: name: notecardFirmware in: query @@ -3357,7 +2996,6 @@ components: type: array items: type: string - locationParam: name: location in: query @@ -3369,7 +3007,6 @@ components: type: array items: type: string - hostFirmwareParam: name: hostFirmware in: query @@ -3381,7 +3018,6 @@ components: type: array items: type: string - skuParam: name: sku in: query @@ -3393,7 +3029,6 @@ components: type: array items: type: string - repositoryKey: name: X-Repository-Key in: header @@ -3401,7 +3036,6 @@ components: schema: type: string description: The secret key used to access this repository - webhookUIDParam: name: webhookUID in: path @@ -3410,15 +3044,13 @@ components: schema: type: string example: Abc_123-2646f411-dc56-44a0-9743-4130f47a74h8 - responses: ErrorResponse: description: The response body in case of an API error. content: application/json: schema: - $ref: "#/components/schemas/Error" - + $ref: '#/components/schemas/Error' EventsResponse: description: The response body from a GET events request. headers: @@ -3434,7 +3066,7 @@ components: events: type: array items: - $ref: "#/components/schemas/Event" + $ref: '#/components/schemas/Event' has_more: type: boolean description: True if there are more events @@ -3442,53 +3074,56 @@ components: type: string description: The UID of the last event returned required: - - events - - has_more + - events + - has_more example: events: - - event: dfa3747d-688b-4250-935b-5dd60354313c - session: b623132c-6afb-4740-bc39-e3634e38f064 - best_id: My Device - device: dev:5c0272311928 - sn: My Device - product: product:com.blues.project.demo - app: app:218f6217-9f78-432e-9fe0-02ca8b5a216c - received: 1656011227.006928 - req: note.add - when: 1656010061 - file: air.qo - updates: 1 - body: - humidity: 40.375 - pressure: 97705.66 - temperature: 24.0625 - voltage: 2.598 - best_location_type: triangulated - best_location_when: 1652709545 - best_lat: 34.82476372 - best_lon: -83.32261614 - best_location: Atlanta GA - best_country: US - best_timezone: America/New_York - tower_id: 0,0,0,0 - tri_when: 1652709545 - tri_lat: 34.82475372 - tri_lon: -83.32261614 - tri_location: Atlanta GA - tri_country: US - tri_timezone: America/New_York - tri_points: 6 + - event: dfa3747d-688b-4250-935b-5dd60354313c + session: b623132c-6afb-4740-bc39-e3634e38f064 + best_id: My Device + device: dev:5c0272311928 + sn: My Device + product: product:com.blues.project.demo + app: app:218f6217-9f78-432e-9fe0-02ca8b5a216c + received: 1656011227.006928 + req: note.add + when: 1656010061 + file: air.qo + updates: 1 + body: + humidity: 40.375 + pressure: 97705.66 + temperature: 24.0625 + voltage: 2.598 + best_location_type: triangulated + best_location_when: 1652709545 + best_lat: 34.82476372 + best_lon: -83.32261614 + best_location: Atlanta GA + best_country: US + best_timezone: America/New_York + tower_id: 0,0,0,0 + tri_when: 1652709545 + tri_lat: 34.82475372 + tri_lon: -83.32261614 + tri_location: Atlanta GA + tri_country: US + tri_timezone: America/New_York + tri_points: 6 has_more: true text/csv: schema: type: string format: binary - example: | - eventUID,deviceUID,when,best_location_type,best_lat,best_lon,body.temperature,body.humidity + example: 'eventUID,deviceUID,when,best_location_type,best_lat,best_lon,body.temperature,body.humidity + e123456-7890-abcd-ef01-234567890abc,dev:000000000000001,1625097600,gps,37.7749,-122.4194,22.5,45.2 + f234567-8901-bcde-fg12-345678901bcd,dev:000000000000002,1625097660,triangulated,40.7128,-74.0060,24.3,48.7 + g345678-9012-cdef-gh23-456789012cde,dev:000000000000003,1625097720,tower,51.5074,-0.1278,20.1,52.9 + ' EventsByCursorResponse: description: The response body from a GET events by cursor request. content: @@ -3499,64 +3134,64 @@ components: events: type: array items: - $ref: "#/components/schemas/Event" + $ref: '#/components/schemas/Event' next_cursor: type: string - description: > - The cursor value of the next result, which is intended to be used as the "cursor" - parameter value of the next call to this method. An empty string is returned if - there are no more results after this results set. + description: 'The cursor value of the next result, which is intended + to be used as the "cursor" parameter value of the next call to this + method. An empty string is returned if there are no more results + after this results set. + + ' has_more: type: boolean description: True if there are more events required: - - events - - next_cursor - - has_more + - events + - next_cursor + - has_more example: events: - - event: dfa3747d-688b-4250-935b-5dd60354313c - session: b623132c-6afb-4740-bc39-e3634e38f064 - best_id: My Device - device: dev:5c0272311928 - sn: My Device - product: product:com.blues.project.demo - app: app:218f6217-9f78-432e-9fe0-02ca8b5a216c - received: 1656011227.006928 - req: note.add - when: 1656010061 - file: air.qo - updates: 1 - body: - humidity: 40.375 - pressure: 97705.66 - temperature: 24.0625 - voltage: 2.598 - best_location_type: triangulated - best_location_when: 1652709545 - best_lat: 34.82476372 - best_lon: -83.32261614 - best_location: Atlanta GA - best_country: US - best_timezone: America/New_York - tower_id: 0,0,0,0 - tri_when: 1652709545 - tri_lat: 34.82475372 - tri_lon: -83.32261614 - tri_location: Atlanta GA - tri_country: US - tri_timezone: America/New_York - tri_points: 6 - next_cursor: "" + - event: dfa3747d-688b-4250-935b-5dd60354313c + session: b623132c-6afb-4740-bc39-e3634e38f064 + best_id: My Device + device: dev:5c0272311928 + sn: My Device + product: product:com.blues.project.demo + app: app:218f6217-9f78-432e-9fe0-02ca8b5a216c + received: 1656011227.006928 + req: note.add + when: 1656010061 + file: air.qo + updates: 1 + body: + humidity: 40.375 + pressure: 97705.66 + temperature: 24.0625 + voltage: 2.598 + best_location_type: triangulated + best_location_when: 1652709545 + best_lat: 34.82476372 + best_lon: -83.32261614 + best_location: Atlanta GA + best_country: US + best_timezone: America/New_York + tower_id: 0,0,0,0 + tri_when: 1652709545 + tri_lat: 34.82475372 + tri_lon: -83.32261614 + tri_location: Atlanta GA + tri_country: US + tri_timezone: America/New_York + tri_points: 6 + next_cursor: '' has_more: false - EnvironmentVariablesResponse: description: The response body from an environment variables request. content: application/json: schema: - $ref: "#/components/schemas/EnvironmentVariables" - + $ref: '#/components/schemas/EnvironmentVariables' GetDeviceEnvironmentVariablesResponse: description: The response body from a get device environment variables request. content: @@ -3566,30 +3201,26 @@ components: properties: environment_variables: type: object - description: The environment variables for this device that have been set using host firmware or the Notehub API or UI. - # string to string dictionary - # https://swagger.io/docs/specification/data-models/dictionaries/ + description: The environment variables for this device that have been + set using host firmware or the Notehub API or UI. additionalProperties: type: string environment_variables_env_default: type: object - description: The environment variables that have been set using the env.default request through the Notecard API. - # string to string dictionary - # https://swagger.io/docs/specification/data-models/dictionaries/ + description: The environment variables that have been set using the + env.default request through the Notecard API. additionalProperties: type: string environment_variables_effective: type: object - description: The environment variables as they will be seen by the device, - fully resolved with project/fleet/device prioritization rules. - # string to string dictionary - # https://swagger.io/docs/specification/data-models/dictionaries/ + description: The environment variables as they will be seen by the + device, fully resolved with project/fleet/device prioritization + rules. additionalProperties: type: string required: - - environment_variables - - environment_variables_env_default - + - environment_variables + - environment_variables_env_default FleetsResponse: description: The response body from a fleets endpoint. content: @@ -3600,10 +3231,9 @@ components: fleets: type: array items: - $ref: "#/components/schemas/Fleet" + $ref: '#/components/schemas/Fleet' required: - - fleets - + - fleets DevicesResponse: description: List of Devices content: @@ -3614,13 +3244,12 @@ components: devices: type: array items: - $ref: "#/components/schemas/Device" + $ref: '#/components/schemas/Device' has_more: type: boolean required: - - devices - - has_more - + - devices + - has_more NoteResponse: description: The response body from a note endpoint. content: @@ -3634,7 +3263,6 @@ components: template: type: boolean description: true when a template is active on the Notefile. - SessionResponse: description: The response body for a session request. content: @@ -3645,68 +3273,67 @@ components: sessions: type: array items: - $ref: "#/components/schemas/DeviceSession" + $ref: '#/components/schemas/DeviceSession' has_more: type: boolean required: - - sessions - - has_more + - sessions + - has_more example: sessions: - - session: d76689be-37cd-423c-b695-7e0c19a2a264 - device: dev:000000000000000 - product: product:com.blues.demo:project - fleets: - - fleet:46be9834-5te6-42c1-0000-b5ea05e248d7 - cell: 310,410,17169,77315594 - rssi: -61 - sinr: 183 - rsrp: -91 - rsrq: -13 - bars: 2 - rat: lte - bearer: LTE FDD - ip: 10.68.56.193 - iccid: "89011704278500000000" - apn: a-notehub.com.attz - tower: - time: 1667250835 - "n": Shorewood Hills WI - c: US - lat: 43.0742625 - lon: -89.44239062499999 - zone: America/Chicago - mcc: 310 - mnc: 410 - lac: 17169 - cid: 77315594 - l: 86MG3HF5+P25 - count: 7 - towers: 1 - tri: {} - when: 1667251044 - voltage: 4.174 - temp: 24.437 - continuous: true - tls: true - work: 1667251046 - events: 14 - moved: 1667250807 - orientation: face-up - trigger: first sync; continuous connection mode - hp_secs_total: 7659 - hp_secs_data: 7659 - hp_cycles_total: 3 - hp_cycles_data: 3 - period: - since: 1667250832 - duration: 215 - bytes_rcvd: 2501 - bytes_sent: 4138 - sessions_tls: 1 - notes_sent: 12 + - session: d76689be-37cd-423c-b695-7e0c19a2a264 + device: dev:000000000000000 + product: product:com.blues.demo:project + fleets: + - fleet:46be9834-5te6-42c1-0000-b5ea05e248d7 + cell: 310,410,17169,77315594 + rssi: -61 + sinr: 183 + rsrp: -91 + rsrq: -13 + bars: 2 + rat: lte + bearer: LTE FDD + ip: 10.68.56.193 + iccid: '89011704278500000000' + apn: a-notehub.com.attz + tower: + time: 1667250835 + n: Shorewood Hills WI + c: US + lat: 43.0742625 + lon: -89.44239062499999 + zone: America/Chicago + mcc: 310 + mnc: 410 + lac: 17169 + cid: 77315594 + l: 86MG3HF5+P25 + count: 7 + towers: 1 + tri: {} + when: 1667251044 + voltage: 4.174 + temp: 24.437 + continuous: true + tls: true + work: 1667251046 + events: 14 + moved: 1667250807 + orientation: face-up + trigger: first sync; continuous connection mode + hp_secs_total: 7659 + hp_secs_data: 7659 + hp_cycles_total: 3 + hp_cycles_data: 3 + period: + since: 1667250832 + duration: 215 + bytes_rcvd: 2501 + bytes_sent: 4138 + sessions_tls: 1 + notes_sent: 12 has_more: true - LatestResponse: description: The response body for a Latest Events request. content: @@ -3716,71 +3343,71 @@ components: properties: latest_events: type: array - description: The set of latest events. Will always include the current "session.begin" event. + description: The set of latest events. Will always include the current + "session.begin" event. items: - $ref: "#/components/schemas/Event" + $ref: '#/components/schemas/Event' example: latest_events: - - event: 81bd2bf1-0399-4978-bc46-8f779b4af350 - session: ed18884b-f2a6-419f-b856-d28dc8f0892b - tls: true - device: dev:864475040523995 - product: product:com.blues.app:myapp - app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 - received: 1669667707.564694 - req: session.begin - when: 1669667707 - file: _session.qo - body: - why: sensors.qo requested sync (sensors.qo) (TLS) - tower_when: 1669667691 - tower_lat: 43.769062500000004 - tower_lon: -83.657359375 - tower_country: US - tower_location: Waverly MI - tower_timezone: America/Detroit - tower_id: 310,410,20483,184692495 - - event: 916d4c81-06ae-4263-9b55-7a3a0f73cb5a - session: 28cdc39f-9f62-4789-b0a3-2f35f9448ced - device: dev:864475040523995 - sn: tj-1 - product: product:com.blues.app:myapp - app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 - received: 1669667713.221659 - req: note.add - when: 1669667689 - file: data.qo - body: - humid: 56.23 - temp: 35.5 - tower_when: 1669667677 - tower_lat: 43.769062500000004 - tower_lon: -83.657359375 - tower_country: US - tower_location: Waverly MI - tower_timezone: America/Detroit - tower_id: 310,410,20483,184692495 - - event: e98c2c3b-edbe-4fe7-af57-2196cc843eb7 - session: 7211392c-6895-43f8-9256-790655348be5 - device: dev:864475040523995 - product: product:com.blues.app:myapp - app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 - received: 1669667711.85316 - req: note.add - when: 1669667695 - file: sensors.qo - body: - humidity: 69.88647200683693 - pressure: 993.6294496104914 - temp: 21.273027181770885 - tower_when: 1669667689 - tower_lat: 43.747037500000005 - tower_lon: -83.665859375 - tower_country: US - tower_location: Waverly MI - tower_timezone: America/Detroit - tower_id: 310,410,20483,184692496 - + - event: 81bd2bf1-0399-4978-bc46-8f779b4af350 + session: ed18884b-f2a6-419f-b856-d28dc8f0892b + tls: true + device: dev:864475040523995 + product: product:com.blues.app:myapp + app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 + received: 1669667707.564694 + req: session.begin + when: 1669667707 + file: _session.qo + body: + why: sensors.qo requested sync (sensors.qo) (TLS) + tower_when: 1669667691 + tower_lat: 43.769062500000004 + tower_lon: -83.657359375 + tower_country: US + tower_location: Waverly MI + tower_timezone: America/Detroit + tower_id: 310,410,20483,184692495 + - event: 916d4c81-06ae-4263-9b55-7a3a0f73cb5a + session: 28cdc39f-9f62-4789-b0a3-2f35f9448ced + device: dev:864475040523995 + sn: tj-1 + product: product:com.blues.app:myapp + app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 + received: 1669667713.221659 + req: note.add + when: 1669667689 + file: data.qo + body: + humid: 56.23 + temp: 35.5 + tower_when: 1669667677 + tower_lat: 43.769062500000004 + tower_lon: -83.657359375 + tower_country: US + tower_location: Waverly MI + tower_timezone: America/Detroit + tower_id: 310,410,20483,184692495 + - event: e98c2c3b-edbe-4fe7-af57-2196cc843eb7 + session: 7211392c-6895-43f8-9256-790655348be5 + device: dev:864475040523995 + product: product:com.blues.app:myapp + app: app:2e49f10a-76a9-4e2d-8b18-cef0b8b46446 + received: 1669667711.85316 + req: note.add + when: 1669667695 + file: sensors.qo + body: + humidity: 69.88647200683693 + pressure: 993.6294496104914 + temp: 21.273027181770885 + tower_when: 1669667689 + tower_lat: 43.747037500000005 + tower_lon: -83.665859375 + tower_country: US + tower_location: Waverly MI + tower_timezone: America/Detroit + tower_id: 310,410,20483,184692496 MonitorsResponse: description: The response body from GET /monitors content: @@ -3788,10 +3415,9 @@ components: schema: type: array items: - $ref: "#/components/schemas/Monitor" + $ref: '#/components/schemas/Monitor' required: - - monitors - + - monitors AlertsResponse: description: The response body from GET /alerts content: @@ -3802,15 +3428,14 @@ components: alerts: type: array items: - $ref: "#/components/schemas/Alert" + $ref: '#/components/schemas/Alert' description: The list of alerts has_more: type: boolean description: True if there are more alerts required: - - alerts - - has_more - + - alerts + - has_more schemas: Error: type: object @@ -3833,13 +3458,162 @@ components: debug: type: string required: - - err - - code - - status - + - err + - code + - status + PersonalAccessToken: + type: object + properties: + uid: + type: string + description: Unique and public identifier + name: + type: string + description: Name for this API Key + description: + type: string + description: Optional description for this API Key + created_by: + type: object + description: The user that created this key + properties: + uid: + type: string + email: + type: string + name: + type: string + expires_at: + type: string + format: date-time + nullable: true + description: When the key expires + created_at: + type: string + format: date-time + description: When the key was created + last_used: + type: string + format: date-time + nullable: true + description: When it was last used, if ever + suspended: + type: boolean + description: if true, this token cannot be used + PersonalAccessTokenSecret: + type: object + properties: + uid: + type: string + description: Unique and public identifier + secret: + type: string + description: The secret + PersonalAccessTokenInfo: + type: object + required: + - expiresAt + properties: + name: + type: string + description: + type: string + expires_at: + type: string + format: date-time + nullable: true + description: New expiration timestamp for the personal access token + suspended: + type: boolean + description: if true, the token is temporarily suspended + AnalyticsEventsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/AnalyticsEventsData' + required: + - data + AnalyticsEventsData: + type: object + properties: + period: + type: string + format: date-time + example: '2025-07-23T00:00:00Z' + events: + type: integer + example: 42 + platform_events: + type: integer + example: 15 + required: + - period + - events + - platform_events + AnalyticsRouteLogsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/AnalyticsRouteLogsData' + required: + - data + AnalyticsRouteLogsData: + type: object + properties: + period: + type: string + format: date-time + example: '2025-07-23T00:00:00Z' + successful_routes: + type: integer + example: 38 + failed_routes: + type: integer + example: 4 + total_routes: + type: integer + example: 42 + required: + - period + - successful_routes + - failed_routes + - total_routes + AnalyticsSessionsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/AnalyticsSessionsData' + required: + - data + AnalyticsSessionsData: + type: object + properties: + period: + type: string + format: date-time + example: '2025-07-23T00:00:00Z' + sessions: + type: integer + example: 12 + unique_devices: + type: integer + example: 8 + total_bytes: + type: integer + example: 1048576 + required: + - period + - sessions + - unique_devices + - total_bytes JSONata: type: object - BillingAccount: type: object properties: @@ -3848,30 +3622,26 @@ components: name: type: string role: - $ref: "#/components/schemas/BillingAccountRole" + $ref: '#/components/schemas/BillingAccountRole' required: - - uid - - name - - role - + - uid + - name + - role BillingAccountRole: type: string enum: - - billing_admin - - billing_manager - - project_creator - + - billing_admin + - billing_manager + - project_creator Role: type: string - # For viewing a project in which the viewer does not have access. nullable: true enum: - - owner - - developer - - viewer - - support - - null - + - owner + - developer + - viewer + - support + - null Project: type: object properties: @@ -3883,16 +3653,15 @@ components: type: string format: date-time role: - $ref: "#/components/schemas/Role" + $ref: '#/components/schemas/Role' administrative_contact: - $ref: "#/components/schemas/Contact" + $ref: '#/components/schemas/Contact' technical_contact: - $ref: "#/components/schemas/Contact" + $ref: '#/components/schemas/Contact' required: - - uid - - label - - created - + - uid + - label + - created ProjectMember: type: object properties: @@ -3900,16 +3669,18 @@ components: type: string email: type: string - description: | - The email address of the project member. - This property will only be populated if the viewer is an owner of the project. + description: 'The email address of the project member. + + This property will only be populated if the viewer is an owner of the + project. + + ' role: - $ref: "#/components/schemas/Role" + $ref: '#/components/schemas/Role' required: - - name - - email - - role - + - name + - email + - role Contact: type: object nullable: true @@ -3922,7 +3693,6 @@ components: type: string organization: type: string - Product: type: object properties: @@ -3938,14 +3708,15 @@ components: disable_devices_by_default: type: boolean required: - - uid - - label - - disable_devices_by_default - + - uid + - label + - disable_devices_by_default FleetRule: type: string - description: JSONata expression that will be evaluated to determine device membership into this fleet, if the expression evaluates to a 1, the device will be included, if it evaluates to -1 it will be removed, and if it evaluates to 0 or errors it will be left unchanged. - + description: JSONata expression that will be evaluated to determine device membership + into this fleet, if the expression evaluates to a 1, the device will be included, + if it evaluates to -1 it will be removed, and if it evaluates to 0 or errors + it will be left unchanged. Fleet: type: object properties: @@ -3966,24 +3737,25 @@ components: additionalProperties: type: string smart_rule: - $ref: "#/components/schemas/FleetRule" + $ref: '#/components/schemas/FleetRule' watchdog_mins: type: integer format: int64 - description: A watchdog timer is used to generate an event every N minutes of inactivity. 0 means no watchdog - + description: A watchdog timer is used to generate an event every N minutes + of inactivity. 0 means no watchdog required: - - uid - - label - - created - + - uid + - label + - created DFUState: type: object nullable: true properties: type: type: string - enum: ["card", "user"] + enum: + - card + - user file: type: string description: Firmware filename @@ -3999,25 +3771,32 @@ components: mode: type: string enum: - [ - "idle", - "error", - "downloading", - "sideloading", - "ready", - "ready-retry", - "updating", - "completed", - ] - description: | - * "idle" - nothing downloading or downloaded + - idle + - error + - downloading + - sideloading + - ready + - ready-retry + - updating + - completed + description: '* "idle" - nothing downloading or downloaded + * "error" - halted and in the error state + * "downloading" - transferring data from cloud to module + * "sideloading" - transferring data via request to module - * "ready" - DFU data is ready/verified and waiting on external storage + + * "ready" - DFU data is ready/verified and waiting on external + storage + * "ready-retry" - DFU data is ready/verified and retrying + * "updating" - currently updating + * "completed" - DFU is done successfully + + ' status: type: string description: Status message @@ -4038,17 +3817,16 @@ components: description: Last updated timestamp version: type: string - description: Last known version, which is generally a JSON object contained within the firmware image - + description: Last known version, which is generally a JSON object contained + within the firmware image DFUEnv: type: object nullable: true properties: card: - $ref: "#/components/schemas/DFUState" + $ref: '#/components/schemas/DFUState' user: - $ref: "#/components/schemas/DFUState" - + $ref: '#/components/schemas/DFUState' Device: type: object properties: @@ -4064,7 +3842,7 @@ components: format: date-time nullable: true contact: - $ref: "#/components/schemas/Contact" + $ref: '#/components/schemas/Contact' product_uid: type: string fleet_uids: @@ -4084,11 +3862,11 @@ components: cell_id: type: integer tower_location: - $ref: "#/components/schemas/Location" + $ref: '#/components/schemas/Location' gps_location: - $ref: "#/components/schemas/Location" + $ref: '#/components/schemas/Location' triangulated_location: - $ref: "#/components/schemas/Location" + $ref: '#/components/schemas/Location' voltage: type: number format: double @@ -4096,7 +3874,7 @@ components: type: number format: double dfu: - $ref: "#/components/schemas/DFUEnv" + $ref: '#/components/schemas/DFUEnv' firmware_host: type: string firmware_notecard: @@ -4106,15 +3884,14 @@ components: disabled: type: boolean cellular_usage: - $ref: "#/components/schemas/CellularUsage" + $ref: '#/components/schemas/CellularUsage' required: - - uid - - provisioned - - product_uid - - fleet_uids - - voltage - - temperature - + - uid + - provisioned + - product_uid + - fleet_uids + - voltage + - temperature Event: type: object properties: @@ -4126,13 +3903,16 @@ components: description: Session UID (globally unique) tls: type: boolean - description: Whether TLS was used on the connection between the device and notehub. Only available on _session.qo events. + description: Whether TLS was used on the connection between the device and + notehub. Only available on _session.qo events. transport: type: string - description: The transport used for this event, e.g., "cellular", "wifi", ", etc. + description: The transport used for this event, e.g., "cellular", "wifi", + ", etc. best_id: type: string - description: The device serial number, or the DeviceUID if the serial number is not set + description: The device serial number, or the DeviceUID if the serial number + is not set device: type: string description: Device UID (globally unique) @@ -4263,13 +4043,17 @@ components: description: Triangulation points moved: type: number - description: The number of times the device was sensed to have moved between the last session and this session. Only available on _session.qo events. + description: The number of times the device was sensed to have moved between + the last session and this session. Only available on _session.qo events. orientation: type: string - description: The orientation of the device. Only available on _session.qo events. + description: The orientation of the device. Only available on _session.qo + events. rssi: type: number - description: Received Signal Strength Indicator (RSSI) is an estimated measurement of how well a device can receive signals. Only available on _session.qo events. + description: Received Signal Strength Indicator (RSSI) is an estimated measurement + of how well a device can receive signals. Only available on _session.qo + events. sinr: type: number description: SINR. Only available on _session.qo events. @@ -4295,7 +4079,8 @@ components: description: Device temperature. Only available on _session.qo events. environment: type: object - description: Routed environment variables beginning with "$". Only available on _session.qo events. + description: Routed environment variables beginning with "$". Only available + on _session.qo events. sku: type: string description: SKU. Only available on _session.qo events. @@ -4308,7 +4093,6 @@ components: bssid: type: string description: BSSID. Only available on _session.qo events. - Location: type: object nullable: true @@ -4328,13 +4112,12 @@ components: type: number format: double required: - - when - - name - - country - - timezone - - latitude - - longitude - + - when + - name + - country + - timezone + - latitude + - longitude TowerLocation: type: object properties: @@ -4383,8 +4166,6 @@ components: towers: type: integer description: Number of triangulation points - - DeviceSession: type: object properties: @@ -4460,12 +4241,13 @@ components: type: string description: Type of network transport tower: - $ref: "#/components/schemas/TowerLocation" + $ref: '#/components/schemas/TowerLocation' tri: - $ref: "#/components/schemas/TowerLocation" + $ref: '#/components/schemas/TowerLocation' when: type: integer - description: Last known capture time of a note routed through this session in Unix timestamp + description: Last known capture time of a note routed through this session + in Unix timestamp format: int64 where_when: type: integer @@ -4533,7 +4315,7 @@ components: type: integer format: int64 period: - $ref: "#/components/schemas/DeviceUsage" + $ref: '#/components/schemas/DeviceUsage' power_charging: type: boolean power_usb: @@ -4551,8 +4333,6 @@ components: type: integer format: int64 description: Number of failed connection attempts in the prior session - - DeviceUsage: type: object properties: @@ -4588,7 +4368,6 @@ components: notes_sent: type: integer format: int64 - NotehubRoute: type: object properties: @@ -4600,31 +4379,29 @@ components: description: Route Label route_type: type: string - default: "http" + default: http description: Type of route. enum: - [ - "http", - "proxy", - "google-function", - "mqtt", - "aws-lambda", - "aws-lambda-with-access-key", - "aws-sqs", - "aws-sqs-with-access-key", - "aws-sqs-fifo", - "aws-sqs-fifo-with-access-key", - "aws-iot-analytics", - "radnote-radresp-fixed-survey", - "radnote-radresp-mobile-survey", - "azure-function", - "azure-function-with-key", - "azure-service-bus-with-sas-token", - "thingworx", - "snowflake", - "slack-bearer", - "slack-webhook", - ] + - http + - proxy + - google-function + - mqtt + - aws-lambda + - aws-lambda-with-access-key + - aws-sqs + - aws-sqs-with-access-key + - aws-sqs-fifo + - aws-sqs-fifo-with-access-key + - aws-iot-analytics + - radnote-radresp-fixed-survey + - radnote-radresp-mobile-survey + - azure-function + - azure-function-with-key + - azure-service-bus-with-sas-token + - thingworx + - snowflake + - slack-bearer + - slack-webhook modified: type: string description: Last Modified @@ -4634,36 +4411,34 @@ components: description: Is route disabled? schema: oneOf: - - $ref: "#/components/schemas/http" - - $ref: "#/components/schemas/google" - - $ref: "#/components/schemas/proxy" - - $ref: "#/components/schemas/mqtt" - - $ref: "#/components/schemas/aws" - - $ref: "#/components/schemas/radresponder" - - $ref: "#/components/schemas/azure" - - $ref: "#/components/schemas/thingworx" - - $ref: "#/components/schemas/snowflake" - - $ref: "#/components/schemas/slack" - + - $ref: '#/components/schemas/http' + - $ref: '#/components/schemas/google' + - $ref: '#/components/schemas/proxy' + - $ref: '#/components/schemas/mqtt' + - $ref: '#/components/schemas/aws' + - $ref: '#/components/schemas/radresponder' + - $ref: '#/components/schemas/azure' + - $ref: '#/components/schemas/thingworx' + - $ref: '#/components/schemas/snowflake' + - $ref: '#/components/schemas/slack' UserDbRoute: type: object properties: uid: type: string - default: "route:8d65a087d5d290ce5bdf03aeff2becc0" + default: route:8d65a087d5d290ce5bdf03aeff2becc0 label: type: string default: success route type: type: string - default: "http" + default: http modified: type: string - default: "2020-03-09T17:58:37Z" + default: '2020-03-09T17:58:37Z' disabled: type: boolean default: false - http: description: Route settings specific to HTTP routes. type: object @@ -4673,14 +4448,18 @@ components: items: type: string minItems: 0 - description: list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets + description: list of Fleet UIDs to apply route to, if any. If empty, applies + to all Fleets filter: type: object properties: type: type: string description: What notefiles this route applies to. - enum: ["all", "include", "exclude"] + enum: + - all + - include + - exclude system_notefiles: type: boolean description: Whether system notefiles should be affected by this route @@ -4688,7 +4467,8 @@ components: type: array items: type: string - description: list of notefiles to filter. For instance, if 'type' is set to "include", will only affect files listed here + description: list of notefiles to filter. For instance, if 'type' + is set to "include", will only affect files listed here minItems: 0 description: Route filtering settings transform: @@ -4696,17 +4476,17 @@ components: properties: format: type: string - description: Data transformation to apply. Options of "" for none, "bridge" for Azure IoT, "jsonata" for JSONata expression, or "flatten", "simple", "body" or "payload" + description: Data transformation to apply. Options of "" for none, + "bridge" for Azure IoT, "jsonata" for JSONata expression, or "flatten", + "simple", "body" or "payload" enum: - [ - "", - "bridge", - "jsonata", - "flatten", - "simple", - "body", - "payload", - ] + - '' + - bridge + - jsonata + - flatten + - simple + - body + - payload jsonata: type: string description: JSONata transformation, if JSONata @@ -4730,7 +4510,6 @@ components: type: integer default: 15 description: Timeout in seconds for each request - google: description: Route settings specific to Google routes. type: object @@ -4740,14 +4519,18 @@ components: items: type: string minItems: 0 - description: list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets + description: list of Fleet UIDs to apply route to, if any. If empty, applies + to all Fleets filter: type: object properties: type: type: string description: What notefiles this route applies to. - enum: ["all", "include", "exclude"] + enum: + - all + - include + - exclude system_notefiles: type: boolean description: Whether system notefiles should be affected by this route @@ -4755,7 +4538,8 @@ components: type: array items: type: string - description: list of notefiles to filter. For instance, if 'type' is set to "include", will only affect files listed here + description: list of notefiles to filter. For instance, if 'type' + is set to "include", will only affect files listed here minItems: 0 description: Route filtering settings transform: @@ -4763,17 +4547,17 @@ components: properties: format: type: string - description: Data transformation to apply. Options of "" for none, "bridge" for Azure IoT, "jsonata" for JSONata expression, or "flatten", "simple", "body" or "payload" + description: Data transformation to apply. Options of "" for none, + "bridge" for Azure IoT, "jsonata" for JSONata expression, or "flatten", + "simple", "body" or "payload" enum: - [ - "", - "bridge", - "jsonata", - "flatten", - "simple", - "body", - "payload", - ] + - '' + - bridge + - jsonata + - flatten + - simple + - body + - payload jsonata: type: string description: JSONata transformation, if JSONata @@ -4788,7 +4572,6 @@ components: token: description: Optional authentication token type: string - proxy: description: Route settings specific to Proxy routes. type: object @@ -4798,7 +4581,8 @@ components: items: type: string minItems: 0 - description: list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets + description: list of Fleet UIDs to apply route to, if any. If empty, applies + to all Fleets url: type: string alias: @@ -4814,7 +4598,6 @@ components: type: integer default: 15 description: Timeout in seconds for each request - aws: description: Route settings specific to AWS routes. type: object @@ -4824,14 +4607,18 @@ components: items: type: string minItems: 0 - description: list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets + description: list of Fleet UIDs to apply route to, if any. If empty, applies + to all Fleets filter: type: object properties: type: type: string description: What notefiles this route applies to. - enum: ["all", "include", "exclude"] + enum: + - all + - include + - exclude system_notefiles: type: boolean description: Whether system notefiles should be affected by this route @@ -4839,7 +4626,8 @@ components: type: array items: type: string - description: list of notefiles to filter. For instance, if 'type' is set to "include", will only affect files listed here + description: list of notefiles to filter. For instance, if 'type' + is set to "include", will only affect files listed here minItems: 0 description: Route filtering settings transform: @@ -4847,17 +4635,17 @@ components: properties: format: type: string - description: Data transformation to apply. Options of "" for none, "bridge" for Azure IoT, "jsonata" for JSONata expression, or "flatten", "simple", "body" or "payload" + description: Data transformation to apply. Options of "" for none, + "bridge" for Azure IoT, "jsonata" for JSONata expression, or "flatten", + "simple", "body" or "payload" enum: - [ - "", - "bridge", - "jsonata", - "flatten", - "simple", - "body", - "payload", - ] + - '' + - bridge + - jsonata + - flatten + - simple + - body + - payload jsonata: type: string description: JSONata transformation, if JSONata @@ -4885,16 +4673,17 @@ components: type: string access_key_secret: type: string - description: This value is input-only and will be omitted from the response and replaced with a placeholder + description: This value is input-only and will be omitted from the response + and replaced with a placeholder message_group_id: type: string message_deduplication_id: type: string channel: type: string - azure: - description: Route settings specific to Azure routes. Only used for Azure route types + description: Route settings specific to Azure routes. Only used for Azure route + types type: object properties: fleets: @@ -4902,14 +4691,18 @@ components: items: type: string minItems: 0 - description: list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets + description: list of Fleet UIDs to apply route to, if any. If empty, applies + to all Fleets filter: type: object properties: type: type: string description: What notefiles this route applies to. - enum: ["all", "include", "exclude"] + enum: + - all + - include + - exclude system_notefiles: type: boolean description: Whether system notefiles should be affected by this route @@ -4917,7 +4710,8 @@ components: type: array items: type: string - description: list of notefiles to filter. For instance, if 'type' is set to "include", will only affect files listed here + description: list of notefiles to filter. For instance, if 'type' + is set to "include", will only affect files listed here minItems: 0 description: Route filtering settings transform: @@ -4925,17 +4719,17 @@ components: properties: format: type: string - description: Data transformation to apply. Options of "" for none, "bridge" for Azure IoT, "jsonata" for JSONata expression, or "flatten", "simple", "body" or "payload" + description: Data transformation to apply. Options of "" for none, + "bridge" for Azure IoT, "jsonata" for JSONata expression, or "flatten", + "simple", "body" or "payload" enum: - [ - "", - "bridge", - "jsonata", - "flatten", - "simple", - "body", - "payload", - ] + - '' + - bridge + - jsonata + - flatten + - simple + - body + - payload jsonata: type: string description: JSONata transformation, if JSONata @@ -4949,15 +4743,17 @@ components: description: Timeout in seconds for each request functions_key_secret: type: string - description: This value is input-only and will be omitted from the response and replaced with a placeholder + description: This value is input-only and will be omitted from the response + and replaced with a placeholder sas_policy_name: type: string sas_policy_key: type: string - description: This value is input-only and will be omitted from the response and replaced with a placeholder - + description: This value is input-only and will be omitted from the response + and replaced with a placeholder thingworx: - description: Route settings specific to ThingWorx routes. Only used for ThingWorx route types + description: Route settings specific to ThingWorx routes. Only used for ThingWorx + route types type: object properties: fleets: @@ -4965,14 +4761,18 @@ components: items: type: string minItems: 0 - description: list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets + description: list of Fleet UIDs to apply route to, if any. If empty, applies + to all Fleets filter: type: object properties: type: type: string description: What notefiles this route applies to. - enum: ["all", "include", "exclude"] + enum: + - all + - include + - exclude system_notefiles: type: boolean description: Whether system notefiles should be affected by this route @@ -4980,7 +4780,8 @@ components: type: array items: type: string - description: list of notefiles to filter. For instance, if 'type' is set to "include", will only affect files listed here + description: list of notefiles to filter. For instance, if 'type' + is set to "include", will only affect files listed here minItems: 0 description: Route filtering settings transform: @@ -4988,17 +4789,17 @@ components: properties: format: type: string - description: Data transformation to apply. Options of "" for none, "bridge" for Azure IoT, "jsonata" for JSONata expression, or "flatten", "simple", "body" or "payload" + description: Data transformation to apply. Options of "" for none, + "bridge" for Azure IoT, "jsonata" for JSONata expression, or "flatten", + "simple", "body" or "payload" enum: - [ - "", - "bridge", - "jsonata", - "flatten", - "simple", - "body", - "payload", - ] + - '' + - bridge + - jsonata + - flatten + - simple + - body + - payload jsonata: type: string description: JSONata transformation, if JSONata @@ -5012,10 +4813,11 @@ components: description: Timeout in seconds for each request app_key: type: string - description: This value is input-only and will be omitted from the response and replaced with a placeholder - + description: This value is input-only and will be omitted from the response + and replaced with a placeholder mqtt: - description: Route settings specific to MQTT routes. Only used for MQTT route types + description: Route settings specific to MQTT routes. Only used for MQTT route + types type: object properties: fleets: @@ -5023,14 +4825,18 @@ components: items: type: string minItems: 0 - description: list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets + description: list of Fleet UIDs to apply route to, if any. If empty, applies + to all Fleets filter: type: object properties: type: type: string description: What notefiles this route applies to. - enum: ["all", "include", "exclude"] + enum: + - all + - include + - exclude system_notefiles: type: boolean description: Whether system notefiles should be affected by this route @@ -5038,7 +4844,8 @@ components: type: array items: type: string - description: list of notefiles to filter. For instance, if 'type' is set to "include", will only affect files listed here + description: list of notefiles to filter. For instance, if 'type' + is set to "include", will only affect files listed here minItems: 0 description: Route filtering settings transform: @@ -5046,17 +4853,17 @@ components: properties: format: type: string - description: Data transformation to apply. Options of "" for none, "bridge" for Azure IoT, "jsonata" for JSONata expression, or "flatten", "simple", "body" or "payload" + description: Data transformation to apply. Options of "" for none, + "bridge" for Azure IoT, "jsonata" for JSONata expression, or "flatten", + "simple", "body" or "payload" enum: - [ - "", - "bridge", - "jsonata", - "flatten", - "simple", - "body", - "payload", - ] + - '' + - bridge + - jsonata + - flatten + - simple + - body + - payload jsonata: type: string description: JSONata transformation, if JSONata @@ -5074,26 +4881,30 @@ components: type: string password: type: string - description: This value is input-only and will be omitted from the response and replaced with a placeholder + description: This value is input-only and will be omitted from the response + and replaced with a placeholder topic: type: string certificate: type: string - description: Certificate with \n newlines. This value is input-only and will be omitted from the response and replaced with a placeholder - example: -----BEGIN CERTIFICATE-----\nMIIBpTCCA...JgVLttUY=\n-----END CERTIFICATE----- + description: Certificate with \n newlines. This value is input-only and + will be omitted from the response and replaced with a placeholder + example: '-----BEGIN CERTIFICATE-----\nMIIBpTCCA...JgVLttUY=\n-----END CERTIFICATE-----' certificate_name: type: string description: Name of certificate. key: type: string - description: Key with \n newlines. This value is input-only and will be omitted from the response and replaced with a placeholder - example: -----BEGIN PRIVATE KEY-----\nMIIEvwIBA...SleBlvA==\n-----END PRIVATE KEY----- + description: Key with \n newlines. This value is input-only and will be + omitted from the response and replaced with a placeholder + example: '-----BEGIN PRIVATE KEY-----\nMIIEvwIBA...SleBlvA==\n-----END PRIVATE + KEY-----' private_key_name: type: string description: Name of key - radresponder: - description: Route settings specific to RadResponder routes. Only used for RadResponder route types + description: Route settings specific to RadResponder routes. Only used for + RadResponder route types type: object properties: fleets: @@ -5101,7 +4912,8 @@ components: items: type: string minItems: 0 - description: list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets + description: list of Fleet UIDs to apply route to, if any. If empty, applies + to all Fleets test_api: type: boolean default: false @@ -5111,10 +4923,11 @@ components: type: string client_secret: type: string - description: This value is input-only and will be omitted from the response and replaced with a placeholder - + description: This value is input-only and will be omitted from the response + and replaced with a placeholder snowflake: - description: Route settings specific to Snowflake routes. Only used for Snowflake route types + description: Route settings specific to Snowflake routes. Only used for Snowflake + route types type: object properties: fleets: @@ -5122,14 +4935,18 @@ components: items: type: string minItems: 0 - description: list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets + description: list of Fleet UIDs to apply route to, if any. If empty, applies + to all Fleets filter: type: object properties: type: type: string description: What notefiles this route applies to. - enum: ["all", "include", "exclude"] + enum: + - all + - include + - exclude system_notefiles: type: boolean description: Whether system notefiles should be affected by this route @@ -5137,7 +4954,8 @@ components: type: array items: type: string - description: list of notefiles to filter. For instance, if 'type' is set to "include", will only affect files listed here + description: list of notefiles to filter. For instance, if 'type' + is set to "include", will only affect files listed here minItems: 0 description: Route filtering settings transform: @@ -5145,8 +4963,9 @@ components: properties: format: type: string - description: Data transformation to apply. Only "jsonata" is valid for Snowflake routes - default: "jsonata" + description: Data transformation to apply. Only "jsonata" is valid + for Snowflake routes + default: jsonata jsonata: type: string description: JSONata transformation @@ -5163,14 +4982,16 @@ components: private_key_name: type: string description: Name of PEM key. If omitted, defaults to "present" - default: "present" + default: present pem: type: string - description: PEM key with \n newlines. This value is input-only and will be omitted from the response and replaced with a placeholder - example: -----BEGIN PRIVATE KEY-----\nMIIEvwIBA...SleBlvA==\n-----END PRIVATE KEY----- - + description: PEM key with \n newlines. This value is input-only and will + be omitted from the response and replaced with a placeholder + example: '-----BEGIN PRIVATE KEY-----\nMIIEvwIBA...SleBlvA==\n-----END PRIVATE + KEY-----' twilio: - description: Route settings specific to Twilio routes. Only used for Twilio route types + description: Route settings specific to Twilio routes. Only used for Twilio + route types type: object properties: fleets: @@ -5178,14 +4999,18 @@ components: items: type: string minItems: 0 - description: list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets + description: list of Fleet UIDs to apply route to, if any. If empty, applies + to all Fleets filter: type: object properties: type: type: string description: What notefiles this route applies to. - enum: ["all", "include", "exclude"] + enum: + - all + - include + - exclude system_notefiles: type: boolean description: Whether system notefiles should be affected by this route @@ -5193,7 +5018,8 @@ components: type: array items: type: string - description: list of notefiles to filter. For instance, if 'type' is set to "include", will only affect files listed here + description: list of notefiles to filter. For instance, if 'type' + is set to "include", will only affect files listed here minItems: 0 description: Route filtering settings timeout: @@ -5205,21 +5031,24 @@ components: description: Twilio Account SID auth_token: type: string - description: Twilio Auth Token. This value will be omitted from the response and replaced with a placeholder. + description: Twilio Auth Token. This value will be omitted from the response + and replaced with a placeholder. to: type: string - description: Phone number to send SMS to, leave blank to use notefile, must use E.164 format + description: Phone number to send SMS to, leave blank to use notefile, must + use E.164 format from: type: string - description: Phone number to send SMS from, leave blank to use notefile, must use E.164 format + description: Phone number to send SMS from, leave blank to use notefile, + must use E.164 format message: type: string description: Message to send, leave blank to use notefile. throttle_ms: type: integer - slack: - description: Route settings specific to Slack routes. Only used for Slack route types + description: Route settings specific to Slack routes. Only used for Slack route + types type: object properties: fleets: @@ -5227,14 +5056,18 @@ components: items: type: string minItems: 0 - description: list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets + description: list of Fleet UIDs to apply route to, if any. If empty, applies + to all Fleets filter: type: object properties: type: type: string description: What notefiles this route applies to. - enum: ["all", "include", "exclude"] + enum: + - all + - include + - exclude system_notefiles: type: boolean description: Whether system notefiles should be affected by this route @@ -5242,7 +5075,8 @@ components: type: array items: type: string - description: list of notefiles to filter. For instance, if 'type' is set to "include", will only affect files listed here + description: list of notefiles to filter. For instance, if 'type' + is set to "include", will only affect files listed here minItems: 0 description: Route filtering settings transform: @@ -5250,8 +5084,9 @@ components: properties: format: type: string - description: Data transformation to apply. Only "jsonata" is valid for Snowflake routes - default: "jsonata" + description: Data transformation to apply. Only "jsonata" is valid + for Snowflake routes + default: jsonata jsonata: type: string description: JSONata transformation @@ -5262,42 +5097,44 @@ components: type: integer default: 15 description: Timeout in seconds for each request - slack_type: type: string - description: The type of Slack message. Must be one of "slack-bearer" for Bearer Token or "slack-webhook" for Webhook messages + description: The type of Slack message. Must be one of "slack-bearer" for + Bearer Token or "slack-webhook" for Webhook messages bearer: type: string - description: The Bearer Token for Slack messaging, if the "slack-bearer" type is selected + description: The Bearer Token for Slack messaging, if the "slack-bearer" + type is selected example: xoxb-1234-56789abcdefghijklmnop channel: type: string - description: The Channel ID for Bearer Token method, if the "slack-bearer" type is selected + description: The Channel ID for Bearer Token method, if the "slack-bearer" + type is selected example: C8675309 webhook_url: type: string - description: The Webhook URL for Slack Messaging if the "slack-webhook" type is selected + description: The Webhook URL for Slack Messaging if the "slack-webhook" + type is selected example: https://hooks.slack.com/services/FOO4BAR/THIS4THAT/123xYzaBC456 text: type: string - description: The simple text message to be sent, if the blocks message field is not in use. Placeholders are available for this field. - example: "[.device] reported temp(s) of [.body.temp] at [.body.location]" + description: The simple text message to be sent, if the blocks message field + is not in use. Placeholders are available for this field. + example: '[.device] reported temp(s) of [.body.temp] at [.body.location]' blocks: type: string - description: The Blocks message to be sent. If populated, this field overrides the text field within the Slack Messaging API. Placeholders are available for this field. - + description: The Blocks message to be sent. If populated, this field overrides + the text field within the Slack Messaging API. Placeholders are available + for this field. EnvironmentVariables: type: object properties: environment_variables: type: object - # string to string dictionary - # https://swagger.io/docs/specification/data-models/dictionaries/ additionalProperties: type: string required: - - environment_variables - + - environment_variables RouteLog: type: object properties: @@ -5325,7 +5162,6 @@ components: duration: type: integer description: The duration of the route in milliseconds - Note: type: object properties: @@ -5333,13 +5169,11 @@ components: type: object payload: type: string - Body: type: object properties: body: type: object - Monitor: type: object properties: @@ -5351,7 +5185,8 @@ components: type: string source_type: type: string - enum: ["event"] + enum: + - event description: The type of source to monitor. Currently only "event" is supported. disabled: type: boolean @@ -5369,76 +5204,79 @@ components: type: string source_selector: type: string - description: - A valid JSONata expression that selects the value to monitor from the source. - | It should return a single, numeric value. + description: A valid JSONata expression that selects the value to monitor + from the source. | It should return a single, numeric value. example: body.temperature condition_type: type: string enum: - - greater_than - - greater_than_or_equal_to - - less_than - - less_than_or_equal_to - - equal_to - - not_equal_to - description: A comparison operation to apply to the value selected by the source_selector [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to] + - greater_than + - greater_than_or_equal_to + - less_than + - less_than_or_equal_to + - equal_to + - not_equal_to + description: A comparison operation to apply to the value selected by the + source_selector [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, + equal_to, not_equal_to] threshold: type: integer - description: The type of condition to apply to the value selected by the source_selector + description: The type of condition to apply to the value selected by the + source_selector alert_routes: type: array items: oneOf: - - $ref: "#/components/schemas/SlackWebHookNotification" - - $ref: "#/components/schemas/SlackBearerNotification" - - $ref: "#/components/schemas/EmailNotification" + - $ref: '#/components/schemas/SlackWebHookNotification' + - $ref: '#/components/schemas/SlackBearerNotification' + - $ref: '#/components/schemas/EmailNotification' last_routed_at: type: string description: The last time the monitor was evaluated and routed. silenced: type: boolean - description: If true, alerts will be created, but no notifications will be sent. + description: If true, alerts will be created, but no notifications will + be sent. routing_cooldown_period: type: string - description: - The time period to wait before routing another event after the monitor - | has been triggered. It follows the format of a number followed by a time unit. - pattern: "^[0-9]+[smh]$" + description: The time period to wait before routing another event after + the monitor | has been triggered. It follows the format of a number followed + by a time unit. + pattern: ^[0-9]+[smh]$ example: 10m or 5h30m40s aggregate_function: type: string enum: - - none - - sum - - average - - max - - min - description: Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min] + - none + - sum + - average + - max + - min + description: Aggregate function to apply to the selected values before applying + the condition. [none, sum, average, max, min] aggregate_window: type: string - pattern: "^[0-9]+[smh]$" - description: The time window to aggregate the selected values. It follows the format of a number followed by a time unit + pattern: ^[0-9]+[smh]$ + description: The time window to aggregate the selected values. It follows + the format of a number followed by a time unit example: 10m or 5h30m40s per_device: type: boolean - description: - Only relevant when using an aggregate_function. If true, the monitor will be evaluated per device, - | rather than across the set of selected devices. If true then if a single device matches the specified criteria, - | and alert will be created, otherwise the aggregate function will be applied across all devices. - + description: Only relevant when using an aggregate_function. If true, the + monitor will be evaluated per device, | rather than across the set of + selected devices. If true then if a single device matches the specified + criteria, | and alert will be created, otherwise the aggregate function + will be applied across all devices. CreateMonitor: allOf: - - $ref: "#/components/schemas/Monitor" - - required: - - name - - description - - notefile_filter - - alert_routes - + - $ref: '#/components/schemas/Monitor' + - required: + - name + - description + - notefile_filter + - alert_routes Empty: type: object - FirmwareInfo: type: object properties: @@ -5478,7 +5316,6 @@ components: published: type: boolean description: True if the firmware is published. - Alert: type: object properties: @@ -5508,14 +5345,18 @@ components: description: The version of the alert alert_source: type: string - enum: [app, device] + enum: + - app + - device description: The source of the alert source: type: string description: The UID of the source of the alert monitor_type: type: string - enum: [event, device] + enum: + - event + - device description: The type of monitor that triggered the alert field_name: type: string @@ -5527,14 +5368,17 @@ components: properties: alert_source: type: string - enum: [app, device] + enum: + - app + - device description: The source of the alert source: type: string description: The UID of the source of the alert source_type: type: string - enum: [event] + enum: + - event description: The type of source. value: type: number @@ -5552,7 +5396,9 @@ components: properties: notification_type: type: string - enum: [email, slack] + enum: + - email + - slack description: The type of notification status: type: number @@ -5560,7 +5406,6 @@ components: recipients: type: string description: The recipients of the notification - UserFirmwareInfo: type: object properties: @@ -5569,7 +5414,6 @@ components: firmware_update: $ref: '#/components/schemas/UserDfuStateMachine' nullable: true - UserDfuStateMachine: type: object properties: @@ -5583,7 +5427,6 @@ components: type: string metadata: $ref: '#/components/schemas/UploadMetadata' - UserDfuStateMachineStatus: type: object properties: @@ -5597,7 +5440,6 @@ components: nullable: true status: type: string - CurrentFirmware: type: object properties: @@ -5605,7 +5447,6 @@ components: type: string metadata: $ref: '#/components/schemas/Firmware' - UploadMetadata: type: object properties: @@ -5635,7 +5476,6 @@ components: type: string firmware: $ref: '#/components/schemas/Firmware' - Firmware: type: object properties: @@ -5662,7 +5502,6 @@ components: builder: type: string nullable: true - SlackBearerNotification: type: object properties: @@ -5675,13 +5514,12 @@ components: message_type: type: string enum: - - text - - blocks + - text + - blocks description: text or blocks text: type: string description: The text of the message, or the blocks definition - SlackWebHookNotification: type: object properties: @@ -5691,28 +5529,25 @@ components: message_type: type: string enum: - - text - - blocks + - text + - blocks description: text or blocks text: type: string description: The text of the message, or the blocks definition - EmailNotification: type: object properties: email: type: string description: Email Address - example: "example@blues.com" - + example: example@blues.com DfuActionRequest: type: object properties: filename: type: string description: The name of the firmware file - DeviceDfuStatus: type: object properties: @@ -5745,19 +5580,17 @@ components: type: string description: Firmware author status: - $ref: "#/components/schemas/DeviceDfuStateMachine" - + $ref: '#/components/schemas/DeviceDfuStateMachine' DeviceDfuStatusPage: type: object properties: devices: type: array items: - $ref: "#/components/schemas/DeviceDfuStatus" + $ref: '#/components/schemas/DeviceDfuStatus' has_more: type: boolean default: false - DeviceDfuHistory: type: object properties: @@ -5789,19 +5622,17 @@ components: history: type: array items: - $ref: "#/components/schemas/DeviceDfuStateMachine" - + $ref: '#/components/schemas/DeviceDfuStateMachine' DeviceDfuHistoryPage: type: object properties: devices: type: array items: - $ref: "#/components/schemas/DeviceDfuHistory" + $ref: '#/components/schemas/DeviceDfuHistory' has_more: type: boolean default: false - DeviceDfuStateMachine: type: object description: Represents a single request to update the host or Notecard firmware @@ -5818,8 +5649,7 @@ components: updates: type: array items: - $ref: "#/components/schemas/DeviceDfuStateMachineNode" - + $ref: '#/components/schemas/DeviceDfuStateMachineNode' DeviceDfuStateMachineNode: type: object description: Represents a single request to update the host or Notecard firmware @@ -5835,15 +5665,13 @@ components: description: RFC3339 compatible datetime of when this status update happened description: type: string - description: Additional information - + description: Additional information DataField: type: object properties: name: type: string description: The name of the field - DataSetField: type: object properties: @@ -5854,13 +5682,12 @@ components: type: integer description: The datatype of the field enum: - - 0 # String - - 1 # Integer - - 2 # Float + - 0 + - 1 + - 2 jsonata: type: string description: the JSONata expression used to populate this field - DataSet: properties: name: @@ -5878,79 +5705,74 @@ components: fields: type: array items: - $ref: "#/components/schemas/DataSetField" - - + $ref: '#/components/schemas/DataSetField' QuestionDataResponseLineChart: type: object additionalProperties: false required: - - type - - title - - property - - displayValue + - type + - title + - property + - displayValue properties: type: type: string - enum: [ "lineChart" ] - description: "Graph type must be 'lineChart' for a line chart." + enum: + - lineChart + description: Graph type must be 'lineChart' for a line chart. title: type: string - description: "Title of the chart." + description: Title of the chart. property: type: string - description: "The property displayed as the Y-axis for the line chart." + description: The property displayed as the Y-axis for the line chart. displayValue: type: string - description: "Label of the Y-axis for the line chart." + description: Label of the Y-axis for the line chart. splitBy: type: string - description: "Optional. Split the data by this property to create multiple lines on the chart." + description: Optional. Split the data by this property to create multiple + lines on the chart. startDate: type: string format: date-time - description: "Optional start date for filtering/charting data." + description: Optional start date for filtering/charting data. endDate: type: string format: date-time - description: "Optional end date for filtering/charting data." - - + description: Optional end date for filtering/charting data. QuestionDataResponseMap: type: object additionalProperties: false required: - - type - - title + - type + - title properties: type: type: string - enum: [ "map" ] - description: "Graph type must be 'map' for a map visualization." + enum: + - map + description: Graph type must be 'map' for a map visualization. title: type: string - description: "Title of the map." - + description: Title of the map. FleetsUIDList: - type: array - items: - type: string - + type: array + items: + type: string AppUIDList: - type: array - items: - type: string - + type: array + items: + type: string CreateUpdateRepository: type: object properties: name: type: string fleetUIDs: - $ref: "#/components/schemas/FleetsUIDList" + $ref: '#/components/schemas/FleetsUIDList' projectUIDs: - $ref: "#/components/schemas/AppUIDList" - + $ref: '#/components/schemas/AppUIDList' Repository: type: object properties: @@ -5961,10 +5783,9 @@ components: type: string description: repository name fleetUIDs: - $ref: "#/components/schemas/FleetsUIDList" + $ref: '#/components/schemas/FleetsUIDList' projectUIDs: - $ref: "#/components/schemas/AppUIDList" - + $ref: '#/components/schemas/AppUIDList' NotefileSchema: type: object properties: @@ -5975,9 +5796,8 @@ components: items: $ref: '#/components/schemas/SchemaProperty' required: - - notefile - - properties - + - notefile + - properties SchemaProperty: type: object properties: @@ -5986,7 +5806,12 @@ components: description: Name of the field (optional for array/object children) type: type: string - enum: [string, number, boolean, array, object] + enum: + - string + - number + - boolean + - array + - object updatedAt: type: string format: date-time @@ -6001,13 +5826,12 @@ components: $ref: '#/components/schemas/SchemaProperty' description: Used if type is object required: - - type - - updatedAt + - type + - updatedAt CellularUsage: type: array items: - $ref: "#/components/schemas/SimUsage" - + $ref: '#/components/schemas/SimUsage' SimUsage: type: object properties: @@ -6030,8 +5854,6 @@ components: type: integer format: int64 description: Time this usage information was last updated - - WebhookSettings: type: object properties: @@ -6044,7 +5866,6 @@ components: transform: type: string description: Transformation to be applied to the event - EnvTreeJsonNode: type: object properties: @@ -6076,12 +5897,11 @@ components: type: string format: uri required: - - var_count - - inherited_var_count - - type - - variables - - children - + - var_count + - inherited_var_count + - type + - variables + - children EnvVar: type: object properties: @@ -6092,4 +5912,4 @@ components: used: type: boolean precedence: - type: int \ No newline at end of file + type: int From ac127e92387fde03c54f4fe9e369df993c07308a Mon Sep 17 00:00:00 2001 From: Paige Niedringhaus Date: Wed, 3 Sep 2025 15:46:09 -0400 Subject: [PATCH 2/3] deps: regenerate sdk --- openapi_filtered.yaml | 404 +-- src/.openapi-generator/FILES | 33 +- src/README.md | 20 +- src/docs/AnalyticsEventsData.md | 29 + src/docs/AnalyticsEventsResponse.md | 27 + src/docs/AnalyticsRouteLogsData.md | 30 + src/docs/AnalyticsRouteLogsResponse.md | 27 + src/docs/AnalyticsSessionsData.md | 30 + src/docs/AnalyticsSessionsResponse.md | 27 + src/docs/AuthorizationApi.md | 2 +- src/docs/PersonalAccessToken.md | 34 + src/docs/PersonalAccessTokenCreatedBy.md | 31 + src/docs/PersonalAccessTokenInfo.md | 30 + src/docs/PersonalAccessTokenSecret.md | 28 + src/docs/RepositoryApi.md | 815 ----- src/notehub_py/__init__.py | 13 +- src/notehub_py/api/__init__.py | 1 - src/notehub_py/api/authorization_api.py | 6 +- src/notehub_py/api/repository_api.py | 3174 ----------------- src/notehub_py/models/__init__.py | 12 + .../models/analytics_events_data.py | 93 + .../models/analytics_events_response.py | 100 + .../models/analytics_route_logs_data.py | 100 + .../models/analytics_route_logs_response.py | 100 + .../models/analytics_sessions_data.py | 100 + .../models/analytics_sessions_response.py | 100 + .../models/personal_access_token.py | 144 + .../personal_access_token_created_by.py | 88 + .../models/personal_access_token_info.py | 110 + .../models/personal_access_token_secret.py | 87 + src/test/test_analytics_events_data.py | 59 + src/test/test_analytics_events_response.py | 65 + src/test/test_analytics_route_logs_data.py | 61 + .../test_analytics_route_logs_response.py | 67 + src/test/test_analytics_sessions_data.py | 61 + src/test/test_analytics_sessions_response.py | 67 + src/test/test_personal_access_token.py | 64 + .../test_personal_access_token_created_by.py | 58 + src/test/test_personal_access_token_info.py | 57 + src/test/test_personal_access_token_secret.py | 55 + src/test/test_repository_api.py | 72 - 41 files changed, 2151 insertions(+), 4330 deletions(-) create mode 100644 src/docs/AnalyticsEventsData.md create mode 100644 src/docs/AnalyticsEventsResponse.md create mode 100644 src/docs/AnalyticsRouteLogsData.md create mode 100644 src/docs/AnalyticsRouteLogsResponse.md create mode 100644 src/docs/AnalyticsSessionsData.md create mode 100644 src/docs/AnalyticsSessionsResponse.md create mode 100644 src/docs/PersonalAccessToken.md create mode 100644 src/docs/PersonalAccessTokenCreatedBy.md create mode 100644 src/docs/PersonalAccessTokenInfo.md create mode 100644 src/docs/PersonalAccessTokenSecret.md delete mode 100644 src/docs/RepositoryApi.md delete mode 100644 src/notehub_py/api/repository_api.py create mode 100644 src/notehub_py/models/analytics_events_data.py create mode 100644 src/notehub_py/models/analytics_events_response.py create mode 100644 src/notehub_py/models/analytics_route_logs_data.py create mode 100644 src/notehub_py/models/analytics_route_logs_response.py create mode 100644 src/notehub_py/models/analytics_sessions_data.py create mode 100644 src/notehub_py/models/analytics_sessions_response.py create mode 100644 src/notehub_py/models/personal_access_token.py create mode 100644 src/notehub_py/models/personal_access_token_created_by.py create mode 100644 src/notehub_py/models/personal_access_token_info.py create mode 100644 src/notehub_py/models/personal_access_token_secret.py create mode 100644 src/test/test_analytics_events_data.py create mode 100644 src/test/test_analytics_events_response.py create mode 100644 src/test/test_analytics_route_logs_data.py create mode 100644 src/test/test_analytics_route_logs_response.py create mode 100644 src/test/test_analytics_sessions_data.py create mode 100644 src/test/test_analytics_sessions_response.py create mode 100644 src/test/test_personal_access_token.py create mode 100644 src/test/test_personal_access_token_created_by.py create mode 100644 src/test/test_personal_access_token_info.py create mode 100644 src/test/test_personal_access_token_secret.py delete mode 100644 src/test/test_repository_api.py diff --git a/openapi_filtered.yaml b/openapi_filtered.yaml index aef102d..0ada178 100644 --- a/openapi_filtered.yaml +++ b/openapi_filtered.yaml @@ -34,13 +34,15 @@ tags: description: Webhook APIs for non-notecard event ingestion - name: external devices description: APIs for events and sessions for external devices +- name: analytics + description: Analytics operations paths: /auth/login: post: tags: - authorization operationId: login - description: Gets a session token from the API from a username and password. + description: Gets an API key from username and password requestBody: required: true content: @@ -2247,255 +2249,6 @@ paths: description: Success default: $ref: '#/components/responses/ErrorResponse' - /v1/repositories: - post: - tags: - - repository - operationId: createRepository - description: Create a new repository - security: - - api_key: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreateUpdateRepository' - properties: {} - responses: - '201': - description: Repository created successfully - content: - application/json: - schema: - $ref: '#/components/schemas/Repository' - default: - $ref: '#/components/responses/ErrorResponse' - /v1/repositories/{repositoryUID}: - get: - tags: - - repository - operationId: getRepository - description: Get repository information - security: - - api_key: [] - parameters: - - $ref: '#/components/parameters/repositoryUIDParam' - - $ref: '#/components/parameters/repositoryKey' - responses: - '200': - description: Dataset updated successfully - content: - application/json: - schema: - $ref: '#/components/schemas/Repository' - default: - $ref: '#/components/responses/ErrorResponse' - put: - tags: - - repository - operationId: putRepository - description: Update a repository - security: - - api_key: [] - parameters: - - $ref: '#/components/parameters/repositoryUIDParam' - - $ref: '#/components/parameters/repositoryKey' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreateUpdateRepository' - properties: {} - responses: - '200': - description: Dataset updated successfully - content: - application/json: - schema: - $ref: '#/components/schemas/Repository' - default: - $ref: '#/components/responses/ErrorResponse' - delete: - tags: - - repository - operationId: deleteRepository - description: Delete a repository - security: - - api_key: [] - parameters: - - $ref: '#/components/parameters/repositoryUIDParam' - - $ref: '#/components/parameters/repositoryKey' - responses: - '200': - description: Dataset deleted successfully - default: - $ref: '#/components/responses/ErrorResponse' - /v1/repositories/{repositoryUID}/datasets: - put: - tags: - - repository - operationId: createRepositoryDataset - description: Create a new dataset within a repository - security: - - api_key: [] - parameters: - - $ref: '#/components/parameters/repositoryUIDParam' - - $ref: '#/components/parameters/repositoryKey' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/DataSet' - properties: {} - responses: - '201': - description: Dataset created successfully - content: - application/json: - schema: - $ref: '#/components/schemas/DataSet' - default: - $ref: '#/components/responses/ErrorResponse' - /v1/repositories/{repositoryUID}/datasets/{name}: - get: - tags: - - repository - operationId: getRepositoryDataset - description: Get the details of a dataset - security: - - api_key: [] - parameters: - - $ref: '#/components/parameters/repositoryUIDParam' - - $ref: '#/components/parameters/datasetNameParam' - - $ref: '#/components/parameters/repositoryKey' - responses: - '200': - description: Dataset details - content: - application/json: - schema: - $ref: '#/components/schemas/DataSet' - default: - $ref: '#/components/responses/ErrorResponse' - delete: - tags: - - repository - operationId: deleteRepositoryDataset - description: Delete a dataset - security: - - api_key: [] - parameters: - - $ref: '#/components/parameters/repositoryUIDParam' - - $ref: '#/components/parameters/datasetNameParam' - - $ref: '#/components/parameters/repositoryKey' - responses: - '200': - description: Dataset deleted successfully - default: - $ref: '#/components/responses/ErrorResponse' - /v1/repositories/{repositoryUID}/sql: - post: - tags: - - repository - operationId: queryRepositorySql - description: Run a raw Clickhouse-compatible SQL statement against the repository's - database. Results are returned in CSV format - security: - - api_key: [] - parameters: - - $ref: '#/components/parameters/repositoryUIDParam' - - $ref: '#/components/parameters/repositoryKey' - - in: header - description: Specify the format of the response data. This functions the same - as the ClickHouse `FORMAT` clause. Supported values include `CSV`, `JSON`, - `JSONEachRow`, `TabSeparated`, and `NDJSON`. If not specified, defaults - to `TabSeparated`. - name: X-ClickHouse-Format - schema: - type: string - requestBody: - description: Clickhouse-compatible SQL statement - required: true - content: - text/plain: - schema: - type: string - properties: {} - responses: - '200': - description: Successful query - content: - text/plain: - schema: - type: string - format: binary - default: - $ref: '#/components/responses/ErrorResponse' - /v1/repositories/{repositoryUID}/datasets/{name}/query: - get: - tags: - - repository - operationId: queryRepositoryDataset - description: Query a dataset with support for time ranges, field selection, - filtering, and location-based queries - security: - - api_key: [] - parameters: - - $ref: '#/components/parameters/repositoryKey' - - $ref: '#/components/parameters/repositoryUIDParam' - - $ref: '#/components/parameters/datasetNameParam' - - $ref: '#/components/parameters/datasetStartQueryParam' - - $ref: '#/components/parameters/datasetEndQueryParam' - - $ref: '#/components/parameters/datasetSelectQueryParam' - - $ref: '#/components/parameters/datasetWhereQueryParam' - - $ref: '#/components/parameters/datasetAggregateWindowQueryParam' - - $ref: '#/components/parameters/datasetLocationNearQueryParam' - - $ref: '#/components/parameters/datasetLocationRadiusQueryParam' - - $ref: '#/components/parameters/datasetLimitQueryParam' - - $ref: '#/components/parameters/datasetOrderByQueryParam' - - $ref: '#/components/parameters/datasetDistinctQueryParam' - responses: - '200': - description: Successful query - content: - text/csv: - schema: - type: string - format: binary - example: 'lat,lon,device,session_began - - 42.393125,-71.185015,dev:1234,2024-01-01T12:34:56Z - - ' - default: - $ref: '#/components/responses/ErrorResponse' - /v1/repositories/{repositoryUID}/data: - get: - tags: - - repository - operationId: getRepositoryData - description: Get event and session data from a repository in NDJSON format. - security: - - api_key: [] - parameters: - - $ref: '#/components/parameters/repositoryKey' - - $ref: '#/components/parameters/repositoryUIDParam' - - $ref: '#/components/parameters/datasetStartQueryParam' - - $ref: '#/components/parameters/datasetEndQueryParam' - responses: - '200': - description: Successful request returning NDJSON encoded event and session - objects. - content: - text/csv: - schema: - type: string - format: binary - default: - $ref: '#/components/responses/ErrorResponse' /v1/projects/{projectOrProductUID}/schemas: get: tags: @@ -3696,6 +3449,157 @@ components: - err - code - status + PersonalAccessToken: + type: object + properties: + uid: + type: string + description: Unique and public identifier + name: + type: string + description: Name for this API Key + description: + type: string + description: Optional description for this API Key + created_by: + type: object + description: The user that created this key + properties: + uid: + type: string + email: + type: string + name: + type: string + expires_at: + type: string + format: date-time + nullable: true + description: When the key expires + created_at: + type: string + format: date-time + description: When the key was created + last_used: + type: string + format: date-time + nullable: true + description: When it was last used, if ever + suspended: + type: boolean + description: if true, this token cannot be used + PersonalAccessTokenSecret: + type: object + properties: + uid: + type: string + description: Unique and public identifier + secret: + type: string + description: The secret + PersonalAccessTokenInfo: + type: object + required: + - expiresAt + properties: + name: + type: string + description: + type: string + expires_at: + type: string + format: date-time + nullable: true + description: New expiration timestamp for the personal access token + suspended: + type: boolean + description: if true, the token is temporarily suspended + AnalyticsEventsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/AnalyticsEventsData' + required: + - data + AnalyticsEventsData: + type: object + properties: + period: + type: string + format: date-time + example: '2025-07-23T00:00:00Z' + events: + type: integer + example: 42 + platform_events: + type: integer + example: 15 + required: + - period + - events + - platform_events + AnalyticsRouteLogsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/AnalyticsRouteLogsData' + required: + - data + AnalyticsRouteLogsData: + type: object + properties: + period: + type: string + format: date-time + example: '2025-07-23T00:00:00Z' + successful_routes: + type: integer + example: 38 + failed_routes: + type: integer + example: 4 + total_routes: + type: integer + example: 42 + required: + - period + - successful_routes + - failed_routes + - total_routes + AnalyticsSessionsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/AnalyticsSessionsData' + required: + - data + AnalyticsSessionsData: + type: object + properties: + period: + type: string + format: date-time + example: '2025-07-23T00:00:00Z' + sessions: + type: integer + example: 12 + unique_devices: + type: integer + example: 8 + total_bytes: + type: integer + example: 1048576 + required: + - period + - sessions + - unique_devices + - total_bytes JSONata: type: object BillingAccount: diff --git a/src/.openapi-generator/FILES b/src/.openapi-generator/FILES index bb8bed1..0eedd80 100644 --- a/src/.openapi-generator/FILES +++ b/src/.openapi-generator/FILES @@ -8,6 +8,12 @@ docs/Alert.md docs/AlertApi.md docs/AlertDataInner.md docs/AlertNotificationsInner.md +docs/AnalyticsEventsData.md +docs/AnalyticsEventsResponse.md +docs/AnalyticsRouteLogsData.md +docs/AnalyticsRouteLogsResponse.md +docs/AnalyticsSessionsData.md +docs/AnalyticsSessionsResponse.md docs/AuthorizationApi.md docs/Aws.md docs/Azure.md @@ -92,6 +98,10 @@ docs/Note.md docs/NotefileSchema.md docs/NotehubRoute.md docs/NotehubRouteSchema.md +docs/PersonalAccessToken.md +docs/PersonalAccessTokenCreatedBy.md +docs/PersonalAccessTokenInfo.md +docs/PersonalAccessTokenSecret.md docs/PostProvisionProjectDeviceRequest.md docs/Product.md docs/Project.md @@ -103,7 +113,6 @@ docs/QuestionDataResponseLineChart.md docs/QuestionDataResponseMap.md docs/Radresponder.md docs/Repository.md -docs/RepositoryApi.md docs/Role.md docs/RouteApi.md docs/RouteLog.md @@ -136,7 +145,6 @@ notehub_py/api/event_api.py notehub_py/api/external_devices_api.py notehub_py/api/monitor_api.py notehub_py/api/project_api.py -notehub_py/api/repository_api.py notehub_py/api/route_api.py notehub_py/api/webhook_api.py notehub_py/api_client.py @@ -147,6 +155,12 @@ notehub_py/models/__init__.py notehub_py/models/alert.py notehub_py/models/alert_data_inner.py notehub_py/models/alert_notifications_inner.py +notehub_py/models/analytics_events_data.py +notehub_py/models/analytics_events_response.py +notehub_py/models/analytics_route_logs_data.py +notehub_py/models/analytics_route_logs_response.py +notehub_py/models/analytics_sessions_data.py +notehub_py/models/analytics_sessions_response.py notehub_py/models/aws.py notehub_py/models/azure.py notehub_py/models/billing_account.py @@ -225,6 +239,10 @@ notehub_py/models/note.py notehub_py/models/notefile_schema.py notehub_py/models/notehub_route.py notehub_py/models/notehub_route_schema.py +notehub_py/models/personal_access_token.py +notehub_py/models/personal_access_token_created_by.py +notehub_py/models/personal_access_token_info.py +notehub_py/models/personal_access_token_secret.py notehub_py/models/post_provision_project_device_request.py notehub_py/models/product.py notehub_py/models/project.py @@ -266,6 +284,12 @@ test/test_alert.py test/test_alert_api.py test/test_alert_data_inner.py test/test_alert_notifications_inner.py +test/test_analytics_events_data.py +test/test_analytics_events_response.py +test/test_analytics_route_logs_data.py +test/test_analytics_route_logs_response.py +test/test_analytics_sessions_data.py +test/test_analytics_sessions_response.py test/test_authorization_api.py test/test_aws.py test/test_azure.py @@ -350,6 +374,10 @@ test/test_note.py test/test_notefile_schema.py test/test_notehub_route.py test/test_notehub_route_schema.py +test/test_personal_access_token.py +test/test_personal_access_token_created_by.py +test/test_personal_access_token_info.py +test/test_personal_access_token_secret.py test/test_post_provision_project_device_request.py test/test_product.py test/test_project.py @@ -361,7 +389,6 @@ test/test_question_data_response_line_chart.py test/test_question_data_response_map.py test/test_radresponder.py test/test_repository.py -test/test_repository_api.py test/test_role.py test/test_route_api.py test/test_route_log.py diff --git a/src/README.md b/src/README.md index c8696e8..a34a100 100644 --- a/src/README.md +++ b/src/README.md @@ -188,16 +188,6 @@ Class | Method | HTTP request | Description *ProjectApi* | [**set_global_transformation**](docs/ProjectApi.md#set_global_transformation) | **POST** /v1/projects/{projectOrProductUID}/global-transformation | *ProjectApi* | [**update_fleet**](docs/ProjectApi.md#update_fleet) | **PUT** /v1/projects/{projectOrProductUID}/fleets/{fleetUID} | *ProjectApi* | [**upload_firmware**](docs/ProjectApi.md#upload_firmware) | **PUT** /v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename} | -*RepositoryApi* | [**create_repository**](docs/RepositoryApi.md#create_repository) | **POST** /v1/repositories | -*RepositoryApi* | [**create_repository_dataset**](docs/RepositoryApi.md#create_repository_dataset) | **PUT** /v1/repositories/{repositoryUID}/datasets | -*RepositoryApi* | [**delete_repository**](docs/RepositoryApi.md#delete_repository) | **DELETE** /v1/repositories/{repositoryUID} | -*RepositoryApi* | [**delete_repository_dataset**](docs/RepositoryApi.md#delete_repository_dataset) | **DELETE** /v1/repositories/{repositoryUID}/datasets/{name} | -*RepositoryApi* | [**get_repository**](docs/RepositoryApi.md#get_repository) | **GET** /v1/repositories/{repositoryUID} | -*RepositoryApi* | [**get_repository_data**](docs/RepositoryApi.md#get_repository_data) | **GET** /v1/repositories/{repositoryUID}/data | -*RepositoryApi* | [**get_repository_dataset**](docs/RepositoryApi.md#get_repository_dataset) | **GET** /v1/repositories/{repositoryUID}/datasets/{name} | -*RepositoryApi* | [**put_repository**](docs/RepositoryApi.md#put_repository) | **PUT** /v1/repositories/{repositoryUID} | -*RepositoryApi* | [**query_repository_dataset**](docs/RepositoryApi.md#query_repository_dataset) | **GET** /v1/repositories/{repositoryUID}/datasets/{name}/query | -*RepositoryApi* | [**query_repository_sql**](docs/RepositoryApi.md#query_repository_sql) | **POST** /v1/repositories/{repositoryUID}/sql | *RouteApi* | [**create_route**](docs/RouteApi.md#create_route) | **POST** /v1/projects/{projectOrProductUID}/routes | *RouteApi* | [**delete_route**](docs/RouteApi.md#delete_route) | **DELETE** /v1/projects/{projectOrProductUID}/routes/{routeUID} | *RouteApi* | [**get_route**](docs/RouteApi.md#get_route) | **GET** /v1/projects/{projectOrProductUID}/routes/{routeUID} | @@ -216,6 +206,12 @@ Class | Method | HTTP request | Description - [Alert](docs/Alert.md) - [AlertDataInner](docs/AlertDataInner.md) - [AlertNotificationsInner](docs/AlertNotificationsInner.md) + - [AnalyticsEventsData](docs/AnalyticsEventsData.md) + - [AnalyticsEventsResponse](docs/AnalyticsEventsResponse.md) + - [AnalyticsRouteLogsData](docs/AnalyticsRouteLogsData.md) + - [AnalyticsRouteLogsResponse](docs/AnalyticsRouteLogsResponse.md) + - [AnalyticsSessionsData](docs/AnalyticsSessionsData.md) + - [AnalyticsSessionsResponse](docs/AnalyticsSessionsResponse.md) - [Aws](docs/Aws.md) - [Azure](docs/Azure.md) - [BillingAccount](docs/BillingAccount.md) @@ -294,6 +290,10 @@ Class | Method | HTTP request | Description - [NotefileSchema](docs/NotefileSchema.md) - [NotehubRoute](docs/NotehubRoute.md) - [NotehubRouteSchema](docs/NotehubRouteSchema.md) + - [PersonalAccessToken](docs/PersonalAccessToken.md) + - [PersonalAccessTokenCreatedBy](docs/PersonalAccessTokenCreatedBy.md) + - [PersonalAccessTokenInfo](docs/PersonalAccessTokenInfo.md) + - [PersonalAccessTokenSecret](docs/PersonalAccessTokenSecret.md) - [PostProvisionProjectDeviceRequest](docs/PostProvisionProjectDeviceRequest.md) - [Product](docs/Product.md) - [Project](docs/Project.md) diff --git a/src/docs/AnalyticsEventsData.md b/src/docs/AnalyticsEventsData.md new file mode 100644 index 0000000..a647501 --- /dev/null +++ b/src/docs/AnalyticsEventsData.md @@ -0,0 +1,29 @@ +# AnalyticsEventsData + +## Properties + +| Name | Type | Description | Notes | +| ------------------- | ------------ | ----------- | ----- | +| **period** | **datetime** | | +| **events** | **int** | | +| **platform_events** | **int** | | + +## Example + +```python +from notehub_py.models.analytics_events_data import AnalyticsEventsData + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalyticsEventsData from a JSON string +analytics_events_data_instance = AnalyticsEventsData.from_json(json) +# print the JSON string representation of the object +print(AnalyticsEventsData.to_json()) + +# convert the object into a dict +analytics_events_data_dict = analytics_events_data_instance.to_dict() +# create an instance of AnalyticsEventsData from a dict +analytics_events_data_from_dict = AnalyticsEventsData.from_dict(analytics_events_data_dict) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/AnalyticsEventsResponse.md b/src/docs/AnalyticsEventsResponse.md new file mode 100644 index 0000000..a56cf1d --- /dev/null +++ b/src/docs/AnalyticsEventsResponse.md @@ -0,0 +1,27 @@ +# AnalyticsEventsResponse + +## Properties + +| Name | Type | Description | Notes | +| -------- | ------------------------------------------------------- | ----------- | ----- | +| **data** | [**List[AnalyticsEventsData]**](AnalyticsEventsData.md) | | + +## Example + +```python +from notehub_py.models.analytics_events_response import AnalyticsEventsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalyticsEventsResponse from a JSON string +analytics_events_response_instance = AnalyticsEventsResponse.from_json(json) +# print the JSON string representation of the object +print(AnalyticsEventsResponse.to_json()) + +# convert the object into a dict +analytics_events_response_dict = analytics_events_response_instance.to_dict() +# create an instance of AnalyticsEventsResponse from a dict +analytics_events_response_from_dict = AnalyticsEventsResponse.from_dict(analytics_events_response_dict) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/AnalyticsRouteLogsData.md b/src/docs/AnalyticsRouteLogsData.md new file mode 100644 index 0000000..417f1dc --- /dev/null +++ b/src/docs/AnalyticsRouteLogsData.md @@ -0,0 +1,30 @@ +# AnalyticsRouteLogsData + +## Properties + +| Name | Type | Description | Notes | +| --------------------- | ------------ | ----------- | ----- | +| **period** | **datetime** | | +| **successful_routes** | **int** | | +| **failed_routes** | **int** | | +| **total_routes** | **int** | | + +## Example + +```python +from notehub_py.models.analytics_route_logs_data import AnalyticsRouteLogsData + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalyticsRouteLogsData from a JSON string +analytics_route_logs_data_instance = AnalyticsRouteLogsData.from_json(json) +# print the JSON string representation of the object +print(AnalyticsRouteLogsData.to_json()) + +# convert the object into a dict +analytics_route_logs_data_dict = analytics_route_logs_data_instance.to_dict() +# create an instance of AnalyticsRouteLogsData from a dict +analytics_route_logs_data_from_dict = AnalyticsRouteLogsData.from_dict(analytics_route_logs_data_dict) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/AnalyticsRouteLogsResponse.md b/src/docs/AnalyticsRouteLogsResponse.md new file mode 100644 index 0000000..970b48c --- /dev/null +++ b/src/docs/AnalyticsRouteLogsResponse.md @@ -0,0 +1,27 @@ +# AnalyticsRouteLogsResponse + +## Properties + +| Name | Type | Description | Notes | +| -------- | ------------------------------------------------------------- | ----------- | ----- | +| **data** | [**List[AnalyticsRouteLogsData]**](AnalyticsRouteLogsData.md) | | + +## Example + +```python +from notehub_py.models.analytics_route_logs_response import AnalyticsRouteLogsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalyticsRouteLogsResponse from a JSON string +analytics_route_logs_response_instance = AnalyticsRouteLogsResponse.from_json(json) +# print the JSON string representation of the object +print(AnalyticsRouteLogsResponse.to_json()) + +# convert the object into a dict +analytics_route_logs_response_dict = analytics_route_logs_response_instance.to_dict() +# create an instance of AnalyticsRouteLogsResponse from a dict +analytics_route_logs_response_from_dict = AnalyticsRouteLogsResponse.from_dict(analytics_route_logs_response_dict) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/AnalyticsSessionsData.md b/src/docs/AnalyticsSessionsData.md new file mode 100644 index 0000000..67eebcd --- /dev/null +++ b/src/docs/AnalyticsSessionsData.md @@ -0,0 +1,30 @@ +# AnalyticsSessionsData + +## Properties + +| Name | Type | Description | Notes | +| ------------------ | ------------ | ----------- | ----- | +| **period** | **datetime** | | +| **sessions** | **int** | | +| **unique_devices** | **int** | | +| **total_bytes** | **int** | | + +## Example + +```python +from notehub_py.models.analytics_sessions_data import AnalyticsSessionsData + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalyticsSessionsData from a JSON string +analytics_sessions_data_instance = AnalyticsSessionsData.from_json(json) +# print the JSON string representation of the object +print(AnalyticsSessionsData.to_json()) + +# convert the object into a dict +analytics_sessions_data_dict = analytics_sessions_data_instance.to_dict() +# create an instance of AnalyticsSessionsData from a dict +analytics_sessions_data_from_dict = AnalyticsSessionsData.from_dict(analytics_sessions_data_dict) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/AnalyticsSessionsResponse.md b/src/docs/AnalyticsSessionsResponse.md new file mode 100644 index 0000000..a69d0f7 --- /dev/null +++ b/src/docs/AnalyticsSessionsResponse.md @@ -0,0 +1,27 @@ +# AnalyticsSessionsResponse + +## Properties + +| Name | Type | Description | Notes | +| -------- | ----------------------------------------------------------- | ----------- | ----- | +| **data** | [**List[AnalyticsSessionsData]**](AnalyticsSessionsData.md) | | + +## Example + +```python +from notehub_py.models.analytics_sessions_response import AnalyticsSessionsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalyticsSessionsResponse from a JSON string +analytics_sessions_response_instance = AnalyticsSessionsResponse.from_json(json) +# print the JSON string representation of the object +print(AnalyticsSessionsResponse.to_json()) + +# convert the object into a dict +analytics_sessions_response_dict = analytics_sessions_response_instance.to_dict() +# create an instance of AnalyticsSessionsResponse from a dict +analytics_sessions_response_from_dict = AnalyticsSessionsResponse.from_dict(analytics_sessions_response_dict) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/AuthorizationApi.md b/src/docs/AuthorizationApi.md index 67d0c27..33709ad 100644 --- a/src/docs/AuthorizationApi.md +++ b/src/docs/AuthorizationApi.md @@ -10,7 +10,7 @@ All URIs are relative to *https://api.notefile.net* > Login200Response login(login_request) -Gets a session token from the API from a username and password. +Gets an API key from username and password ### Example diff --git a/src/docs/PersonalAccessToken.md b/src/docs/PersonalAccessToken.md new file mode 100644 index 0000000..eafd090 --- /dev/null +++ b/src/docs/PersonalAccessToken.md @@ -0,0 +1,34 @@ +# PersonalAccessToken + +## Properties + +| Name | Type | Description | Notes | +| --------------- | ------------------------------------------------------------------- | ------------------------------------- | ---------- | +| **uid** | **str** | Unique and public identifier | [optional] | +| **name** | **str** | Name for this API Key | [optional] | +| **description** | **str** | Optional description for this API Key | [optional] | +| **created_by** | [**PersonalAccessTokenCreatedBy**](PersonalAccessTokenCreatedBy.md) | | [optional] | +| **expires_at** | **datetime** | When the key expires | [optional] | +| **created_at** | **datetime** | When the key was created | [optional] | +| **last_used** | **datetime** | When it was last used, if ever | [optional] | +| **suspended** | **bool** | if true, this token cannot be used | [optional] | + +## Example + +```python +from notehub_py.models.personal_access_token import PersonalAccessToken + +# TODO update the JSON string below +json = "{}" +# create an instance of PersonalAccessToken from a JSON string +personal_access_token_instance = PersonalAccessToken.from_json(json) +# print the JSON string representation of the object +print(PersonalAccessToken.to_json()) + +# convert the object into a dict +personal_access_token_dict = personal_access_token_instance.to_dict() +# create an instance of PersonalAccessToken from a dict +personal_access_token_from_dict = PersonalAccessToken.from_dict(personal_access_token_dict) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/PersonalAccessTokenCreatedBy.md b/src/docs/PersonalAccessTokenCreatedBy.md new file mode 100644 index 0000000..e619ee6 --- /dev/null +++ b/src/docs/PersonalAccessTokenCreatedBy.md @@ -0,0 +1,31 @@ +# PersonalAccessTokenCreatedBy + +The user that created this key + +## Properties + +| Name | Type | Description | Notes | +| --------- | ------- | ----------- | ---------- | +| **uid** | **str** | | [optional] | +| **email** | **str** | | [optional] | +| **name** | **str** | | [optional] | + +## Example + +```python +from notehub_py.models.personal_access_token_created_by import PersonalAccessTokenCreatedBy + +# TODO update the JSON string below +json = "{}" +# create an instance of PersonalAccessTokenCreatedBy from a JSON string +personal_access_token_created_by_instance = PersonalAccessTokenCreatedBy.from_json(json) +# print the JSON string representation of the object +print(PersonalAccessTokenCreatedBy.to_json()) + +# convert the object into a dict +personal_access_token_created_by_dict = personal_access_token_created_by_instance.to_dict() +# create an instance of PersonalAccessTokenCreatedBy from a dict +personal_access_token_created_by_from_dict = PersonalAccessTokenCreatedBy.from_dict(personal_access_token_created_by_dict) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/PersonalAccessTokenInfo.md b/src/docs/PersonalAccessTokenInfo.md new file mode 100644 index 0000000..3b1bcbc --- /dev/null +++ b/src/docs/PersonalAccessTokenInfo.md @@ -0,0 +1,30 @@ +# PersonalAccessTokenInfo + +## Properties + +| Name | Type | Description | Notes | +| --------------- | ------------ | ------------------------------------------------------ | ---------- | +| **name** | **str** | | [optional] | +| **description** | **str** | | [optional] | +| **expires_at** | **datetime** | New expiration timestamp for the personal access token | [optional] | +| **suspended** | **bool** | if true, the token is temporarily suspended | [optional] | + +## Example + +```python +from notehub_py.models.personal_access_token_info import PersonalAccessTokenInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of PersonalAccessTokenInfo from a JSON string +personal_access_token_info_instance = PersonalAccessTokenInfo.from_json(json) +# print the JSON string representation of the object +print(PersonalAccessTokenInfo.to_json()) + +# convert the object into a dict +personal_access_token_info_dict = personal_access_token_info_instance.to_dict() +# create an instance of PersonalAccessTokenInfo from a dict +personal_access_token_info_from_dict = PersonalAccessTokenInfo.from_dict(personal_access_token_info_dict) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/PersonalAccessTokenSecret.md b/src/docs/PersonalAccessTokenSecret.md new file mode 100644 index 0000000..de9565d --- /dev/null +++ b/src/docs/PersonalAccessTokenSecret.md @@ -0,0 +1,28 @@ +# PersonalAccessTokenSecret + +## Properties + +| Name | Type | Description | Notes | +| ---------- | ------- | ---------------------------- | ---------- | +| **uid** | **str** | Unique and public identifier | [optional] | +| **secret** | **str** | The secret | [optional] | + +## Example + +```python +from notehub_py.models.personal_access_token_secret import PersonalAccessTokenSecret + +# TODO update the JSON string below +json = "{}" +# create an instance of PersonalAccessTokenSecret from a JSON string +personal_access_token_secret_instance = PersonalAccessTokenSecret.from_json(json) +# print the JSON string representation of the object +print(PersonalAccessTokenSecret.to_json()) + +# convert the object into a dict +personal_access_token_secret_dict = personal_access_token_secret_instance.to_dict() +# create an instance of PersonalAccessTokenSecret from a dict +personal_access_token_secret_from_dict = PersonalAccessTokenSecret.from_dict(personal_access_token_secret_dict) +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/docs/RepositoryApi.md b/src/docs/RepositoryApi.md deleted file mode 100644 index ef36cc6..0000000 --- a/src/docs/RepositoryApi.md +++ /dev/null @@ -1,815 +0,0 @@ -# notehub_py.RepositoryApi - -All URIs are relative to *https://api.notefile.net* - -| Method | HTTP request | Description | -| --------------------------------------------------------------------------- | -------------------------------------------------------------- | ----------- | -| [**create_repository**](RepositoryApi.md#create_repository) | **POST** /v1/repositories | -| [**create_repository_dataset**](RepositoryApi.md#create_repository_dataset) | **PUT** /v1/repositories/{repositoryUID}/datasets | -| [**delete_repository**](RepositoryApi.md#delete_repository) | **DELETE** /v1/repositories/{repositoryUID} | -| [**delete_repository_dataset**](RepositoryApi.md#delete_repository_dataset) | **DELETE** /v1/repositories/{repositoryUID}/datasets/{name} | -| [**get_repository**](RepositoryApi.md#get_repository) | **GET** /v1/repositories/{repositoryUID} | -| [**get_repository_data**](RepositoryApi.md#get_repository_data) | **GET** /v1/repositories/{repositoryUID}/data | -| [**get_repository_dataset**](RepositoryApi.md#get_repository_dataset) | **GET** /v1/repositories/{repositoryUID}/datasets/{name} | -| [**put_repository**](RepositoryApi.md#put_repository) | **PUT** /v1/repositories/{repositoryUID} | -| [**query_repository_dataset**](RepositoryApi.md#query_repository_dataset) | **GET** /v1/repositories/{repositoryUID}/datasets/{name}/query | -| [**query_repository_sql**](RepositoryApi.md#query_repository_sql) | **POST** /v1/repositories/{repositoryUID}/sql | - -# **create_repository** - -> Repository create_repository(create_update_repository) - -Create a new repository - -### Example - -- Api Key Authentication (api_key): - -```python -import notehub_py -from notehub_py.models.create_update_repository import CreateUpdateRepository -from notehub_py.models.repository import Repository -from notehub_py.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.notefile.net -# See configuration.py for a list of all supported configuration parameters. -configuration = notehub_py.Configuration( - host = "https://api.notefile.net" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: api_key -configuration.api_key['api_key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['api_key'] = 'Bearer' - -# Enter a context with an instance of the API client -with notehub_py.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = notehub_py.RepositoryApi(api_client) - create_update_repository = notehub_py.CreateUpdateRepository() # CreateUpdateRepository | - - try: - api_response = api_instance.create_repository(create_update_repository) - print("The response of RepositoryApi->create_repository:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling RepositoryApi->create_repository: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---------------------------- | ------------------------------------------------------- | ----------- | ----- | -| **create_update_repository** | [**CreateUpdateRepository**](CreateUpdateRepository.md) | | - -### Return type - -[**Repository**](Repository.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ------------------------------------------ | ---------------- | -| **201** | Repository created successfully | - | -| **0** | The response body in case of an API error. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_repository_dataset** - -> DataSet create_repository_dataset(repository_uid, x_repository_key, data_set) - -Create a new dataset within a repository - -### Example - -- Api Key Authentication (api_key): - -```python -import notehub_py -from notehub_py.models.data_set import DataSet -from notehub_py.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.notefile.net -# See configuration.py for a list of all supported configuration parameters. -configuration = notehub_py.Configuration( - host = "https://api.notefile.net" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: api_key -configuration.api_key['api_key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['api_key'] = 'Bearer' - -# Enter a context with an instance of the API client -with notehub_py.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = notehub_py.RepositoryApi(api_client) - repository_uid = 'rid:2606f411-dea6-44a0-9743-1130f57d77d8' # str | - x_repository_key = 'x_repository_key_example' # str | The secret key used to access this repository - data_set = notehub_py.DataSet() # DataSet | - - try: - api_response = api_instance.create_repository_dataset(repository_uid, x_repository_key, data_set) - print("The response of RepositoryApi->create_repository_dataset:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling RepositoryApi->create_repository_dataset: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------------- | ------------------------- | --------------------------------------------- | ----- | -| **repository_uid** | **str** | | -| **x_repository_key** | **str** | The secret key used to access this repository | -| **data_set** | [**DataSet**](DataSet.md) | | - -### Return type - -[**DataSet**](DataSet.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ------------------------------------------ | ---------------- | -| **201** | Dataset created successfully | - | -| **0** | The response body in case of an API error. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_repository** - -> delete_repository(repository_uid, x_repository_key) - -Delete a repository - -### Example - -- Api Key Authentication (api_key): - -```python -import notehub_py -from notehub_py.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.notefile.net -# See configuration.py for a list of all supported configuration parameters. -configuration = notehub_py.Configuration( - host = "https://api.notefile.net" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: api_key -configuration.api_key['api_key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['api_key'] = 'Bearer' - -# Enter a context with an instance of the API client -with notehub_py.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = notehub_py.RepositoryApi(api_client) - repository_uid = 'rid:2606f411-dea6-44a0-9743-1130f57d77d8' # str | - x_repository_key = 'x_repository_key_example' # str | The secret key used to access this repository - - try: - api_instance.delete_repository(repository_uid, x_repository_key) - except Exception as e: - print("Exception when calling RepositoryApi->delete_repository: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------------- | ------- | --------------------------------------------- | ----- | -| **repository_uid** | **str** | | -| **x_repository_key** | **str** | The secret key used to access this repository | - -### Return type - -void (empty response body) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ------------------------------------------ | ---------------- | -| **200** | Dataset deleted successfully | - | -| **0** | The response body in case of an API error. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_repository_dataset** - -> delete_repository_dataset(repository_uid, name, x_repository_key) - -Delete a dataset - -### Example - -- Api Key Authentication (api_key): - -```python -import notehub_py -from notehub_py.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.notefile.net -# See configuration.py for a list of all supported configuration parameters. -configuration = notehub_py.Configuration( - host = "https://api.notefile.net" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: api_key -configuration.api_key['api_key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['api_key'] = 'Bearer' - -# Enter a context with an instance of the API client -with notehub_py.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = notehub_py.RepositoryApi(api_client) - repository_uid = 'rid:2606f411-dea6-44a0-9743-1130f57d77d8' # str | - name = 'name_example' # str | The name of the data set - x_repository_key = 'x_repository_key_example' # str | The secret key used to access this repository - - try: - api_instance.delete_repository_dataset(repository_uid, name, x_repository_key) - except Exception as e: - print("Exception when calling RepositoryApi->delete_repository_dataset: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------------- | ------- | --------------------------------------------- | ----- | -| **repository_uid** | **str** | | -| **name** | **str** | The name of the data set | -| **x_repository_key** | **str** | The secret key used to access this repository | - -### Return type - -void (empty response body) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ------------------------------------------ | ---------------- | -| **200** | Dataset deleted successfully | - | -| **0** | The response body in case of an API error. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_repository** - -> Repository get_repository(repository_uid, x_repository_key) - -Get repository information - -### Example - -- Api Key Authentication (api_key): - -```python -import notehub_py -from notehub_py.models.repository import Repository -from notehub_py.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.notefile.net -# See configuration.py for a list of all supported configuration parameters. -configuration = notehub_py.Configuration( - host = "https://api.notefile.net" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: api_key -configuration.api_key['api_key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['api_key'] = 'Bearer' - -# Enter a context with an instance of the API client -with notehub_py.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = notehub_py.RepositoryApi(api_client) - repository_uid = 'rid:2606f411-dea6-44a0-9743-1130f57d77d8' # str | - x_repository_key = 'x_repository_key_example' # str | The secret key used to access this repository - - try: - api_response = api_instance.get_repository(repository_uid, x_repository_key) - print("The response of RepositoryApi->get_repository:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling RepositoryApi->get_repository: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------------- | ------- | --------------------------------------------- | ----- | -| **repository_uid** | **str** | | -| **x_repository_key** | **str** | The secret key used to access this repository | - -### Return type - -[**Repository**](Repository.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ------------------------------------------ | ---------------- | -| **200** | Dataset updated successfully | - | -| **0** | The response body in case of an API error. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_repository_data** - -> bytearray get_repository_data(x_repository_key, repository_uid, start, end=end) - -Get event and session data from a repository in NDJSON format. - -### Example - -- Api Key Authentication (api_key): - -```python -import notehub_py -from notehub_py.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.notefile.net -# See configuration.py for a list of all supported configuration parameters. -configuration = notehub_py.Configuration( - host = "https://api.notefile.net" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: api_key -configuration.api_key['api_key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['api_key'] = 'Bearer' - -# Enter a context with an instance of the API client -with notehub_py.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = notehub_py.RepositoryApi(api_client) - x_repository_key = 'x_repository_key_example' # str | The secret key used to access this repository - repository_uid = 'rid:2606f411-dea6-44a0-9743-1130f57d77d8' # str | - start = 'start_example' # str | Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format. - end = 'end_example' # str | End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used. (optional) - - try: - api_response = api_instance.get_repository_data(x_repository_key, repository_uid, start, end=end) - print("The response of RepositoryApi->get_repository_data:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling RepositoryApi->get_repository_data: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **x_repository_key** | **str** | The secret key used to access this repository | -| **repository_uid** | **str** | | -| **start** | **str** | Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format. | -| **end** | **str** | End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used. | [optional] | - -### Return type - -**bytearray** - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: text/csv, application/json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ---------------------------------------------------------------------- | ---------------- | -| **200** | Successful request returning NDJSON encoded event and session objects. | - | -| **0** | The response body in case of an API error. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_repository_dataset** - -> DataSet get_repository_dataset(repository_uid, name, x_repository_key) - -Get the details of a dataset - -### Example - -- Api Key Authentication (api_key): - -```python -import notehub_py -from notehub_py.models.data_set import DataSet -from notehub_py.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.notefile.net -# See configuration.py for a list of all supported configuration parameters. -configuration = notehub_py.Configuration( - host = "https://api.notefile.net" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: api_key -configuration.api_key['api_key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['api_key'] = 'Bearer' - -# Enter a context with an instance of the API client -with notehub_py.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = notehub_py.RepositoryApi(api_client) - repository_uid = 'rid:2606f411-dea6-44a0-9743-1130f57d77d8' # str | - name = 'name_example' # str | The name of the data set - x_repository_key = 'x_repository_key_example' # str | The secret key used to access this repository - - try: - api_response = api_instance.get_repository_dataset(repository_uid, name, x_repository_key) - print("The response of RepositoryApi->get_repository_dataset:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling RepositoryApi->get_repository_dataset: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------------- | ------- | --------------------------------------------- | ----- | -| **repository_uid** | **str** | | -| **name** | **str** | The name of the data set | -| **x_repository_key** | **str** | The secret key used to access this repository | - -### Return type - -[**DataSet**](DataSet.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ------------------------------------------ | ---------------- | -| **200** | Dataset details | - | -| **0** | The response body in case of an API error. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **put_repository** - -> Repository put_repository(repository_uid, x_repository_key, create_update_repository) - -Update a repository - -### Example - -- Api Key Authentication (api_key): - -```python -import notehub_py -from notehub_py.models.create_update_repository import CreateUpdateRepository -from notehub_py.models.repository import Repository -from notehub_py.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.notefile.net -# See configuration.py for a list of all supported configuration parameters. -configuration = notehub_py.Configuration( - host = "https://api.notefile.net" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: api_key -configuration.api_key['api_key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['api_key'] = 'Bearer' - -# Enter a context with an instance of the API client -with notehub_py.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = notehub_py.RepositoryApi(api_client) - repository_uid = 'rid:2606f411-dea6-44a0-9743-1130f57d77d8' # str | - x_repository_key = 'x_repository_key_example' # str | The secret key used to access this repository - create_update_repository = notehub_py.CreateUpdateRepository() # CreateUpdateRepository | - - try: - api_response = api_instance.put_repository(repository_uid, x_repository_key, create_update_repository) - print("The response of RepositoryApi->put_repository:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling RepositoryApi->put_repository: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---------------------------- | ------------------------------------------------------- | --------------------------------------------- | ----- | -| **repository_uid** | **str** | | -| **x_repository_key** | **str** | The secret key used to access this repository | -| **create_update_repository** | [**CreateUpdateRepository**](CreateUpdateRepository.md) | | - -### Return type - -[**Repository**](Repository.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ------------------------------------------ | ---------------- | -| **200** | Dataset updated successfully | - | -| **0** | The response body in case of an API error. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **query_repository_dataset** - -> bytearray query_repository_dataset(x_repository_key, repository_uid, name, start, end=end, select=select, where=where, aggregate_window=aggregate_window, location_near=location_near, location_near_radius=location_near_radius, limit=limit, order_by=order_by, distinct=distinct) - -Query a dataset with support for time ranges, field selection, filtering, and location-based queries - -### Example - -- Api Key Authentication (api_key): - -```python -import notehub_py -from notehub_py.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.notefile.net -# See configuration.py for a list of all supported configuration parameters. -configuration = notehub_py.Configuration( - host = "https://api.notefile.net" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: api_key -configuration.api_key['api_key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['api_key'] = 'Bearer' - -# Enter a context with an instance of the API client -with notehub_py.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = notehub_py.RepositoryApi(api_client) - x_repository_key = 'x_repository_key_example' # str | The secret key used to access this repository - repository_uid = 'rid:2606f411-dea6-44a0-9743-1130f57d77d8' # str | - name = 'name_example' # str | The name of the data set - start = 'start_example' # str | Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format. - end = 'end_example' # str | End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used. (optional) - select = 'select_example' # str | Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent). (optional) - where = 'where_example' # str | Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100)) (optional) - aggregate_window = 'aggregate_window_example' # str | Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format (optional) - location_near = '42.393125,-71.185015' # str | Latitude and Longitude for location-based filtering, location_near_radius must also be provided (optional) - location_near_radius = 56 # int | Distance from location_near in meters, location_near must also be provided (optional) - limit = 56 # int | Limit the number of results returned (optional) - order_by = 'order_by_example' # str | Order the results by a field (optional) - distinct = True # bool | Return only distinct results (optional) - - try: - api_response = api_instance.query_repository_dataset(x_repository_key, repository_uid, name, start, end=end, select=select, where=where, aggregate_window=aggregate_window, location_near=location_near, location_near_radius=location_near_radius, limit=limit, order_by=order_by, distinct=distinct) - print("The response of RepositoryApi->query_repository_dataset:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling RepositoryApi->query_repository_dataset: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **x_repository_key** | **str** | The secret key used to access this repository | -| **repository_uid** | **str** | | -| **name** | **str** | The name of the data set | -| **start** | **str** | Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format. | -| **end** | **str** | End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used. | [optional] | -| **select** | **str** | Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent). | [optional] | -| **where** | **str** | Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100)) | [optional] | -| **aggregate_window** | **str** | Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format | [optional] | -| **location_near** | **str** | Latitude and Longitude for location-based filtering, location_near_radius must also be provided | [optional] | -| **location_near_radius** | **int** | Distance from location_near in meters, location_near must also be provided | [optional] | -| **limit** | **int** | Limit the number of results returned | [optional] | -| **order_by** | **str** | Order the results by a field | [optional] | -| **distinct** | **bool** | Return only distinct results | [optional] | - -### Return type - -**bytearray** - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: text/csv, application/json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ------------------------------------------ | ---------------- | -| **200** | Successful query | - | -| **0** | The response body in case of an API error. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **query_repository_sql** - -> bytearray query_repository_sql(repository_uid, x_repository_key, body, x_click_house_format=x_click_house_format) - -Run a raw Clickhouse-compatible SQL statement against the repository's database. Results are returned in CSV format - -### Example - -- Api Key Authentication (api_key): - -```python -import notehub_py -from notehub_py.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.notefile.net -# See configuration.py for a list of all supported configuration parameters. -configuration = notehub_py.Configuration( - host = "https://api.notefile.net" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: api_key -configuration.api_key['api_key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['api_key'] = 'Bearer' - -# Enter a context with an instance of the API client -with notehub_py.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = notehub_py.RepositoryApi(api_client) - repository_uid = 'rid:2606f411-dea6-44a0-9743-1130f57d77d8' # str | - x_repository_key = 'x_repository_key_example' # str | The secret key used to access this repository - body = 'body_example' # str | Clickhouse-compatible SQL statement - x_click_house_format = 'x_click_house_format_example' # str | Specify the format of the response data. This functions the same as the ClickHouse `FORMAT` clause. Supported values include `CSV`, `JSON`, `JSONEachRow`, `TabSeparated`, and `NDJSON`. If not specified, defaults to `TabSeparated`. (optional) - - try: - api_response = api_instance.query_repository_sql(repository_uid, x_repository_key, body, x_click_house_format=x_click_house_format) - print("The response of RepositoryApi->query_repository_sql:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling RepositoryApi->query_repository_sql: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | -| **repository_uid** | **str** | | -| **x_repository_key** | **str** | The secret key used to access this repository | -| **body** | **str** | Clickhouse-compatible SQL statement | -| **x_click_house_format** | **str** | Specify the format of the response data. This functions the same as the ClickHouse `FORMAT` clause. Supported values include `CSV`, `JSON`, `JSONEachRow`, `TabSeparated`, and `NDJSON`. If not specified, defaults to `TabSeparated`. | [optional] | - -### Return type - -**bytearray** - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: text/plain -- **Accept**: text/plain, application/json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ------------------------------------------ | ---------------- | -| **200** | Successful query | - | -| **0** | The response body in case of an API error. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/src/notehub_py/__init__.py b/src/notehub_py/__init__.py index 0aaad02..d4e2659 100644 --- a/src/notehub_py/__init__.py +++ b/src/notehub_py/__init__.py @@ -26,7 +26,6 @@ from notehub_py.api.external_devices_api import ExternalDevicesApi from notehub_py.api.monitor_api import MonitorApi from notehub_py.api.project_api import ProjectApi -from notehub_py.api.repository_api import RepositoryApi from notehub_py.api.route_api import RouteApi from notehub_py.api.webhook_api import WebhookApi @@ -45,6 +44,12 @@ from notehub_py.models.alert import Alert from notehub_py.models.alert_data_inner import AlertDataInner from notehub_py.models.alert_notifications_inner import AlertNotificationsInner +from notehub_py.models.analytics_events_data import AnalyticsEventsData +from notehub_py.models.analytics_events_response import AnalyticsEventsResponse +from notehub_py.models.analytics_route_logs_data import AnalyticsRouteLogsData +from notehub_py.models.analytics_route_logs_response import AnalyticsRouteLogsResponse +from notehub_py.models.analytics_sessions_data import AnalyticsSessionsData +from notehub_py.models.analytics_sessions_response import AnalyticsSessionsResponse from notehub_py.models.aws import Aws from notehub_py.models.azure import Azure from notehub_py.models.billing_account import BillingAccount @@ -153,6 +158,12 @@ from notehub_py.models.notefile_schema import NotefileSchema from notehub_py.models.notehub_route import NotehubRoute from notehub_py.models.notehub_route_schema import NotehubRouteSchema +from notehub_py.models.personal_access_token import PersonalAccessToken +from notehub_py.models.personal_access_token_created_by import ( + PersonalAccessTokenCreatedBy, +) +from notehub_py.models.personal_access_token_info import PersonalAccessTokenInfo +from notehub_py.models.personal_access_token_secret import PersonalAccessTokenSecret from notehub_py.models.post_provision_project_device_request import ( PostProvisionProjectDeviceRequest, ) diff --git a/src/notehub_py/api/__init__.py b/src/notehub_py/api/__init__.py index ad06b5b..ced0a34 100644 --- a/src/notehub_py/api/__init__.py +++ b/src/notehub_py/api/__init__.py @@ -9,6 +9,5 @@ from notehub_py.api.external_devices_api import ExternalDevicesApi from notehub_py.api.monitor_api import MonitorApi from notehub_py.api.project_api import ProjectApi -from notehub_py.api.repository_api import RepositoryApi from notehub_py.api.route_api import RouteApi from notehub_py.api.webhook_api import WebhookApi diff --git a/src/notehub_py/api/authorization_api.py b/src/notehub_py/api/authorization_api.py index b99258b..ffb17cd 100644 --- a/src/notehub_py/api/authorization_api.py +++ b/src/notehub_py/api/authorization_api.py @@ -55,7 +55,7 @@ def login( ) -> Login200Response: """login - Gets a session token from the API from a username and password. + Gets an API key from username and password :param login_request: (required) :type login_request: LoginRequest @@ -121,7 +121,7 @@ def login_with_http_info( ) -> ApiResponse[Login200Response]: """login - Gets a session token from the API from a username and password. + Gets an API key from username and password :param login_request: (required) :type login_request: LoginRequest @@ -187,7 +187,7 @@ def login_without_preload_content( ) -> RESTResponseType: """login - Gets a session token from the API from a username and password. + Gets an API key from username and password :param login_request: (required) :type login_request: LoginRequest diff --git a/src/notehub_py/api/repository_api.py b/src/notehub_py/api/repository_api.py deleted file mode 100644 index de9d79f..0000000 --- a/src/notehub_py/api/repository_api.py +++ /dev/null @@ -1,3174 +0,0 @@ -# coding: utf-8 - -""" -Notehub API - -The OpenAPI definition for the Notehub.io API. - -The version of the OpenAPI document: 1.2.0 -Contact: engineering@blues.io -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr -from typing import Optional, Union -from typing_extensions import Annotated -from notehub_py.models.create_update_repository import CreateUpdateRepository -from notehub_py.models.data_set import DataSet -from notehub_py.models.repository import Repository - -from notehub_py.api_client import ApiClient, RequestSerialized -from notehub_py.api_response import ApiResponse -from notehub_py.rest import RESTResponseType - - -class RepositoryApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_call - def create_repository( - self, - create_update_repository: CreateUpdateRepository, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Repository: - """create_repository - - Create a new repository - - :param create_update_repository: (required) - :type create_update_repository: CreateUpdateRepository - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_repository_serialize( - create_update_repository=create_update_repository, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "201": "Repository", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - @validate_call - def create_repository_with_http_info( - self, - create_update_repository: CreateUpdateRepository, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Repository]: - """create_repository - - Create a new repository - - :param create_update_repository: (required) - :type create_update_repository: CreateUpdateRepository - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_repository_serialize( - create_update_repository=create_update_repository, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "201": "Repository", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - @validate_call - def create_repository_without_preload_content( - self, - create_update_repository: CreateUpdateRepository, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """create_repository - - Create a new repository - - :param create_update_repository: (required) - :type create_update_repository: CreateUpdateRepository - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_repository_serialize( - create_update_repository=create_update_repository, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "201": "Repository", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - return response_data.response - - def _create_repository_serialize( - self, - create_update_repository, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = {} - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if create_update_repository is not None: - _body_params = create_update_repository - - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params["Content-Type"] = _content_type - else: - _default_content_type = self.api_client.select_header_content_type( - ["application/json"] - ) - if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type - - # authentication setting - _auth_settings: List[str] = ["api_key"] - - return self.api_client.param_serialize( - method="POST", - resource_path="/v1/repositories", - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth, - ) - - @validate_call - def create_repository_dataset( - self, - repository_uid: StrictStr, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - data_set: DataSet, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DataSet: - """create_repository_dataset - - Create a new dataset within a repository - - :param repository_uid: (required) - :type repository_uid: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param data_set: (required) - :type data_set: DataSet - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_repository_dataset_serialize( - repository_uid=repository_uid, - x_repository_key=x_repository_key, - data_set=data_set, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "201": "DataSet", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - @validate_call - def create_repository_dataset_with_http_info( - self, - repository_uid: StrictStr, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - data_set: DataSet, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DataSet]: - """create_repository_dataset - - Create a new dataset within a repository - - :param repository_uid: (required) - :type repository_uid: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param data_set: (required) - :type data_set: DataSet - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_repository_dataset_serialize( - repository_uid=repository_uid, - x_repository_key=x_repository_key, - data_set=data_set, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "201": "DataSet", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - @validate_call - def create_repository_dataset_without_preload_content( - self, - repository_uid: StrictStr, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - data_set: DataSet, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """create_repository_dataset - - Create a new dataset within a repository - - :param repository_uid: (required) - :type repository_uid: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param data_set: (required) - :type data_set: DataSet - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_repository_dataset_serialize( - repository_uid=repository_uid, - x_repository_key=x_repository_key, - data_set=data_set, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "201": "DataSet", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - return response_data.response - - def _create_repository_dataset_serialize( - self, - repository_uid, - x_repository_key, - data_set, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = {} - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if repository_uid is not None: - _path_params["repositoryUID"] = repository_uid - # process the query parameters - # process the header parameters - if x_repository_key is not None: - _header_params["X-Repository-Key"] = x_repository_key - # process the form parameters - # process the body parameter - if data_set is not None: - _body_params = data_set - - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params["Content-Type"] = _content_type - else: - _default_content_type = self.api_client.select_header_content_type( - ["application/json"] - ) - if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type - - # authentication setting - _auth_settings: List[str] = ["api_key"] - - return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/repositories/{repositoryUID}/datasets", - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth, - ) - - @validate_call - def delete_repository( - self, - repository_uid: StrictStr, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """delete_repository - - Delete a repository - - :param repository_uid: (required) - :type repository_uid: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_repository_serialize( - repository_uid=repository_uid, - x_repository_key=x_repository_key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": None, - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - @validate_call - def delete_repository_with_http_info( - self, - repository_uid: StrictStr, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """delete_repository - - Delete a repository - - :param repository_uid: (required) - :type repository_uid: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_repository_serialize( - repository_uid=repository_uid, - x_repository_key=x_repository_key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": None, - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - @validate_call - def delete_repository_without_preload_content( - self, - repository_uid: StrictStr, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """delete_repository - - Delete a repository - - :param repository_uid: (required) - :type repository_uid: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_repository_serialize( - repository_uid=repository_uid, - x_repository_key=x_repository_key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": None, - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - return response_data.response - - def _delete_repository_serialize( - self, - repository_uid, - x_repository_key, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = {} - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if repository_uid is not None: - _path_params["repositoryUID"] = repository_uid - # process the query parameters - # process the header parameters - if x_repository_key is not None: - _header_params["X-Repository-Key"] = x_repository_key - # process the form parameters - # process the body parameter - - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) - - # authentication setting - _auth_settings: List[str] = ["api_key"] - - return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/repositories/{repositoryUID}", - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth, - ) - - @validate_call - def delete_repository_dataset( - self, - repository_uid: StrictStr, - name: Annotated[StrictStr, Field(description="The name of the data set")], - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """delete_repository_dataset - - Delete a dataset - - :param repository_uid: (required) - :type repository_uid: str - :param name: The name of the data set (required) - :type name: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_repository_dataset_serialize( - repository_uid=repository_uid, - name=name, - x_repository_key=x_repository_key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": None, - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - @validate_call - def delete_repository_dataset_with_http_info( - self, - repository_uid: StrictStr, - name: Annotated[StrictStr, Field(description="The name of the data set")], - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """delete_repository_dataset - - Delete a dataset - - :param repository_uid: (required) - :type repository_uid: str - :param name: The name of the data set (required) - :type name: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_repository_dataset_serialize( - repository_uid=repository_uid, - name=name, - x_repository_key=x_repository_key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": None, - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - @validate_call - def delete_repository_dataset_without_preload_content( - self, - repository_uid: StrictStr, - name: Annotated[StrictStr, Field(description="The name of the data set")], - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """delete_repository_dataset - - Delete a dataset - - :param repository_uid: (required) - :type repository_uid: str - :param name: The name of the data set (required) - :type name: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_repository_dataset_serialize( - repository_uid=repository_uid, - name=name, - x_repository_key=x_repository_key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": None, - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - return response_data.response - - def _delete_repository_dataset_serialize( - self, - repository_uid, - name, - x_repository_key, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = {} - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if repository_uid is not None: - _path_params["repositoryUID"] = repository_uid - if name is not None: - _path_params["name"] = name - # process the query parameters - # process the header parameters - if x_repository_key is not None: - _header_params["X-Repository-Key"] = x_repository_key - # process the form parameters - # process the body parameter - - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) - - # authentication setting - _auth_settings: List[str] = ["api_key"] - - return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/repositories/{repositoryUID}/datasets/{name}", - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth, - ) - - @validate_call - def get_repository( - self, - repository_uid: StrictStr, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Repository: - """get_repository - - Get repository information - - :param repository_uid: (required) - :type repository_uid: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_repository_serialize( - repository_uid=repository_uid, - x_repository_key=x_repository_key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "Repository", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - @validate_call - def get_repository_with_http_info( - self, - repository_uid: StrictStr, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Repository]: - """get_repository - - Get repository information - - :param repository_uid: (required) - :type repository_uid: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_repository_serialize( - repository_uid=repository_uid, - x_repository_key=x_repository_key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "Repository", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - @validate_call - def get_repository_without_preload_content( - self, - repository_uid: StrictStr, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """get_repository - - Get repository information - - :param repository_uid: (required) - :type repository_uid: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_repository_serialize( - repository_uid=repository_uid, - x_repository_key=x_repository_key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "Repository", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - return response_data.response - - def _get_repository_serialize( - self, - repository_uid, - x_repository_key, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = {} - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if repository_uid is not None: - _path_params["repositoryUID"] = repository_uid - # process the query parameters - # process the header parameters - if x_repository_key is not None: - _header_params["X-Repository-Key"] = x_repository_key - # process the form parameters - # process the body parameter - - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) - - # authentication setting - _auth_settings: List[str] = ["api_key"] - - return self.api_client.param_serialize( - method="GET", - resource_path="/v1/repositories/{repositoryUID}", - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth, - ) - - @validate_call - def get_repository_data( - self, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - repository_uid: StrictStr, - start: Annotated[ - StrictStr, - Field( - description="Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format." - ), - ], - end: Annotated[ - Optional[StrictStr], - Field( - description="End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used." - ), - ] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytearray: - """get_repository_data - - Get event and session data from a repository in NDJSON format. - - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param repository_uid: (required) - :type repository_uid: str - :param start: Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format. (required) - :type start: str - :param end: End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used. - :type end: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_repository_data_serialize( - x_repository_key=x_repository_key, - repository_uid=repository_uid, - start=start, - end=end, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "bytearray", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - @validate_call - def get_repository_data_with_http_info( - self, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - repository_uid: StrictStr, - start: Annotated[ - StrictStr, - Field( - description="Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format." - ), - ], - end: Annotated[ - Optional[StrictStr], - Field( - description="End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used." - ), - ] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytearray]: - """get_repository_data - - Get event and session data from a repository in NDJSON format. - - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param repository_uid: (required) - :type repository_uid: str - :param start: Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format. (required) - :type start: str - :param end: End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used. - :type end: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_repository_data_serialize( - x_repository_key=x_repository_key, - repository_uid=repository_uid, - start=start, - end=end, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "bytearray", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - @validate_call - def get_repository_data_without_preload_content( - self, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - repository_uid: StrictStr, - start: Annotated[ - StrictStr, - Field( - description="Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format." - ), - ], - end: Annotated[ - Optional[StrictStr], - Field( - description="End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used." - ), - ] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """get_repository_data - - Get event and session data from a repository in NDJSON format. - - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param repository_uid: (required) - :type repository_uid: str - :param start: Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format. (required) - :type start: str - :param end: End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used. - :type end: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_repository_data_serialize( - x_repository_key=x_repository_key, - repository_uid=repository_uid, - start=start, - end=end, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "bytearray", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - return response_data.response - - def _get_repository_data_serialize( - self, - x_repository_key, - repository_uid, - start, - end, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = {} - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if repository_uid is not None: - _path_params["repositoryUID"] = repository_uid - # process the query parameters - if start is not None: - - _query_params.append(("start", start)) - - if end is not None: - - _query_params.append(("end", end)) - - # process the header parameters - if x_repository_key is not None: - _header_params["X-Repository-Key"] = x_repository_key - # process the form parameters - # process the body parameter - - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["text/csv", "application/json"] - ) - - # authentication setting - _auth_settings: List[str] = ["api_key"] - - return self.api_client.param_serialize( - method="GET", - resource_path="/v1/repositories/{repositoryUID}/data", - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth, - ) - - @validate_call - def get_repository_dataset( - self, - repository_uid: StrictStr, - name: Annotated[StrictStr, Field(description="The name of the data set")], - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DataSet: - """get_repository_dataset - - Get the details of a dataset - - :param repository_uid: (required) - :type repository_uid: str - :param name: The name of the data set (required) - :type name: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_repository_dataset_serialize( - repository_uid=repository_uid, - name=name, - x_repository_key=x_repository_key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "DataSet", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - @validate_call - def get_repository_dataset_with_http_info( - self, - repository_uid: StrictStr, - name: Annotated[StrictStr, Field(description="The name of the data set")], - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DataSet]: - """get_repository_dataset - - Get the details of a dataset - - :param repository_uid: (required) - :type repository_uid: str - :param name: The name of the data set (required) - :type name: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_repository_dataset_serialize( - repository_uid=repository_uid, - name=name, - x_repository_key=x_repository_key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "DataSet", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - @validate_call - def get_repository_dataset_without_preload_content( - self, - repository_uid: StrictStr, - name: Annotated[StrictStr, Field(description="The name of the data set")], - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """get_repository_dataset - - Get the details of a dataset - - :param repository_uid: (required) - :type repository_uid: str - :param name: The name of the data set (required) - :type name: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_repository_dataset_serialize( - repository_uid=repository_uid, - name=name, - x_repository_key=x_repository_key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "DataSet", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - return response_data.response - - def _get_repository_dataset_serialize( - self, - repository_uid, - name, - x_repository_key, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = {} - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if repository_uid is not None: - _path_params["repositoryUID"] = repository_uid - if name is not None: - _path_params["name"] = name - # process the query parameters - # process the header parameters - if x_repository_key is not None: - _header_params["X-Repository-Key"] = x_repository_key - # process the form parameters - # process the body parameter - - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) - - # authentication setting - _auth_settings: List[str] = ["api_key"] - - return self.api_client.param_serialize( - method="GET", - resource_path="/v1/repositories/{repositoryUID}/datasets/{name}", - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth, - ) - - @validate_call - def put_repository( - self, - repository_uid: StrictStr, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - create_update_repository: CreateUpdateRepository, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Repository: - """put_repository - - Update a repository - - :param repository_uid: (required) - :type repository_uid: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param create_update_repository: (required) - :type create_update_repository: CreateUpdateRepository - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._put_repository_serialize( - repository_uid=repository_uid, - x_repository_key=x_repository_key, - create_update_repository=create_update_repository, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "Repository", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - @validate_call - def put_repository_with_http_info( - self, - repository_uid: StrictStr, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - create_update_repository: CreateUpdateRepository, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Repository]: - """put_repository - - Update a repository - - :param repository_uid: (required) - :type repository_uid: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param create_update_repository: (required) - :type create_update_repository: CreateUpdateRepository - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._put_repository_serialize( - repository_uid=repository_uid, - x_repository_key=x_repository_key, - create_update_repository=create_update_repository, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "Repository", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - @validate_call - def put_repository_without_preload_content( - self, - repository_uid: StrictStr, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - create_update_repository: CreateUpdateRepository, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """put_repository - - Update a repository - - :param repository_uid: (required) - :type repository_uid: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param create_update_repository: (required) - :type create_update_repository: CreateUpdateRepository - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._put_repository_serialize( - repository_uid=repository_uid, - x_repository_key=x_repository_key, - create_update_repository=create_update_repository, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "Repository", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - return response_data.response - - def _put_repository_serialize( - self, - repository_uid, - x_repository_key, - create_update_repository, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = {} - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if repository_uid is not None: - _path_params["repositoryUID"] = repository_uid - # process the query parameters - # process the header parameters - if x_repository_key is not None: - _header_params["X-Repository-Key"] = x_repository_key - # process the form parameters - # process the body parameter - if create_update_repository is not None: - _body_params = create_update_repository - - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params["Content-Type"] = _content_type - else: - _default_content_type = self.api_client.select_header_content_type( - ["application/json"] - ) - if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type - - # authentication setting - _auth_settings: List[str] = ["api_key"] - - return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/repositories/{repositoryUID}", - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth, - ) - - @validate_call - def query_repository_dataset( - self, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - repository_uid: StrictStr, - name: Annotated[StrictStr, Field(description="The name of the data set")], - start: Annotated[ - StrictStr, - Field( - description="Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format." - ), - ], - end: Annotated[ - Optional[StrictStr], - Field( - description="End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used." - ), - ] = None, - select: Annotated[ - Optional[StrictStr], - Field( - description="Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent)." - ), - ] = None, - where: Annotated[ - Optional[StrictStr], - Field( - description="Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100))" - ), - ] = None, - aggregate_window: Annotated[ - Optional[StrictStr], - Field( - description="Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format" - ), - ] = None, - location_near: Annotated[ - Optional[StrictStr], - Field( - description="Latitude and Longitude for location-based filtering, location_near_radius must also be provided" - ), - ] = None, - location_near_radius: Annotated[ - Optional[StrictInt], - Field( - description="Distance from location_near in meters, location_near must also be provided" - ), - ] = None, - limit: Annotated[ - Optional[StrictInt], - Field(description="Limit the number of results returned"), - ] = None, - order_by: Annotated[ - Optional[StrictStr], Field(description="Order the results by a field") - ] = None, - distinct: Annotated[ - Optional[StrictBool], Field(description="Return only distinct results") - ] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytearray: - """query_repository_dataset - - Query a dataset with support for time ranges, field selection, filtering, and location-based queries - - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param repository_uid: (required) - :type repository_uid: str - :param name: The name of the data set (required) - :type name: str - :param start: Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format. (required) - :type start: str - :param end: End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used. - :type end: str - :param select: Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent). - :type select: str - :param where: Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100)) - :type where: str - :param aggregate_window: Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format - :type aggregate_window: str - :param location_near: Latitude and Longitude for location-based filtering, location_near_radius must also be provided - :type location_near: str - :param location_near_radius: Distance from location_near in meters, location_near must also be provided - :type location_near_radius: int - :param limit: Limit the number of results returned - :type limit: int - :param order_by: Order the results by a field - :type order_by: str - :param distinct: Return only distinct results - :type distinct: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._query_repository_dataset_serialize( - x_repository_key=x_repository_key, - repository_uid=repository_uid, - name=name, - start=start, - end=end, - select=select, - where=where, - aggregate_window=aggregate_window, - location_near=location_near, - location_near_radius=location_near_radius, - limit=limit, - order_by=order_by, - distinct=distinct, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "bytearray", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - @validate_call - def query_repository_dataset_with_http_info( - self, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - repository_uid: StrictStr, - name: Annotated[StrictStr, Field(description="The name of the data set")], - start: Annotated[ - StrictStr, - Field( - description="Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format." - ), - ], - end: Annotated[ - Optional[StrictStr], - Field( - description="End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used." - ), - ] = None, - select: Annotated[ - Optional[StrictStr], - Field( - description="Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent)." - ), - ] = None, - where: Annotated[ - Optional[StrictStr], - Field( - description="Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100))" - ), - ] = None, - aggregate_window: Annotated[ - Optional[StrictStr], - Field( - description="Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format" - ), - ] = None, - location_near: Annotated[ - Optional[StrictStr], - Field( - description="Latitude and Longitude for location-based filtering, location_near_radius must also be provided" - ), - ] = None, - location_near_radius: Annotated[ - Optional[StrictInt], - Field( - description="Distance from location_near in meters, location_near must also be provided" - ), - ] = None, - limit: Annotated[ - Optional[StrictInt], - Field(description="Limit the number of results returned"), - ] = None, - order_by: Annotated[ - Optional[StrictStr], Field(description="Order the results by a field") - ] = None, - distinct: Annotated[ - Optional[StrictBool], Field(description="Return only distinct results") - ] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytearray]: - """query_repository_dataset - - Query a dataset with support for time ranges, field selection, filtering, and location-based queries - - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param repository_uid: (required) - :type repository_uid: str - :param name: The name of the data set (required) - :type name: str - :param start: Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format. (required) - :type start: str - :param end: End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used. - :type end: str - :param select: Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent). - :type select: str - :param where: Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100)) - :type where: str - :param aggregate_window: Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format - :type aggregate_window: str - :param location_near: Latitude and Longitude for location-based filtering, location_near_radius must also be provided - :type location_near: str - :param location_near_radius: Distance from location_near in meters, location_near must also be provided - :type location_near_radius: int - :param limit: Limit the number of results returned - :type limit: int - :param order_by: Order the results by a field - :type order_by: str - :param distinct: Return only distinct results - :type distinct: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._query_repository_dataset_serialize( - x_repository_key=x_repository_key, - repository_uid=repository_uid, - name=name, - start=start, - end=end, - select=select, - where=where, - aggregate_window=aggregate_window, - location_near=location_near, - location_near_radius=location_near_radius, - limit=limit, - order_by=order_by, - distinct=distinct, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "bytearray", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - @validate_call - def query_repository_dataset_without_preload_content( - self, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - repository_uid: StrictStr, - name: Annotated[StrictStr, Field(description="The name of the data set")], - start: Annotated[ - StrictStr, - Field( - description="Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format." - ), - ], - end: Annotated[ - Optional[StrictStr], - Field( - description="End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used." - ), - ] = None, - select: Annotated[ - Optional[StrictStr], - Field( - description="Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent)." - ), - ] = None, - where: Annotated[ - Optional[StrictStr], - Field( - description="Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100))" - ), - ] = None, - aggregate_window: Annotated[ - Optional[StrictStr], - Field( - description="Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format" - ), - ] = None, - location_near: Annotated[ - Optional[StrictStr], - Field( - description="Latitude and Longitude for location-based filtering, location_near_radius must also be provided" - ), - ] = None, - location_near_radius: Annotated[ - Optional[StrictInt], - Field( - description="Distance from location_near in meters, location_near must also be provided" - ), - ] = None, - limit: Annotated[ - Optional[StrictInt], - Field(description="Limit the number of results returned"), - ] = None, - order_by: Annotated[ - Optional[StrictStr], Field(description="Order the results by a field") - ] = None, - distinct: Annotated[ - Optional[StrictBool], Field(description="Return only distinct results") - ] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """query_repository_dataset - - Query a dataset with support for time ranges, field selection, filtering, and location-based queries - - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param repository_uid: (required) - :type repository_uid: str - :param name: The name of the data set (required) - :type name: str - :param start: Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format. (required) - :type start: str - :param end: End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used. - :type end: str - :param select: Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent). - :type select: str - :param where: Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100)) - :type where: str - :param aggregate_window: Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format - :type aggregate_window: str - :param location_near: Latitude and Longitude for location-based filtering, location_near_radius must also be provided - :type location_near: str - :param location_near_radius: Distance from location_near in meters, location_near must also be provided - :type location_near_radius: int - :param limit: Limit the number of results returned - :type limit: int - :param order_by: Order the results by a field - :type order_by: str - :param distinct: Return only distinct results - :type distinct: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._query_repository_dataset_serialize( - x_repository_key=x_repository_key, - repository_uid=repository_uid, - name=name, - start=start, - end=end, - select=select, - where=where, - aggregate_window=aggregate_window, - location_near=location_near, - location_near_radius=location_near_radius, - limit=limit, - order_by=order_by, - distinct=distinct, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "bytearray", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - return response_data.response - - def _query_repository_dataset_serialize( - self, - x_repository_key, - repository_uid, - name, - start, - end, - select, - where, - aggregate_window, - location_near, - location_near_radius, - limit, - order_by, - distinct, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = {} - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if repository_uid is not None: - _path_params["repositoryUID"] = repository_uid - if name is not None: - _path_params["name"] = name - # process the query parameters - if start is not None: - - _query_params.append(("start", start)) - - if end is not None: - - _query_params.append(("end", end)) - - if select is not None: - - _query_params.append(("select", select)) - - if where is not None: - - _query_params.append(("where", where)) - - if aggregate_window is not None: - - _query_params.append(("aggregate_window", aggregate_window)) - - if location_near is not None: - - _query_params.append(("location_near", location_near)) - - if location_near_radius is not None: - - _query_params.append(("location_near_radius", location_near_radius)) - - if limit is not None: - - _query_params.append(("limit", limit)) - - if order_by is not None: - - _query_params.append(("order_by", order_by)) - - if distinct is not None: - - _query_params.append(("distinct", distinct)) - - # process the header parameters - if x_repository_key is not None: - _header_params["X-Repository-Key"] = x_repository_key - # process the form parameters - # process the body parameter - - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["text/csv", "application/json"] - ) - - # authentication setting - _auth_settings: List[str] = ["api_key"] - - return self.api_client.param_serialize( - method="GET", - resource_path="/v1/repositories/{repositoryUID}/datasets/{name}/query", - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth, - ) - - @validate_call - def query_repository_sql( - self, - repository_uid: StrictStr, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - body: Annotated[ - StrictStr, Field(description="Clickhouse-compatible SQL statement") - ], - x_click_house_format: Annotated[ - Optional[StrictStr], - Field( - description="Specify the format of the response data. This functions the same as the ClickHouse `FORMAT` clause. Supported values include `CSV`, `JSON`, `JSONEachRow`, `TabSeparated`, and `NDJSON`. If not specified, defaults to `TabSeparated`." - ), - ] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytearray: - """query_repository_sql - - Run a raw Clickhouse-compatible SQL statement against the repository's database. Results are returned in CSV format - - :param repository_uid: (required) - :type repository_uid: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param body: Clickhouse-compatible SQL statement (required) - :type body: str - :param x_click_house_format: Specify the format of the response data. This functions the same as the ClickHouse `FORMAT` clause. Supported values include `CSV`, `JSON`, `JSONEachRow`, `TabSeparated`, and `NDJSON`. If not specified, defaults to `TabSeparated`. - :type x_click_house_format: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._query_repository_sql_serialize( - repository_uid=repository_uid, - x_repository_key=x_repository_key, - body=body, - x_click_house_format=x_click_house_format, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "bytearray", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - @validate_call - def query_repository_sql_with_http_info( - self, - repository_uid: StrictStr, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - body: Annotated[ - StrictStr, Field(description="Clickhouse-compatible SQL statement") - ], - x_click_house_format: Annotated[ - Optional[StrictStr], - Field( - description="Specify the format of the response data. This functions the same as the ClickHouse `FORMAT` clause. Supported values include `CSV`, `JSON`, `JSONEachRow`, `TabSeparated`, and `NDJSON`. If not specified, defaults to `TabSeparated`." - ), - ] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytearray]: - """query_repository_sql - - Run a raw Clickhouse-compatible SQL statement against the repository's database. Results are returned in CSV format - - :param repository_uid: (required) - :type repository_uid: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param body: Clickhouse-compatible SQL statement (required) - :type body: str - :param x_click_house_format: Specify the format of the response data. This functions the same as the ClickHouse `FORMAT` clause. Supported values include `CSV`, `JSON`, `JSONEachRow`, `TabSeparated`, and `NDJSON`. If not specified, defaults to `TabSeparated`. - :type x_click_house_format: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._query_repository_sql_serialize( - repository_uid=repository_uid, - x_repository_key=x_repository_key, - body=body, - x_click_house_format=x_click_house_format, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "bytearray", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - @validate_call - def query_repository_sql_without_preload_content( - self, - repository_uid: StrictStr, - x_repository_key: Annotated[ - StrictStr, - Field(description="The secret key used to access this repository"), - ], - body: Annotated[ - StrictStr, Field(description="Clickhouse-compatible SQL statement") - ], - x_click_house_format: Annotated[ - Optional[StrictStr], - Field( - description="Specify the format of the response data. This functions the same as the ClickHouse `FORMAT` clause. Supported values include `CSV`, `JSON`, `JSONEachRow`, `TabSeparated`, and `NDJSON`. If not specified, defaults to `TabSeparated`." - ), - ] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """query_repository_sql - - Run a raw Clickhouse-compatible SQL statement against the repository's database. Results are returned in CSV format - - :param repository_uid: (required) - :type repository_uid: str - :param x_repository_key: The secret key used to access this repository (required) - :type x_repository_key: str - :param body: Clickhouse-compatible SQL statement (required) - :type body: str - :param x_click_house_format: Specify the format of the response data. This functions the same as the ClickHouse `FORMAT` clause. Supported values include `CSV`, `JSON`, `JSONEachRow`, `TabSeparated`, and `NDJSON`. If not specified, defaults to `TabSeparated`. - :type x_click_house_format: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._query_repository_sql_serialize( - repository_uid=repository_uid, - x_repository_key=x_repository_key, - body=body, - x_click_house_format=x_click_house_format, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "bytearray", - } - response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout - ) - return response_data.response - - def _query_repository_sql_serialize( - self, - repository_uid, - x_repository_key, - body, - x_click_house_format, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = {} - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if repository_uid is not None: - _path_params["repositoryUID"] = repository_uid - # process the query parameters - # process the header parameters - if x_repository_key is not None: - _header_params["X-Repository-Key"] = x_repository_key - if x_click_house_format is not None: - _header_params["X-ClickHouse-Format"] = x_click_house_format - # process the form parameters - # process the body parameter - if body is not None: - _body_params = body - - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["text/plain", "application/json"] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params["Content-Type"] = _content_type - else: - _default_content_type = self.api_client.select_header_content_type( - ["text/plain"] - ) - if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type - - # authentication setting - _auth_settings: List[str] = ["api_key"] - - return self.api_client.param_serialize( - method="POST", - resource_path="/v1/repositories/{repositoryUID}/sql", - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth, - ) diff --git a/src/notehub_py/models/__init__.py b/src/notehub_py/models/__init__.py index d06bdea..dc1455c 100644 --- a/src/notehub_py/models/__init__.py +++ b/src/notehub_py/models/__init__.py @@ -18,6 +18,12 @@ from notehub_py.models.alert import Alert from notehub_py.models.alert_data_inner import AlertDataInner from notehub_py.models.alert_notifications_inner import AlertNotificationsInner +from notehub_py.models.analytics_events_data import AnalyticsEventsData +from notehub_py.models.analytics_events_response import AnalyticsEventsResponse +from notehub_py.models.analytics_route_logs_data import AnalyticsRouteLogsData +from notehub_py.models.analytics_route_logs_response import AnalyticsRouteLogsResponse +from notehub_py.models.analytics_sessions_data import AnalyticsSessionsData +from notehub_py.models.analytics_sessions_response import AnalyticsSessionsResponse from notehub_py.models.aws import Aws from notehub_py.models.azure import Azure from notehub_py.models.billing_account import BillingAccount @@ -126,6 +132,12 @@ from notehub_py.models.notefile_schema import NotefileSchema from notehub_py.models.notehub_route import NotehubRoute from notehub_py.models.notehub_route_schema import NotehubRouteSchema +from notehub_py.models.personal_access_token import PersonalAccessToken +from notehub_py.models.personal_access_token_created_by import ( + PersonalAccessTokenCreatedBy, +) +from notehub_py.models.personal_access_token_info import PersonalAccessTokenInfo +from notehub_py.models.personal_access_token_secret import PersonalAccessTokenSecret from notehub_py.models.post_provision_project_device_request import ( PostProvisionProjectDeviceRequest, ) diff --git a/src/notehub_py/models/analytics_events_data.py b/src/notehub_py/models/analytics_events_data.py new file mode 100644 index 0000000..3e3ed2f --- /dev/null +++ b/src/notehub_py/models/analytics_events_data.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + + +class AnalyticsEventsData(BaseModel): + """ + AnalyticsEventsData + """ # noqa: E501 + + period: datetime + events: StrictInt + platform_events: StrictInt + __properties: ClassVar[List[str]] = ["period", "events", "platform_events"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AnalyticsEventsData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnalyticsEventsData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "period": obj.get("period"), + "events": obj.get("events"), + "platform_events": obj.get("platform_events"), + } + ) + return _obj diff --git a/src/notehub_py/models/analytics_events_response.py b/src/notehub_py/models/analytics_events_response.py new file mode 100644 index 0000000..50b26a3 --- /dev/null +++ b/src/notehub_py/models/analytics_events_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from notehub_py.models.analytics_events_data import AnalyticsEventsData +from typing import Optional, Set +from typing_extensions import Self + + +class AnalyticsEventsResponse(BaseModel): + """ + AnalyticsEventsResponse + """ # noqa: E501 + + data: List[AnalyticsEventsData] + __properties: ClassVar[List[str]] = ["data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AnalyticsEventsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict["data"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnalyticsEventsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "data": ( + [AnalyticsEventsData.from_dict(_item) for _item in obj["data"]] + if obj.get("data") is not None + else None + ) + } + ) + return _obj diff --git a/src/notehub_py/models/analytics_route_logs_data.py b/src/notehub_py/models/analytics_route_logs_data.py new file mode 100644 index 0000000..d7972ee --- /dev/null +++ b/src/notehub_py/models/analytics_route_logs_data.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + + +class AnalyticsRouteLogsData(BaseModel): + """ + AnalyticsRouteLogsData + """ # noqa: E501 + + period: datetime + successful_routes: StrictInt + failed_routes: StrictInt + total_routes: StrictInt + __properties: ClassVar[List[str]] = [ + "period", + "successful_routes", + "failed_routes", + "total_routes", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AnalyticsRouteLogsData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnalyticsRouteLogsData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "period": obj.get("period"), + "successful_routes": obj.get("successful_routes"), + "failed_routes": obj.get("failed_routes"), + "total_routes": obj.get("total_routes"), + } + ) + return _obj diff --git a/src/notehub_py/models/analytics_route_logs_response.py b/src/notehub_py/models/analytics_route_logs_response.py new file mode 100644 index 0000000..93715e1 --- /dev/null +++ b/src/notehub_py/models/analytics_route_logs_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from notehub_py.models.analytics_route_logs_data import AnalyticsRouteLogsData +from typing import Optional, Set +from typing_extensions import Self + + +class AnalyticsRouteLogsResponse(BaseModel): + """ + AnalyticsRouteLogsResponse + """ # noqa: E501 + + data: List[AnalyticsRouteLogsData] + __properties: ClassVar[List[str]] = ["data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AnalyticsRouteLogsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict["data"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnalyticsRouteLogsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "data": ( + [AnalyticsRouteLogsData.from_dict(_item) for _item in obj["data"]] + if obj.get("data") is not None + else None + ) + } + ) + return _obj diff --git a/src/notehub_py/models/analytics_sessions_data.py b/src/notehub_py/models/analytics_sessions_data.py new file mode 100644 index 0000000..aad8f95 --- /dev/null +++ b/src/notehub_py/models/analytics_sessions_data.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + + +class AnalyticsSessionsData(BaseModel): + """ + AnalyticsSessionsData + """ # noqa: E501 + + period: datetime + sessions: StrictInt + unique_devices: StrictInt + total_bytes: StrictInt + __properties: ClassVar[List[str]] = [ + "period", + "sessions", + "unique_devices", + "total_bytes", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AnalyticsSessionsData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnalyticsSessionsData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "period": obj.get("period"), + "sessions": obj.get("sessions"), + "unique_devices": obj.get("unique_devices"), + "total_bytes": obj.get("total_bytes"), + } + ) + return _obj diff --git a/src/notehub_py/models/analytics_sessions_response.py b/src/notehub_py/models/analytics_sessions_response.py new file mode 100644 index 0000000..292ab35 --- /dev/null +++ b/src/notehub_py/models/analytics_sessions_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from notehub_py.models.analytics_sessions_data import AnalyticsSessionsData +from typing import Optional, Set +from typing_extensions import Self + + +class AnalyticsSessionsResponse(BaseModel): + """ + AnalyticsSessionsResponse + """ # noqa: E501 + + data: List[AnalyticsSessionsData] + __properties: ClassVar[List[str]] = ["data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AnalyticsSessionsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict["data"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnalyticsSessionsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "data": ( + [AnalyticsSessionsData.from_dict(_item) for _item in obj["data"]] + if obj.get("data") is not None + else None + ) + } + ) + return _obj diff --git a/src/notehub_py/models/personal_access_token.py b/src/notehub_py/models/personal_access_token.py new file mode 100644 index 0000000..733f056 --- /dev/null +++ b/src/notehub_py/models/personal_access_token.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from notehub_py.models.personal_access_token_created_by import ( + PersonalAccessTokenCreatedBy, +) +from typing import Optional, Set +from typing_extensions import Self + + +class PersonalAccessToken(BaseModel): + """ + PersonalAccessToken + """ # noqa: E501 + + uid: Optional[StrictStr] = Field( + default=None, description="Unique and public identifier" + ) + name: Optional[StrictStr] = Field(default=None, description="Name for this API Key") + description: Optional[StrictStr] = Field( + default=None, description="Optional description for this API Key" + ) + created_by: Optional[PersonalAccessTokenCreatedBy] = None + expires_at: Optional[datetime] = Field( + default=None, description="When the key expires" + ) + created_at: Optional[datetime] = Field( + default=None, description="When the key was created" + ) + last_used: Optional[datetime] = Field( + default=None, description="When it was last used, if ever" + ) + suspended: Optional[StrictBool] = Field( + default=None, description="if true, this token cannot be used" + ) + __properties: ClassVar[List[str]] = [ + "uid", + "name", + "description", + "created_by", + "expires_at", + "created_at", + "last_used", + "suspended", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PersonalAccessToken from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of created_by + if self.created_by: + _dict["created_by"] = self.created_by.to_dict() + # set to None if expires_at (nullable) is None + # and model_fields_set contains the field + if self.expires_at is None and "expires_at" in self.model_fields_set: + _dict["expires_at"] = None + + # set to None if last_used (nullable) is None + # and model_fields_set contains the field + if self.last_used is None and "last_used" in self.model_fields_set: + _dict["last_used"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PersonalAccessToken from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "uid": obj.get("uid"), + "name": obj.get("name"), + "description": obj.get("description"), + "created_by": ( + PersonalAccessTokenCreatedBy.from_dict(obj["created_by"]) + if obj.get("created_by") is not None + else None + ), + "expires_at": obj.get("expires_at"), + "created_at": obj.get("created_at"), + "last_used": obj.get("last_used"), + "suspended": obj.get("suspended"), + } + ) + return _obj diff --git a/src/notehub_py/models/personal_access_token_created_by.py b/src/notehub_py/models/personal_access_token_created_by.py new file mode 100644 index 0000000..820f7c9 --- /dev/null +++ b/src/notehub_py/models/personal_access_token_created_by.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + + +class PersonalAccessTokenCreatedBy(BaseModel): + """ + The user that created this key + """ # noqa: E501 + + uid: Optional[StrictStr] = None + email: Optional[StrictStr] = None + name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["uid", "email", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PersonalAccessTokenCreatedBy from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PersonalAccessTokenCreatedBy from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"uid": obj.get("uid"), "email": obj.get("email"), "name": obj.get("name")} + ) + return _obj diff --git a/src/notehub_py/models/personal_access_token_info.py b/src/notehub_py/models/personal_access_token_info.py new file mode 100644 index 0000000..5afd4f5 --- /dev/null +++ b/src/notehub_py/models/personal_access_token_info.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + + +class PersonalAccessTokenInfo(BaseModel): + """ + PersonalAccessTokenInfo + """ # noqa: E501 + + name: Optional[StrictStr] = None + description: Optional[StrictStr] = None + expires_at: Optional[datetime] = Field( + default=None, + description="New expiration timestamp for the personal access token", + ) + suspended: Optional[StrictBool] = Field( + default=None, description="if true, the token is temporarily suspended" + ) + __properties: ClassVar[List[str]] = [ + "name", + "description", + "expires_at", + "suspended", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PersonalAccessTokenInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if expires_at (nullable) is None + # and model_fields_set contains the field + if self.expires_at is None and "expires_at" in self.model_fields_set: + _dict["expires_at"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PersonalAccessTokenInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "name": obj.get("name"), + "description": obj.get("description"), + "expires_at": obj.get("expires_at"), + "suspended": obj.get("suspended"), + } + ) + return _obj diff --git a/src/notehub_py/models/personal_access_token_secret.py b/src/notehub_py/models/personal_access_token_secret.py new file mode 100644 index 0000000..1fae32e --- /dev/null +++ b/src/notehub_py/models/personal_access_token_secret.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + + +class PersonalAccessTokenSecret(BaseModel): + """ + PersonalAccessTokenSecret + """ # noqa: E501 + + uid: Optional[StrictStr] = Field( + default=None, description="Unique and public identifier" + ) + secret: Optional[StrictStr] = Field(default=None, description="The secret") + __properties: ClassVar[List[str]] = ["uid", "secret"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PersonalAccessTokenSecret from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PersonalAccessTokenSecret from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"uid": obj.get("uid"), "secret": obj.get("secret")}) + return _obj diff --git a/src/test/test_analytics_events_data.py b/src/test/test_analytics_events_data.py new file mode 100644 index 0000000..00e171b --- /dev/null +++ b/src/test/test_analytics_events_data.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.analytics_events_data import AnalyticsEventsData + + +class TestAnalyticsEventsData(unittest.TestCase): + """AnalyticsEventsData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalyticsEventsData: + """Test AnalyticsEventsData + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `AnalyticsEventsData` + """ + model = AnalyticsEventsData() + if include_optional: + return AnalyticsEventsData( + period = '2025-07-23T00:00Z', + events = 42, + platform_events = 15 + ) + else: + return AnalyticsEventsData( + period = '2025-07-23T00:00Z', + events = 42, + platform_events = 15, + ) + """ + + def testAnalyticsEventsData(self): + """Test AnalyticsEventsData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_analytics_events_response.py b/src/test/test_analytics_events_response.py new file mode 100644 index 0000000..fd0c005 --- /dev/null +++ b/src/test/test_analytics_events_response.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.analytics_events_response import AnalyticsEventsResponse + + +class TestAnalyticsEventsResponse(unittest.TestCase): + """AnalyticsEventsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalyticsEventsResponse: + """Test AnalyticsEventsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `AnalyticsEventsResponse` + """ + model = AnalyticsEventsResponse() + if include_optional: + return AnalyticsEventsResponse( + data = [ + notehub_py.models.analytics_events_data.AnalyticsEventsData( + period = '2025-07-23T00:00Z', + events = 42, + platform_events = 15, ) + ] + ) + else: + return AnalyticsEventsResponse( + data = [ + notehub_py.models.analytics_events_data.AnalyticsEventsData( + period = '2025-07-23T00:00Z', + events = 42, + platform_events = 15, ) + ], + ) + """ + + def testAnalyticsEventsResponse(self): + """Test AnalyticsEventsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_analytics_route_logs_data.py b/src/test/test_analytics_route_logs_data.py new file mode 100644 index 0000000..7c434f3 --- /dev/null +++ b/src/test/test_analytics_route_logs_data.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.analytics_route_logs_data import AnalyticsRouteLogsData + + +class TestAnalyticsRouteLogsData(unittest.TestCase): + """AnalyticsRouteLogsData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalyticsRouteLogsData: + """Test AnalyticsRouteLogsData + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `AnalyticsRouteLogsData` + """ + model = AnalyticsRouteLogsData() + if include_optional: + return AnalyticsRouteLogsData( + period = '2025-07-23T00:00Z', + successful_routes = 38, + failed_routes = 4, + total_routes = 42 + ) + else: + return AnalyticsRouteLogsData( + period = '2025-07-23T00:00Z', + successful_routes = 38, + failed_routes = 4, + total_routes = 42, + ) + """ + + def testAnalyticsRouteLogsData(self): + """Test AnalyticsRouteLogsData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_analytics_route_logs_response.py b/src/test/test_analytics_route_logs_response.py new file mode 100644 index 0000000..925074d --- /dev/null +++ b/src/test/test_analytics_route_logs_response.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.analytics_route_logs_response import AnalyticsRouteLogsResponse + + +class TestAnalyticsRouteLogsResponse(unittest.TestCase): + """AnalyticsRouteLogsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalyticsRouteLogsResponse: + """Test AnalyticsRouteLogsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `AnalyticsRouteLogsResponse` + """ + model = AnalyticsRouteLogsResponse() + if include_optional: + return AnalyticsRouteLogsResponse( + data = [ + notehub_py.models.analytics_route_logs_data.AnalyticsRouteLogsData( + period = '2025-07-23T00:00Z', + successful_routes = 38, + failed_routes = 4, + total_routes = 42, ) + ] + ) + else: + return AnalyticsRouteLogsResponse( + data = [ + notehub_py.models.analytics_route_logs_data.AnalyticsRouteLogsData( + period = '2025-07-23T00:00Z', + successful_routes = 38, + failed_routes = 4, + total_routes = 42, ) + ], + ) + """ + + def testAnalyticsRouteLogsResponse(self): + """Test AnalyticsRouteLogsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_analytics_sessions_data.py b/src/test/test_analytics_sessions_data.py new file mode 100644 index 0000000..226d600 --- /dev/null +++ b/src/test/test_analytics_sessions_data.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.analytics_sessions_data import AnalyticsSessionsData + + +class TestAnalyticsSessionsData(unittest.TestCase): + """AnalyticsSessionsData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalyticsSessionsData: + """Test AnalyticsSessionsData + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `AnalyticsSessionsData` + """ + model = AnalyticsSessionsData() + if include_optional: + return AnalyticsSessionsData( + period = '2025-07-23T00:00Z', + sessions = 12, + unique_devices = 8, + total_bytes = 1048576 + ) + else: + return AnalyticsSessionsData( + period = '2025-07-23T00:00Z', + sessions = 12, + unique_devices = 8, + total_bytes = 1048576, + ) + """ + + def testAnalyticsSessionsData(self): + """Test AnalyticsSessionsData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_analytics_sessions_response.py b/src/test/test_analytics_sessions_response.py new file mode 100644 index 0000000..14f95e5 --- /dev/null +++ b/src/test/test_analytics_sessions_response.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.analytics_sessions_response import AnalyticsSessionsResponse + + +class TestAnalyticsSessionsResponse(unittest.TestCase): + """AnalyticsSessionsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalyticsSessionsResponse: + """Test AnalyticsSessionsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `AnalyticsSessionsResponse` + """ + model = AnalyticsSessionsResponse() + if include_optional: + return AnalyticsSessionsResponse( + data = [ + notehub_py.models.analytics_sessions_data.AnalyticsSessionsData( + period = '2025-07-23T00:00Z', + sessions = 12, + unique_devices = 8, + total_bytes = 1048576, ) + ] + ) + else: + return AnalyticsSessionsResponse( + data = [ + notehub_py.models.analytics_sessions_data.AnalyticsSessionsData( + period = '2025-07-23T00:00Z', + sessions = 12, + unique_devices = 8, + total_bytes = 1048576, ) + ], + ) + """ + + def testAnalyticsSessionsResponse(self): + """Test AnalyticsSessionsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_personal_access_token.py b/src/test/test_personal_access_token.py new file mode 100644 index 0000000..59ab315 --- /dev/null +++ b/src/test/test_personal_access_token.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.personal_access_token import PersonalAccessToken + + +class TestPersonalAccessToken(unittest.TestCase): + """PersonalAccessToken unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PersonalAccessToken: + """Test PersonalAccessToken + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `PersonalAccessToken` + """ + model = PersonalAccessToken() + if include_optional: + return PersonalAccessToken( + uid = '', + name = '', + description = '', + created_by = notehub_py.models.personal_access_token_created_by.PersonalAccessToken_created_by( + uid = '', + email = '', + name = '', ), + expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + last_used = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + suspended = True + ) + else: + return PersonalAccessToken( + ) + """ + + def testPersonalAccessToken(self): + """Test PersonalAccessToken""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_personal_access_token_created_by.py b/src/test/test_personal_access_token_created_by.py new file mode 100644 index 0000000..c75ecd1 --- /dev/null +++ b/src/test/test_personal_access_token_created_by.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.personal_access_token_created_by import ( + PersonalAccessTokenCreatedBy, +) + + +class TestPersonalAccessTokenCreatedBy(unittest.TestCase): + """PersonalAccessTokenCreatedBy unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PersonalAccessTokenCreatedBy: + """Test PersonalAccessTokenCreatedBy + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `PersonalAccessTokenCreatedBy` + """ + model = PersonalAccessTokenCreatedBy() + if include_optional: + return PersonalAccessTokenCreatedBy( + uid = '', + email = '', + name = '' + ) + else: + return PersonalAccessTokenCreatedBy( + ) + """ + + def testPersonalAccessTokenCreatedBy(self): + """Test PersonalAccessTokenCreatedBy""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_personal_access_token_info.py b/src/test/test_personal_access_token_info.py new file mode 100644 index 0000000..8e23942 --- /dev/null +++ b/src/test/test_personal_access_token_info.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.personal_access_token_info import PersonalAccessTokenInfo + + +class TestPersonalAccessTokenInfo(unittest.TestCase): + """PersonalAccessTokenInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PersonalAccessTokenInfo: + """Test PersonalAccessTokenInfo + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `PersonalAccessTokenInfo` + """ + model = PersonalAccessTokenInfo() + if include_optional: + return PersonalAccessTokenInfo( + name = '', + description = '', + expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + suspended = True + ) + else: + return PersonalAccessTokenInfo( + ) + """ + + def testPersonalAccessTokenInfo(self): + """Test PersonalAccessTokenInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_personal_access_token_secret.py b/src/test/test_personal_access_token_secret.py new file mode 100644 index 0000000..424fec0 --- /dev/null +++ b/src/test/test_personal_access_token_secret.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" +Notehub API + +The OpenAPI definition for the Notehub.io API. + +The version of the OpenAPI document: 1.2.0 +Contact: engineering@blues.io +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.personal_access_token_secret import PersonalAccessTokenSecret + + +class TestPersonalAccessTokenSecret(unittest.TestCase): + """PersonalAccessTokenSecret unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PersonalAccessTokenSecret: + """Test PersonalAccessTokenSecret + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `PersonalAccessTokenSecret` + """ + model = PersonalAccessTokenSecret() + if include_optional: + return PersonalAccessTokenSecret( + uid = '', + secret = '' + ) + else: + return PersonalAccessTokenSecret( + ) + """ + + def testPersonalAccessTokenSecret(self): + """Test PersonalAccessTokenSecret""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/test/test_repository_api.py b/src/test/test_repository_api.py deleted file mode 100644 index ef32102..0000000 --- a/src/test/test_repository_api.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" -Notehub API - -The OpenAPI definition for the Notehub.io API. - -The version of the OpenAPI document: 1.2.0 -Contact: engineering@blues.io -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from notehub_py.api.repository_api import RepositoryApi - - -class TestRepositoryApi(unittest.TestCase): - """RepositoryApi unit test stubs""" - - def setUp(self) -> None: - self.api = RepositoryApi() - - def tearDown(self) -> None: - pass - - def test_create_repository(self) -> None: - """Test case for create_repository""" - pass - - def test_create_repository_dataset(self) -> None: - """Test case for create_repository_dataset""" - pass - - def test_delete_repository(self) -> None: - """Test case for delete_repository""" - pass - - def test_delete_repository_dataset(self) -> None: - """Test case for delete_repository_dataset""" - pass - - def test_get_repository(self) -> None: - """Test case for get_repository""" - pass - - def test_get_repository_data(self) -> None: - """Test case for get_repository_data""" - pass - - def test_get_repository_dataset(self) -> None: - """Test case for get_repository_dataset""" - pass - - def test_put_repository(self) -> None: - """Test case for put_repository""" - pass - - def test_query_repository_dataset(self) -> None: - """Test case for query_repository_dataset""" - pass - - def test_query_repository_sql(self) -> None: - """Test case for query_repository_sql""" - pass - - -if __name__ == "__main__": - unittest.main() From efc66a3254a0a30d9c93d9101044a533bb68f68f Mon Sep 17 00:00:00 2001 From: Paige Niedringhaus Date: Wed, 3 Sep 2025 15:59:23 -0400 Subject: [PATCH 3/3] deps: bump project version for PyPI deploy --- config.json | 2 +- src/README.md | 2 +- src/notehub_py/__init__.py | 2 +- src/notehub_py/api_client.py | 2 +- src/notehub_py/configuration.py | 2 +- src/pyproject.toml | 2 +- src/setup.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config.json b/config.json index c8aa722..9817b76 100644 --- a/config.json +++ b/config.json @@ -2,5 +2,5 @@ "packageName": "notehub_py", "packageUrl": "https://github.com/blues/notehub-py", "projectName": "notehub-py", - "packageVersion": "1.0.15" + "packageVersion": "1.0.16" } \ No newline at end of file diff --git a/src/README.md b/src/README.md index a34a100..8d652e2 100644 --- a/src/README.md +++ b/src/README.md @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.2.0 -- Package version: 1.0.15 +- Package version: 1.0.16 - Generator version: 7.5.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://dev.blues.io/support/](https://dev.blues.io/support/) diff --git a/src/notehub_py/__init__.py b/src/notehub_py/__init__.py index d4e2659..770ed00 100644 --- a/src/notehub_py/__init__.py +++ b/src/notehub_py/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "1.0.15" +__version__ = "1.0.16" # import apis into sdk package from notehub_py.api.alert_api import AlertApi diff --git a/src/notehub_py/api_client.py b/src/notehub_py/api_client.py index a4cf08f..b667c01 100644 --- a/src/notehub_py/api_client.py +++ b/src/notehub_py/api_client.py @@ -86,7 +86,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "OpenAPI-Generator/1.0.15/python" + self.user_agent = "OpenAPI-Generator/1.0.16/python" self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/src/notehub_py/configuration.py b/src/notehub_py/configuration.py index 16ecdf2..4443f2d 100644 --- a/src/notehub_py/configuration.py +++ b/src/notehub_py/configuration.py @@ -425,7 +425,7 @@ def to_debug_report(self): "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 1.2.0\n" - "SDK Package Version: 1.0.15".format( + "SDK Package Version: 1.0.16".format( env=sys.platform, pyversion=sys.version ) ) diff --git a/src/pyproject.toml b/src/pyproject.toml index b0f6c73..8c7f3f7 100644 --- a/src/pyproject.toml +++ b/src/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "notehub_py" -version = "1.0.15" +version = "1.0.16" description = "Notehub API" authors = ["Blues Engineering "] license = "MIT" diff --git a/src/setup.py b/src/setup.py index 39ab7b0..188e673 100644 --- a/src/setup.py +++ b/src/setup.py @@ -25,7 +25,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "notehub-py" -VERSION = "1.0.15" +VERSION = "1.0.16" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0",