Skip to main content
Skip table of contents

How to Upload and Query App Configuration Files in SICON.FINDER

Step 1: Upload Configuration File

Note: User accounts for SICON.FINDER are created by GPS.

Config File format

JSON
{
  "appVendor": "schmalz", // Required
  "appName": "device-monitoring", // Required
  "vendorId": 234, // optional
  "deviceId": 100212, // optional
  "version": "1.0", // optional
  "meta": {} // Actual configuration
}

The version field is of the format <Breaking>.<Major> with an optional <Minor> number at the end
Example: “version”: “1.0.1” is also supported


Step 2: Querying the Configuration files from an App

  • The configuration files can be fetched using the GraphQL endpoint of the Finder:
    👉 https://finder-api.service.sicon.eco/graphql

  • The above given endpoint also has a front-end to test the GraphQL queries.

    • An API Token provided by GPS is required to be able to query the endpoint.

    • Include the API Token in the HTTP Headers using the AUTHORIZATION field.

image-20250610-101101.png

Below is a sample query demonstrating how to retrieve configuration files for a specific app (e.g., Device Monitoring): 👇

GRAPHQL
query {
  configurations(
    pagination: { page: 1, pageSize: 1000 }
    filters: {
    app: {
      name: {eq: "Device Monitoring"}
    }
  }) {
    data {
      id
      attributes {
        version
        app {
          data {
            id
            attributes {
              name
              dockerImage
            }
          }
        }
        devices {
          data {
            id
            attributes {
              deviceId
              productName
              vendor{
                data{
                  attributes{
                    vendorId
                    name
                  }
                }
              }
            }
          }
        }
        meta
        configFile {
          data {
            id
            attributes {
              name
              url
            }
          }
        }
      }
    }
  }
}

Understanding the attributes and data types of configurations

Configurations

  • version - <string> - Describes the version of the configuration

  • meta - <JSON object> - The actual configuration content

  • app - App details (relation)

    • name - <string> - Name of the app

    • dockerImage - <String> - Docker image name of the app

  • devices - Device details (relation)

    • deviceId - <int> - ID of the device

    • productName - <string> - Name of the device

    • vendor - Details of the Vendor (relation)

      • vendorId - <int> - ID of the Vendor

      • name - <string> - Vendor name

  • configFile - Config file details (relation)

    • name - <string> - Name of the config file

    • url - <string> - The file path (relative to finder’s base URL) where the config file can be downloaded using REST API
      Ex: GET https://finder-api.service.sicon.eco/<url>

Filtering the configurations

1. Filter by app name

GRAPHQL
configurations(
    pagination: { page: 1, pageSize: 1000 }
    filters: {
    app: {
      name: {eq: "Device Monitoring"}
    }
  })

2. Filter by version

GRAPHQL
configurations(
    pagination: { page: 1, pageSize: 1000 }
    filters: {
    version: { startsWith: "1.0" }
  })

4. Filter by app name, deviceId and vendorId

GRAPHQL
configurations(
    pagination: { page: 1, pageSize: 1000 }
    filters: {
    app: {
      name: {eq: "Device Monitoring"}
    }
    devices: {
        deviceId: { eq: 100243 }
        vendor: {
          vendorId: { eq: 234 }
        }
      }
  })

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.