---
title: "ServiceSelector"
url: "https://dev-portal.dehaven.org/apis/konnect-service-catalog-1-2-0/versions/5f6559bf-d7ba-429c-95c4-cbf2371e663f/schemas/ServiceSelector"
---

> Full API specification: https://dev-portal.dehaven.org/apis/konnect-service-catalog-1-2-0/versions/5f6559bf-d7ba-429c-95c4-cbf2371e663f.md

# ServiceSelector

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Konnect Service Catalog
  version: 1.2.0
servers:
  - url: https://us.api.konghq.com/v1
    description: US Region Base URL
  - url: https://eu.api.konghq.com/v1
    description: EU Region Base URL
  - url: https://au.api.konghq.com/v1
    description: AU Region Base URL
  - url: https://me.api.konghq.com/v1
    description: ME Region Base URL
  - url: https://in.api.konghq.com/v1
    description: IN Region Base URL
components:
  schemas:
    AllEntitiesSelector:
      type: object
      description: Entity selector that includes all entities of the given type within
        the catalog.
      required:
        - type
        - parameters
      properties:
        type:
          type: string
          enum:
            - all
        parameters:
          type: string
          enum:
            - null
          nullable: true
    ByIDsSelector:
      type: object
      description: Entity selector that includes entities contained within a list of IDs.
      required:
        - type
        - parameters
      properties:
        type:
          type: string
          enum:
            - ids
        parameters:
          type: object
          required:
            - ids
          properties:
            ids:
              type: array
              items:
                type: string
                format: uuid
    ByNameSelector:
      type: object
      description: Entity selector that includes entities by `name`.
      required:
        - type
        - parameters
      properties:
        type:
          type: string
          enum:
            - name
        parameters:
          $ref: "#/components/schemas/StringFieldSelectorParams"
    ByDisplayNameSelector:
      type: object
      description: Entity selector that includes entities by `display_name`.
      required:
        - type
        - parameters
      properties:
        type:
          type: string
          enum:
            - display_name
        parameters:
          $ref: "#/components/schemas/StringFieldSelectorParams"
    ByCustomFieldSelector:
      type: object
      description: Entity selector that include entities by a custom field.
      required:
        - type
        - parameters
      properties:
        type:
          type: string
          enum:
            - custom_field
        parameters:
          oneOf:
            - type: object
              title: StringCustomFieldSelectorParams
              required:
                - field
                - value
                - operator
              properties:
                field:
                  type: string
                  description: Name of the custom field.
                value:
                  type: string
                operator:
                  $ref: "#/components/schemas/StringSelectorOperator"
            - type: object
              title: NumberCustomFieldSelectorParams
              required:
                - field
                - value
                - operator
              properties:
                field:
                  type: string
                  description: Name of the custom field.
                value:
                  type: number
                operator:
                  $ref: "#/components/schemas/NumberSelectorOperator"
            - type: object
              title: BooleanCustomFieldSelectorParams
              required:
                - field
                - value
                - operator
              properties:
                field:
                  type: string
                  description: Name of the custom field.
                value:
                  type: boolean
                operator:
                  $ref: "#/components/schemas/BooleanSelectorOperator"
            - type: object
              title: UrlCustomFieldSelectorParams
              required:
                - field
                - subfield
                - value
                - operator
              properties:
                field:
                  type: string
                  description: Name of the custom field.
                subfield:
                  type: string
                  enum:
                    - name
                    - link
                  description: Specify which subfield of the `url` custom field value to use for
                    selection.
                value:
                  type: string
                operator:
                  $ref: "#/components/schemas/StringSelectorOperator"
    ByLabelSelector:
      type: object
      description: Entity selector that includes entities by `label` value.
      required:
        - type
        - parameters
      properties:
        type:
          type: string
          enum:
            - label
        parameters:
          x-flatten-allOf: true
          allOf:
            - $ref: "#/components/schemas/StringFieldSelectorParams"
            - type: object
              title: LabelSelectorParams
              required:
                - label_key
              properties:
                label_key:
                  type: string
    HasLabelKeySelector:
      type: object
      description: Entity selector that includes entities by inclusion of a `label` key.
      required:
        - type
        - parameters
      properties:
        type:
          type: string
          enum:
            - has_label_key
        parameters:
          type: object
          title: HasLabelKeySelectorParams
          required:
            - label_key
          properties:
            label_key:
              type: string
    HasDocsSelector:
      type: object
      description: Entity selector to include entities by attached documentation.
      required:
        - type
        - parameters
      properties:
        type:
          type: string
          enum:
            - has_docs
        parameters:
          type: string
          enum:
            - null
          nullable: true
    HasApisSelector:
      type: object
      description: Entity selector that includes services by attached APIs.
      required:
        - type
        - parameters
      properties:
        type:
          type: string
          enum:
            - has_apis
        parameters:
          $ref: "#/components/schemas/HasSelectorParams"
    HasResourcesSelector:
      type: object
      description: Entity selector that includes services by mapped resources.
      required:
        - type
        - parameters
      properties:
        type:
          type: string
          enum:
            - has_resources
        parameters:
          x-flatten-allOf: true
          allOf:
            - $ref: "#/components/schemas/HasSelectorParams"
            - type: object
              title: HasResourcesSelectorParams
              required:
                - resource_type
                - integration
              properties:
                resource_type:
                  $ref: "#/components/schemas/CatalogResourceType"
                integration:
                  type: string
                  description: The machine name of the integration that uniquely identifies it
                    within the catalog.
                  example: gateway-manager
    StringFieldSelectorParams:
      type: object
      required:
        - operator
        - value
      properties:
        operator:
          $ref: "#/components/schemas/StringSelectorOperator"
        value:
          type: string
    StringSelectorOperator:
      type: string
      enum:
        - equals
        - contains
    NumberSelectorOperator:
      type: string
      enum:
        - equals
        - less_than
        - greater_than
    BooleanSelectorOperator:
      type: string
      enum:
        - equals
    HasSelectorParams:
      type: object
      required:
        - operator
        - value
      properties:
        operator:
          $ref: "#/components/schemas/HasRelationshipSelectorOperator"
        value:
          type: number
    CatalogResourceType:
      type: string
      description: >
        The resource type. Available resource types are compiled from the
        integrations installed within the catalog.
      minLength: 1
      maxLength: 120
      example: gateway_svc
    HasRelationshipSelectorOperator:
      type: string
      enum:
        - exactly
        - at_least
        - at_most
    ServiceSelector:
      oneOf:
        - $ref: "#/components/schemas/AllEntitiesSelector"
        - $ref: "#/components/schemas/ByIDsSelector"
        - $ref: "#/components/schemas/ByNameSelector"
        - $ref: "#/components/schemas/ByDisplayNameSelector"
        - $ref: "#/components/schemas/ByCustomFieldSelector"
        - $ref: "#/components/schemas/ByLabelSelector"
        - $ref: "#/components/schemas/HasLabelKeySelector"
        - $ref: "#/components/schemas/HasDocsSelector"
        - $ref: "#/components/schemas/HasApisSelector"
        - $ref: "#/components/schemas/HasResourcesSelector"
```
