---
title: "Upsert a Degraphql_route associated with a Service in a workspace"
url: "https://nov18-dev.movespot.fyi/apis/konnect-control-planes-configuration-dev-3/versions/76e259e8-9e78-4c0e-ab4a-3df25bddc4f1/operations/upsert-degraphql_route-with-service-in-workspace"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-control-planes-configuration-dev-3/versions/76e259e8-9e78-4c0e-ab4a-3df25bddc4f1.md

# Upsert a Degraphql_route associated with a Service in a workspace

`PUT` `/control-planes/{controlPlaneId}/core-entities/{workspace}/services/{ServiceId}/degraphql/routes/{Degraphql_routeId}`

Operation ID: `upsert-degraphql_route-with-service-in-workspace`

Create or Update a Degraphql_route associated with a Service using ID or name in a workspace.

## Path parameters

- `controlPlaneId` (string, uuid, required) - The UUID of your control plane. This variable is available in the Konnect manager.
- `ServiceId` (string, required) - ID of the Service to lookup
- `Degraphql_routeId` (string, required) - ID of the Degraphql_route to lookup
- `workspace` (string, string, required) - The name of the workspace

## Request body (required)

Content types: `application/json`

## Responses

- `200` - Successfully upserted Degraphql_route

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Konnect Control Planes Configuration
  version: 3.14.0
servers:
  - url: https://us.api.konghq.com/v2
    description: United-States Production region
  - url: https://eu.api.konghq.com/v2
    description: Europe Production region
  - url: https://au.api.konghq.com/v2
    description: Australia Production region
  - url: https://me.api.konghq.com/v2
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v2
    description: India Production region
  - url: https://sg.api.konghq.com/v2
    description: Singapore Production region
paths:
  /control-planes/{controlPlaneId}/core-entities/{workspace}/services/{ServiceId}/degraphql/routes/{Degraphql_routeId}:
    parameters:
      - $ref: "#/components/parameters/controlPlaneId"
    put:
      operationId: upsert-degraphql_route-with-service-in-workspace
      summary: Upsert a Degraphql_route associated with a Service in a workspace
      description: Create or Update a Degraphql_route associated with a Service using
        ID or name in a workspace.
      parameters:
        - $ref: "#/components/parameters/ServiceId"
        - $ref: "#/components/parameters/Degraphql_routeId"
        - $ref: "#/components/parameters/Workspace"
      requestBody:
        description: Description of the Degraphql_route
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Degraphql_routeWithoutParents"
      responses:
        "200":
          description: Successfully upserted Degraphql_route
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Degraphql_route"
      tags:
        - Degraphql_routes
security:
  - konnectAccessToken: []
  - personalAccessToken: []
components:
  parameters:
    controlPlaneId:
      name: controlPlaneId
      in: path
      required: true
      schema:
        type: string
        format: uuid
        example: 9524ec7d-36d9-465d-a8c5-83a3c9390458
      description: The UUID of your control plane. This variable is available in the
        Konnect manager.
    ServiceId:
      description: ID of the Service to lookup
      example: 7fca84d6-7d37-4a74-a7b0-93e576089a41
      in: path
      name: ServiceId
      required: true
      schema:
        type: string
    Degraphql_routeId:
      description: ID of the Degraphql_route to lookup
      example: ""
      in: path
      name: Degraphql_routeId
      required: true
      schema:
        type: string
    Workspace:
      description: The name of the workspace
      in: path
      name: workspace
      required: true
      schema:
        type: string
        format: string
        example: team-payments
  schemas:
    Degraphql_routeWithoutParents:
      type: object
      properties:
        created_at:
          description: Unix epoch when the resource was created.
          type: integer
          nullable: true
        description:
          description: User-defined entity description. Konnect only field, not synced to
            the Gateway.
          type: string
          nullable: true
        id:
          description: A string representing a UUID (universally unique identifier).
          type: string
          nullable: true
        managed_by:
          description: Arbitrary JSON data for client responsible for managing the entity.
            Konnect only field, not synced to the Gateway.
          type: object
          additionalProperties: true
          nullable: true
        methods:
          type: array
          items:
            description: A string representing an HTTP method, such as GET, POST, PUT, or
              DELETE. The string must contain only uppercase letters.
            type: string
          default:
            - GET
          nullable: true
        query:
          type: string
        service:
          type: object
          properties:
            id:
              type: string
          x-foreign: true
        updated_at:
          description: Unix epoch when the resource was last updated.
          type: integer
          nullable: true
        uri:
          type: string
      example:
        id: 56c4566c-14cc-4132-9011-4139fcbbe50a
        query: query{ user { email } }
        uri: /users
      additionalProperties: false
      required:
        - query
        - uri
    Degraphql_route:
      type: object
      properties:
        created_at:
          description: Unix epoch when the resource was created.
          type: integer
          nullable: true
        description:
          description: User-defined entity description. Konnect only field, not synced to
            the Gateway.
          type: string
          nullable: true
        id:
          description: A string representing a UUID (universally unique identifier).
          type: string
          nullable: true
        managed_by:
          description: Arbitrary JSON data for client responsible for managing the entity.
            Konnect only field, not synced to the Gateway.
          type: object
          additionalProperties: true
          nullable: true
        methods:
          type: array
          items:
            description: A string representing an HTTP method, such as GET, POST, PUT, or
              DELETE. The string must contain only uppercase letters.
            type: string
          default:
            - GET
          nullable: true
        query:
          type: string
        service:
          type: object
          properties:
            id:
              type: string
          x-foreign: true
        updated_at:
          description: Unix epoch when the resource was last updated.
          type: integer
          nullable: true
        uri:
          type: string
      example:
        id: 56c4566c-14cc-4132-9011-4139fcbbe50a
        query: query{ user { email } }
        service:
          id: bd380f99-659d-415e-b0e7-72ea05df3218
        uri: /users
      additionalProperties: false
      required:
        - query
        - uri
        - service
  securitySchemes:
    konnectAccessToken:
      type: http
      scheme: bearer
      description: The Konnect access token is meant to be used by the Konnect
        dashboard and the decK CLI to authenticate with.
    personalAccessToken:
      type: http
      scheme: bearer
      description: The personal access token is meant to be used as an alternative to
        basic-auth when accessing Konnect via APIs. You can generate a Personal
        Access Token (PAT) from the personal access token page in the Konnect
        dashboard.
```
