Services

Type of dynamic fields

There are two main types of dynamic fields for the service catalogs:

Local properties

Local properties are those properties that directly belong to a service; these fields are:

  • id

  • name

  • createdBy

  • metaTags

You can use these dynamic fields like code shown below:

[
  {
    "type": "text",
    "title": "Service id",
    "payloadName": "service_id",
    "defaultValue": "{{service.id}}"
  },
  {
    "type": "text",
    "title": "Service name",
    "payloadName": "service_name",
    "defaultValue": "{{service.name}}"
  },
  {
    "type": "text",
    "title": "Service created by",
    "payloadName": "service_createdBy",
    "defaultValue": "{{service.createdBy}}"
  },
  {
    "type": "dropdown",
    "title": "Service meta tags",
    "payloadName": "service_metatag",
    "dataset": {
      "data": "{{service.metaTags()}}",
      "label": "name",
      "value": "value"
    }
  }
]

Meta tags are the only local field that can be used in dropdown dataset fields if you want to use one specific metatag value as a default value in text fields.

So if you have some meta tags in your application as shown below, It will be rendered as a drop-down with those meta tags. To use meta tags in webhook headers webhook payload, you have to use the text version.

Relation properties

Relation properties load up other catalogs related to the chosen one, and you can also access those fields.

Applications

You can load up applications connected to a service using this syntax to get a list of service applications, to be shown as a drop-down below. Using this type of syntax will result in the following drop-down on the run action popup:

[
// ... other user inputs
    {
        "type": "dropdown",
        "payloadName": "service_app",
        "title": "Service applications",
        "dataset": {
            "data": "{{service.applications()}}",
            "label": "name",
            "value": "id"
        }
    }
// ... other user inputs
]

This will only bring up to 50 first applications for the service.

It is also possible to use one specific application for a text field and use a supported service.applications fields:

  • id

  • name

  • createdBy

  • metaTags

Example user inputs
[
  {
    "type": "text",
    "title": "Service application id",
    "payloadName": "service_app_id",
    "defaultValue": "{{service.applications('aee0c488-92e2-42a9-8ff8-4bb6822969db').id}}"
  },
  {
    "type": "text",
    "title": "Service application name",
    "payloadName": "service_app_name",
    "defaultValue": "{{service.applications('aee0c488-92e2-42a9-8ff8-4bb6822969db').name}}"
  },
  {
    "type": "text",
    "title": "Service application created by",
    "payloadName": "service_app_created_by",
    "defaultValue": "{{service.applications('aee0c488-92e2-42a9-8ff8-4bb6822969db').createdBy}}"
  },
  {
    "type": "dropdown",
    "title": "Service application meta tags",
    "payloadName": "service_app_metatags",
    "dataset": {
      "data": "{{service.applications('aee0c488-92e2-42a9-8ff8-4bb6822969db').metaTags()}}",
      "label": "name",
      "value": "id"
    }
  }
]

Environments

You can load up environments connected to a service using this syntax for getting a list of service environments, to be shown as a drop-down. Using this type of syntax will result in the following drop-down on the run action popup:

[
// ... other user inputs
    {
        "type": "dropdown",
        "payloadName": "service_env",
        "title": "Service environments",
        "dataset": {
            "data": "{{service.environments()}}",
            "label": "name",
            "value": "id"
        }
    }
// ... other user inputs
]

This will only bring up to 50 first environments for the service.

It is also possible to use one specific application for a text field and use a supported service.applications fields:

  • id

  • name

  • createdBy

  • metaTags

Example user inputs
[
  {
    "type": "text",
    "title": "Service environment id",
    "payloadName": "service_env_id",
    "defaultValue": "{{service.environments('c111019d-ac03-466d-819a-8ff071bd3ca9').id}}"
  },
  {
    "type": "text",
    "title": "Service environments name",
    "payloadName": "service_env_name",
    "defaultValue": "{{service.environments('c111019d-ac03-466d-819a-8ff071bd3ca9').name}}"
  },
  {
    "type": "text",
    "title": "Service environment created by",
    "payloadName": "service_env_created_by",
    "defaultValue": "{{service.environments('c111019d-ac03-466d-819a-8ff071bd3ca9').createdBy}}"
  },
  {
    "type": "dropdown",
    "title": "Service environment meta tags",
    "payloadName": "service_env_metatags",
    "dataset": {
      "data": "{{service.environments('c111019d-ac03-466d-819a-8ff071bd3ca9').metaTags()}}",
      "label": "name",
      "value": "id"
    }
  }
]

Repository

Because every service is attached only to one repository, the only relation that is not usable is dropdowns, and its syntax is different than other relations.

You can load up a repository connected to a service using this syntax to get its info for a text field and use the supported service.applications fields:

  • id

  • name

  • languages

  • location

  • provider

  • providerAccountId

  • providerResourceId

  • providerResourceKey

  • providerResourceType

  • url

