---
title: "ScorecardService"
url: "https://us-prod.jeffyongtaotang.com/apis/konnect-service-catalog-1/versions/cdbef9b7-686c-4189-bbc8-55c727a972e8/schemas/ScorecardCriteriaService"
---

> Full API specification: https://us-prod.jeffyongtaotang.com/apis/konnect-service-catalog-1/versions/cdbef9b7-686c-4189-bbc8-55c727a972e8.md

# ScorecardService

Service object that includes its evaluation result for the given scorecard criteria.

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Konnect Service Catalog
  version: 1.3.0
servers:
  - url: https://us.api.konghq.com/v1
    description: United-States Production region
  - url: https://eu.api.konghq.com/v1
    description: Europe Production region
  - url: https://au.api.konghq.com/v1
    description: Australia Production region
  - url: https://me.api.konghq.com/v1
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v1
    description: India Production region
  - url: https://sg.api.konghq.com/v1
    description: Singapore Production region
components:
  schemas:
    CustomFields:
      type: object
      x-speakeasy-type-override: any
      description: >
        Map of customizable, catalog-defined fields providing information about
        a service.
      additionalProperties:
        x-convert-oneOf: true
        anyOf:
          - $ref: "#/components/schemas/TextCustomField"
          - $ref: "#/components/schemas/NumericCustomField"
          - $ref: "#/components/schemas/BooleanCustomField"
          - $ref: "#/components/schemas/UrlCustomField"
      example:
        owner: John Appleseed
        dashboard:
          name: On-Call Dashboard
          link: https://my-dashboard-svc.io/dashboards/1
    Labels:
      title: Labels
      type: object
      example:
        env: test
      maxProperties: 50
      description: >
        Labels store metadata of an entity that can be used for filtering an
        entity list or for searching across entity types. 


        Keys must be of length 1-63 characters, and cannot start with "kong",
        "konnect", "mesh", "kic", or "_".
      additionalProperties:
        type: string
        pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$
        minLength: 1
        maxLength: 63
    CreatedAt:
      type: string
      format: date-time
      example: 2022-11-04T20:10:06.927Z
      description: An ISO-8601 timestamp representation of entity creation date.
      readOnly: true
      x-speakeasy-param-suppress-computed-diff: true
    UpdatedAt:
      type: string
      format: date-time
      example: 2022-11-04T20:10:06.927Z
      description: An ISO-8601 timestamp representation of entity update date.
      readOnly: true
      x-speakeasy-param-suppress-computed-diff: true
    ScorecardCriteriaServiceEvaluation:
      type: object
      description: >
        Evaluation for a scorecard criteria relative to the given service
        service.

        Has a `null` value when the criteria has not yet been evaluated for the
        service.
      nullable: true
      required:
        - is_passing
        - evaluation_context
        - evaluation_error
        - successfully_evaluated_at
        - attempted_at
        - created_at
      properties:
        is_passing:
          type: boolean
          description: Whether or not the service has most recently passed the criteria
            check.
        evaluation_context:
          $ref: "#/components/schemas/CriteriaEvaluationResultDetails"
        evaluation_error:
          type: object
          nullable: true
          description: >
            Details about an error that occurred during evaluation preventing
            computation of a pass/fail result.

            Will be `null` when no error occurred.
          required:
            - type
            - details
          properties:
            type:
              type: string
              description: The type of error that occurred.
              example: integration_unauthorized
            details:
              type: string
              description: Human-readable error message about the error.
              example: >
                The GitHub integration is unauthorized. Please ensure that the

                integration is re-authorized for the criteria to be successfully
                evaluated.
          example: null
        attempted_at:
          type: string
          format: date-time
          example: 2023-02-15T07:20:50Z
          description: The timestamp denoting the last evaluation attempt of the criteria
            for the service.
        successfully_evaluated_at:
          type: string
          format: date-time
          example: 2023-02-15T07:20:50Z
          description: >
            The timestamp denoting when the criteria was last successfully
            evaluated for the service.

            Error states preventing the evaluation from being performed will not
            update this timestamp.
        created_at:
          $ref: "#/components/schemas/CreatedAt"
    TextCustomField:
      type: string
      nullable: true
    NumericCustomField:
      type: number
      nullable: true
    BooleanCustomField:
      type: boolean
      nullable: true
    UrlCustomField:
      type: object
      nullable: true
      required:
        - name
        - link
      properties:
        name:
          description: The human-readable name of the URL link.
          type: string
          example: On-Call Dashboard
        link:
          description: The href value of the URL link.
          type: string
          format: uri-reference
          example: https://my-dashboard-svc.io/dashboards/1
    CriteriaEvaluationResultDetails:
      type: object
      description: Provides additional metadata about the criteria evaluation result.
      nullable: true
      required:
        - raw_value
        - display_text
      properties:
        raw_value:
          description: >
            Raw value of the criteria evaluation.


            For example, a service may be failing the `time_to_acknowledge`
            criteria evaluation when

            the the mean time-to-ack is greater than 15 minutes. This value
            represents the _actual_

            mean time-to-ack value for the service which if not passing could be
            25 minutes.
          oneOf:
            - type: number
            - type: string
            - type: boolean
            - $ref: "#/components/schemas/TimeValue"
            - $ref: "#/components/schemas/CriteriaEvaluationRelationMap"
            - type: object
              additionalProperties: true
            - nullable: true
        display_text:
          type: string
          example: 25 minutes
          description: Renderable text providing human-readable context about the
            evaluation value.
      example:
        raw_value:
          unit: minutes
          value: 25
        display_text: 25 minutes
    TimeValue:
      type: object
      description: Represents a time value inclusive of units.
      required:
        - value
        - unit
      properties:
        value:
          type: number
          example: 3.25
        unit:
          type: string
          example: hours
          enum:
            - milliseconds
            - seconds
            - minutes
            - hours
            - days
            - months
            - years
    CriteriaEvaluationRelationMap:
      type: object
      required:
        - instance
        - relation
        - map
      properties:
        instance:
          type: string
          enum:
            - criteria_result_relation_map
        relation:
          type: string
          example: gateway_svc
        map:
          additionalProperties:
            oneOf:
              - $ref: "#/components/schemas/CriteriaEvaluationRelationResult"
              - $ref: "#/components/schemas/CriteriaEvaluationErrorResult"
    CriteriaEvaluationRelationResult:
      type: object
      required:
        - is_passing
        - relation
        - details
      properties:
        is_passing:
          type: boolean
          description: Whether or not the relation has passed the criteria evaluation.
        relation:
          type: object
          required:
            - id
            - name
          properties:
            id:
              type: string
            name:
              type: string
        details:
          $ref: "#/components/schemas/CriteriaEvaluationResultDetails"
    CriteriaEvaluationErrorResult:
      type: object
      required:
        - relation
        - error
      properties:
        relation:
          type: object
          required:
            - id
            - name
          properties:
            id:
              type: string
            name:
              type: string
        error:
          type: object
          nullable: true
          description: >
            Details about an error that occurred during evaluation preventing
            computation of a pass/fail result.

            Will be `null` when no error occurred.
          required:
            - type
            - details
          properties:
            type:
              type: string
              description: The type of error that occurred.
              example: integration_unauthorized
            details:
              type: string
              description: Human-readable error message about the error.
              example: >
                The GitHub integration is unauthorized. Please ensure that the

                integration is re-authorized for the criteria to be successfully
                evaluated.
          example: null
    ScorecardCriteriaService:
      title: ScorecardService
      description: Service object that includes its evaluation result for the given
        scorecard criteria.
      type: object
      required:
        - id
        - name
        - display_name
        - description
        - custom_fields
        - labels
        - created_at
        - updated_at
        - evaluation
      properties:
        id:
          type: string
          format: uuid
          example: 7f9fd312-a987-4628-b4c5-bb4f4fddd5f7
          description: The service ID.
          readOnly: true
        name:
          type: string
          description: >
            The machine name of the Service that uniquely identifies it within
            the catalog.
          minLength: 1
          maxLength: 120
          pattern: ^[0-9a-z.-]+$
          example: user-svc
        display_name:
          type: string
          description: The display name of the Service.
          minLength: 1
          maxLength: 120
          example: User Service
        description:
          type: string
          description: Optionally provide a description of the Service.
          nullable: true
          maxLength: 2048
        custom_fields:
          $ref: "#/components/schemas/CustomFields"
        labels:
          $ref: "#/components/schemas/Labels"
        created_at:
          $ref: "#/components/schemas/CreatedAt"
        updated_at:
          $ref: "#/components/schemas/UpdatedAt"
        score:
          $ref: "#/components/schemas/ScorecardCriteriaServiceEvaluation"
```