Example user inputs
[
  {
    "type": "text",
    "title": "Service repository id",
    "payloadName": "service_repo_id",
    "defaultValue": "{{service.repository.id}}"
  },
  {
    "type": "text",
    "title": "Service repository name",
    "payloadName": "service_repo_name",
    "defaultValue": "{{service.repository.name}}"
  },
  {
    "type": "text",
    "title": "Service repository location",
    "payloadName": "service_repo_location",
    "defaultValue": "{{service.repository.location}}"
  },
  {
    "type": "text",
    "title": "Service repository provider",
    "payloadName": "service_repo_provider",
    "defaultValue": "{{service.repository.provider}}"
  },
  {
    "type": "text",
    "title": "Service repository provider account id",
    "payloadName": "service_repo_providerAccountId",
    "defaultValue": "{{service.repository.providerAccountId}}"
  },
  {
    "type": "text",
    "title": "Service repository provider resource key",
    "payloadName": "service_repo_providerResourceKey",
    "defaultValue": "{{service.repository.providerResourceKey}}"
  },
  {
    "type": "text",
    "title": "Service repository provider resource type",
    "payloadName": "service_repo_providerResourceType",
    "defaultValue": "{{service.repository.providerResourceType}}"
  },
  {
    "type": "text",
    "title": "Service repository URL",
    "payloadName": "service_repo_url",
    "defaultValue": "{{service.repository.url}}"
  },
  {
    "type": "dropdown",
    "title": "Service repository language",
    "payloadName": "service_repo_lan",
    "dataset": {
      "data": "{{service.repository.languages()}}",
      "label": "name",
      "value": "lines"
    }
  }
]

Scorecards

You can load up scorecards connected to a service using this syntax for getting a list of service scorecards, to be shown as a drop-down. Using this type of syntax will result in the following drop-down on the run action popup:

[
// ... other user inputs
  {
    "type": "dropdown",
    "title": "Service scorecards",
    "payloadName": "service_scorecards",
    "dataset": {
      "data": "{{service.scorecards()}}",
      "label": "name",
      "value": "id"
    }
  }
// ... other user inputs
]

This will only bring up to 50 first scorecards for the service.

It is also possible to use one specific scorecard for a text field and use a supported service.scorecards fields:

  • id

  • name

  • evaluateFailed

  • evaluatePassed

  • evaluatePercentage

  • evaluateServicesPercentage

  • evaluateTotal

  • evaluatedAt

  • isEvaluating

  • createdBy

Example user inputs
[
  {
    "type": "text",
    "title": "Service scorecard id",
    "payloadName": "service_sc_id",
    "defaultValue": "{{service.scorecards('a3b67339-05c4-42de-be9c-a9773642a5ef').id}}"
  },
  {
    "type": "text",
    "title": "Service scorecard name",
    "payloadName": "service_sc_name",
    "defaultValue": "{{service.scorecards('a3b67339-05c4-42de-be9c-a9773642a5ef').name}}"
  },
  {
    "type": "text",
    "title": "Service scorecard evaluation failed",
    "payloadName": "service_sc_eval_failed",
    "defaultValue": "{{service.scorecards('a3b67339-05c4-42de-be9c-a9773642a5ef').evaluateFailed}}"
  },
  {
    "type": "text",
    "title": "Service scorecard evaluation passed",
    "payloadName": "service_sc_eval_passed",
    "defaultValue": "{{service.scorecards('a3b67339-05c4-42de-be9c-a9773642a5ef').evaluatePassed}}"
  },
  {
    "type": "text",
    "title": "Service scorecard evaluation percentage",
    "payloadName": "service_sc_eval_percentage",
    "defaultValue": "{{service.scorecards('a3b67339-05c4-42de-be9c-a9773642a5ef').evaluatePercentage}}"
  },
  {
    "type": "text",
    "title": "Service scorecard services evaluation percentage",
    "payloadName": "service_sc_eval_servicesPercentage",
    "defaultValue": "{{service.scorecards('a3b67339-05c4-42de-be9c-a9773642a5ef').evaluateServicesPercentage}}"
  },
  {
    "type": "text",
    "title": "Service scorecard evaluation total",
    "payloadName": "service_sc_evalTotal",
    "defaultValue": "{{service.scorecards('a3b67339-05c4-42de-be9c-a9773642a5ef').evaluateTotal}}"
  },
  {
    "type": "text",
    "title": "Service scorecard evaluated at",
    "payloadName": "service_sc_evalAt",
    "defaultValue": "{{service.scorecards('a3b67339-05c4-42de-be9c-a9773642a5ef').evaluatedAt}}"
  },
  {
    "type": "text",
    "title": "Service scorecard is evaluating",
    "payloadName": "service_sc_isEvaluating",
    "defaultValue": "{{service.scorecards('a3b67339-05c4-42de-be9c-a9773642a5ef').isEvaluating}}"
  },
  {
    "type": "text",
    "title": "Service scorecard created by",
    "payloadName": "service_sc_createdBy",
    "defaultValue": "{{service.scorecards('a3b67339-05c4-42de-be9c-a9773642a5ef').createdBy}}"
  }
]

Last updated

Copyright © 2023 configure8, Inc. All rights reserved.