---
title: "Inserts or updates a DCR provider"
url: "https://nov18-dev.movespot.fyi/apis/internal-api-builder-v1-1/versions/37dd8750-3a87-4f5b-aa5c-d7d8aa14eea8/operations/update-dcr-provider"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/internal-api-builder-v1-1/versions/37dd8750-3a87-4f5b-aa5c-d7d8aa14eea8.md

# Inserts or updates a DCR provider

`PUT` `/internal/dcr-providers/{dcrProviderId}`

Operation ID: `update-dcr-provider`

Accepts a raw database representation of the DCR Provider in the response body

## Path parameters

- `dcrProviderId` (string, uuid, required) - DCR provider identifier

## Request body (required)

Content types: `application/json`

## Responses

- `200` - A response containing a single DCR provider object.
- `400` - Bad Request
- `401` - Unauthorized
- `403` - Forbidden
- `404` - Not Found

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Internal API-Builder v1
  version: 1.0.13
servers:
  - url: builder.apibuilder.svc.cluster.local:3000/v1
    description: Konnect cluster
paths:
  /internal/dcr-providers/{dcrProviderId}:
    parameters:
      - $ref: "#/components/parameters/DcrProviderId"
    put:
      operationId: update-dcr-provider
      summary: Inserts or updates a DCR provider
      description: >
        Accepts a raw database representation of the DCR Provider in the
        response body
      requestBody:
        $ref: "#/components/requestBodies/PutDcrProvider"
      responses:
        "200":
          $ref: "#/components/responses/PutDcrProviderResponse"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - DCR Providers
components:
  parameters:
    DcrProviderId:
      name: dcrProviderId
      description: DCR provider identifier
      in: path
      required: true
      schema:
        type: string
        format: uuid
        example: ebbac5b0-ac89-45c3-9d2e-c4542c657e79
  requestBodies:
    PutDcrProvider:
      required: true
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/PutDcrProviderRequest"
          examples:
            DcrProviderRequest:
              $ref: "#/components/examples/DcrProviderPutRequest"
  responses:
    PutDcrProviderResponse:
      description: A response containing a single DCR provider object.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/DcrProviderResponse"
          examples:
            DcrProviderResponse:
              $ref: "#/components/examples/DcrProviderResponse"
    BadRequest:
      description: Bad Request
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/BadRequestError"
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/UnauthorizedError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/UnauthorizedExample"
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ForbiddenError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/ForbiddenExample"
    NotFound:
      description: Not Found
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/NotFoundError"
          examples:
            NotFoundExample:
              $ref: "#/components/examples/NotFoundExample"
  schemas:
    PutDcrProviderRequest:
      description: Updates a DCR provider.
      type: object
      allOf:
        - $ref: "#/components/schemas/DcrProvider"
      title: UpdateDcrProviderRequest
    DcrProviderResponse:
      description: A response containing a raw database representation of the DCR Provider.
      type: object
      allOf:
        - $ref: "#/components/schemas/DcrProvider"
    BadRequestError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          required:
            - invalid_parameters
          properties:
            invalid_parameters:
              $ref: "#/components/schemas/InvalidParameters"
    UnauthorizedError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 401
            title:
              example: Unauthorized
            type:
              example: https://httpstatuses.com/401
            instance:
              example: kong:trace:1234567890
            detail:
              example: Invalid credentials
    ForbiddenError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 403
            title:
              example: Forbidden
            type:
              example: https://httpstatuses.com/403
            instance:
              example: kong:trace:1234567890
            detail:
              example: Forbidden
    NotFoundError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 404
            title:
              example: Not Found
            type:
              example: https://httpstatuses.com/404
            instance:
              example: kong:trace:1234567890
            detail:
              example: Not found
    DcrProvider:
      type: object
      properties:
        id:
          type: string
          format: uuid
        org_id:
          type: string
          format: uuid
        name:
          $ref: "#/components/schemas/DcrProviderName"
        provider_type:
          description: The type of DCR provider. Can be one of the following - auth0,
            azureAd, curity, okta, http, kongIdentity
          type: string
          enum:
            - auth0
            - azureAd
            - curity
            - okta
            - http
            - kongIdentity
        issuer:
          type: string
          format: url
          maxLength: 256
        labels:
          $ref: "#/components/schemas/LabelsUpdate"
        dcr_config:
          anyOf:
            - $ref: "#/components/schemas/UpdateDcrConfigAuth0InRequest"
            - $ref: "#/components/schemas/UpdateDcrConfigAzureAdInRequest"
            - $ref: "#/components/schemas/UpdateDcrConfigCurityInRequest"
            - $ref: "#/components/schemas/UpdateDcrConfigOktaInRequest"
            - $ref: "#/components/schemas/UpdateDcrConfigHttpInRequest"
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - name
        - provider_type
        - issuer
        - dcr_config
        - org_id
        - created_at
        - updated_at
      title: DcrProvider
    BaseError:
      description: standard error
      type: object
      properties:
        status:
          description: >
            The HTTP status code of the error. Useful when passing the response

            body to child properties in a frontend UI. Must be returned as an
            integer.
          type: integer
          readOnly: true
        title:
          description: |
            A short, human-readable summary of the problem. It should not
            change between occurences of a problem, except for localization.
            Should be provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
        type:
          description: The error type.
          type: string
          readOnly: true
        instance:
          description: |
            Used to return the correlation ID back to the user, in the format
            kong:trace:<correlation_id>. This helps us find the relevant logs
            when a customer reports an issue.
          type: string
          readOnly: true
        detail:
          description: >
            A human readable explanation specific to this occurence of the
            problem.

            This field may contain request/entity data to help the user
            understand

            what went wrong. Enclose variable values in square brackets. Should
            be

            provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
      required:
        - status
        - title
        - instance
        - detail
      title: Error
    InvalidParameters:
      description: invalid parameters
      type: array
      items:
        oneOf:
          - $ref: "#/components/schemas/InvalidParameterStandard"
          - $ref: "#/components/schemas/InvalidParameterMinimumLength"
          - $ref: "#/components/schemas/InvalidParameterMaximumLength"
          - $ref: "#/components/schemas/InvalidParameterChoiceItem"
          - $ref: "#/components/schemas/InvalidParameterDependentItem"
      minItems: 1
      nullable: false
      uniqueItems: true
    DcrProviderName:
      description: >
        The name of the DCR provider. This is used to identify the DCR provider
        in the Konnect UI.
      type: string
      maxLength: 256
      minLength: 1
    LabelsUpdate:
      description: >
        Labels store metadata of an entity that can be used for filtering an
        entity list or for searching across entity types. 


        Labels are intended to store **INTERNAL** metadata.


        Keys must be of length 1-63 characters, and cannot start with "kong",
        "konnect", "mesh", "kic", or "_".
      type: object
      example:
        env: test
      additionalProperties:
        type: string
        pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$
        minLength: 1
        maxLength: 63
        nullable: true
      maxProperties: 50
      nullable: true
      writeOnly: true
    UpdateDcrConfigAuth0InRequest:
      description: Payload to update an Auth0 DCR provider.
      type: object
      properties:
        initial_client_id:
          $ref: "#/components/schemas/DcrConfigPropertyInitialClientId"
        initial_client_secret:
          $ref: "#/components/schemas/DcrConfigPropertyInitialClientSecret"
        initial_client_audience:
          $ref: "#/components/schemas/DcrConfigPropertyInitialClientAudience"
        use_developer_managed_scopes:
          type: boolean
      additionalProperties: false
      title: DcrConfigAuth0InRequest
    UpdateDcrConfigAzureAdInRequest:
      description: Payload to update an Azure AD DCR provider.
      type: object
      properties:
        initial_client_id:
          $ref: "#/components/schemas/DcrConfigPropertyInitialClientId"
        initial_client_secret:
          $ref: "#/components/schemas/DcrConfigPropertyInitialClientSecret"
      additionalProperties: false
      title: DcrConfigAzureAdInRequest
    UpdateDcrConfigCurityInRequest:
      description: Payload to update a Curity DCR provider.
      type: object
      properties:
        initial_client_id:
          $ref: "#/components/schemas/DcrConfigPropertyInitialClientId"
        initial_client_secret:
          $ref: "#/components/schemas/DcrConfigPropertyInitialClientSecret"
      additionalProperties: false
      title: DcrConfigCurityInRequest
    UpdateDcrConfigOktaInRequest:
      description: Payload to update an Okta DCR provider.
      type: object
      properties:
        dcr_token:
          $ref: "#/components/schemas/DcrConfigPropertyDcrToken"
      additionalProperties: false
      title: DcrConfigOktaInRequest
    UpdateDcrConfigHttpInRequest:
      description: Payload to update an HTTP DCR provider.
      type: object
      properties:
        dcr_base_url:
          $ref: "#/components/schemas/DcrBaseUrl"
        api_key:
          $ref: "#/components/schemas/DcrConfigPropertyApiKey"
        disable_event_hooks:
          $ref: "#/components/schemas/DcrConfigPropertyDisableEventHooks"
        disable_refresh_secret:
          $ref: "#/components/schemas/DcrConfigPropertyDisableRefreshSecret"
        allow_multiple_credentials:
          $ref: "#/components/schemas/DcrConfigPropertyAllowMultipleCredentials"
      additionalProperties: false
      title: CreateDcrConfigHttpInRequest
    InvalidParameterStandard:
      type: object
      properties:
        field:
          type: string
          example: name
          readOnly: true
        rule:
          $ref: "#/components/schemas/InvalidRules"
        source:
          type: string
          example: body
        reason:
          type: string
          example: is a required field
          readOnly: true
      additionalProperties: false
      required:
        - field
        - reason
    InvalidParameterMinimumLength:
      type: object
      properties:
        field:
          type: string
          example: name
          readOnly: true
        rule:
          description: invalid parameters rules
          type: string
          enum:
            - min_length
            - min_digits
            - min_lowercase
            - min_uppercase
            - min_symbols
            - min_items
            - min
          nullable: false
          readOnly: true
        minimum:
          type: integer
          example: 8
        source:
          type: string
          example: body
        reason:
          type: string
          example: must have at least 8 characters
          readOnly: true
      additionalProperties: false
      required:
        - field
        - reason
        - rule
        - minimum
    InvalidParameterMaximumLength:
      type: object
      properties:
        field:
          type: string
          example: name
          readOnly: true
        rule:
          description: invalid parameters rules
          type: string
          enum:
            - max_length
            - max_items
            - max
          nullable: false
          readOnly: true
        maximum:
          type: integer
          example: 8
        source:
          type: string
          example: body
        reason:
          type: string
          example: must not have more than 8 characters
          readOnly: true
      additionalProperties: false
      required:
        - field
        - reason
        - rule
        - maximum
    InvalidParameterChoiceItem:
      type: object
      properties:
        field:
          type: string
          example: name
          readOnly: true
        rule:
          description: invalid parameters rules
          type: string
          enum:
            - enum
          nullable: false
          readOnly: true
        reason:
          type: string
          example: is a required field
          readOnly: true
        choices:
          type: array
          items: {}
          minItems: 1
          nullable: false
          readOnly: true
          uniqueItems: true
        source:
          type: string
          example: body
      additionalProperties: false
      required:
        - field
        - reason
        - rule
        - choices
    InvalidParameterDependentItem:
      type: object
      properties:
        field:
          type: string
          example: name
          readOnly: true
        rule:
          description: invalid parameters rules
          type: string
          enum:
            - dependent_fields
          nullable: true
          readOnly: true
        reason:
          type: string
          example: is a required field
          readOnly: true
        dependents:
          type: array
          items: {}
          nullable: true
          readOnly: true
          uniqueItems: true
        source:
          type: string
          example: body
      additionalProperties: false
      required:
        - field
        - rule
        - reason
        - dependents
    DcrConfigPropertyInitialClientId:
      description: >
        This ID should be copied from your identity provider's settings after
        you create a client

        and assign it as the management client for DCR for this developer portal
      type: string
      maxLength: 256
      title: DcrConfigPropertyInitialClientId
    DcrConfigPropertyInitialClientSecret:
      description: >
        This secret should be copied from your identity provider's settings
        after you create a client

        and assign it as the management client for DCR for this developer portal
      type: string
      title: DcrConfigPropertyInitialClientSecret
    DcrConfigPropertyInitialClientAudience:
      description: >
        This is the audience value used for the initial client.

        If using a custom domain on Auth0, this must be set as to the Auth0
        Management API audience value.

        If left blank, the issuer will be used instead.
      type: string
      maxLength: 256
      nullable: true
      title: DcrConfigPropertyInitialClientAudience
    DcrConfigPropertyDcrToken:
      description: >
        This secret should be copied from your identity provider's settings
        after you create a client

        and assign it as the management client for DCR for this developer portal
      type: string
      title: DcrConfigPropertyInitialDcrToken
    DcrBaseUrl:
      description: >
        The base URL of the DCR server. This is the URL that will be used to
        make the HTTP requests from Konnect to the DCR provider.

        This URL must be accessible from the Konnect service.
      type: string
      format: url
      maxLength: 256
    DcrConfigPropertyApiKey:
      description: >
        This is the API Key that will be sent with each HTTP request to the
        custom DCR server. It can be

        verified on the server to ensure that incoming requests are coming from
        Konnect.
      type: string
      title: DcrConfigPropertyApiKey
    DcrConfigPropertyDisableEventHooks:
      description: This flag disables all the event-hooks on the application flow for
        the DCR provider.
      type: boolean
      title: DcrConfigPropertyDisableEventHooks
    DcrConfigPropertyDisableRefreshSecret:
      description: This flag disable the refresh-secret endpoint on the application
        flow for the DCR provider.
      type: boolean
      title: DcrConfigPropertyDisableRefreshSecret
    DcrConfigPropertyAllowMultipleCredentials:
      description: When enabled, indicates that the DCR provider supports creating and
        managing multiple credentials per application.
      type: boolean
      default: false
      title: DcrConfigPropertyAllowMultipleCredentials
    InvalidRules:
      description: invalid parameters rules
      type: string
      enum:
        - required
        - is_array
        - is_base64
        - is_boolean
        - is_date_time
        - is_integer
        - is_null
        - is_number
        - is_object
        - is_string
        - is_uuid
        - is_fqdn
        - is_arn
        - unknown_property
        - missing_reference
        - is_label
        - matches_regex
        - invalid
        - is_supported_network_availability_zone_list
        - is_supported_network_cidr_block
        - is_supported_provider_region
        - type
      nullable: true
      readOnly: true
  examples:
    DcrProviderPutRequest:
      summary: DCR provider request example
      value:
        id: 93f8380e-7798-4566-99e3-2edf2b57d289
        name: DCR Auth0 1 - Segment A
        provider_type: auth0
        issuer: https://my-issuer.auth0.com/api/v2/
        dcr_config:
          initial_client_id: abc123
          initial_client_audience: https://my-custom-domain.com/api/v2/
          use_developer_managed_scopes: false
        org_id: 7f9fd312-a987-4628-b4c5-bb4f4fddd5f7
        labels: {}
        created_at: 2023-01-01T00:00:00.000Z
        updated_at: 2023-01-01T00:00:00.000Z
    DcrProviderResponse:
      summary: DCR provider Response example
      value:
        id: 93f8380e-7798-4566-99e3-2edf2b57d289
        name: DCR Auth0 1 - Segment A
        provider_type: auth0
        issuer: https://my-issuer.auth0.com/api/v2/
        dcr_config:
          initial_client_id: abc123
          initial_client_audience: https://my-custom-domain.com/api/v2/
          use_developer_managed_scopes: false
        org_id: 7f9fd312-a987-4628-b4c5-bb4f4fddd5f7
        labels: {}
        created_at: 2023-01-01T00:00:00.000Z
        updated_at: 2023-01-01T00:00:00.000Z
    UnauthorizedExample:
      value:
        status: 401
        title: Unauthorized
        instance: kong:trace:8347343766220159418
        detail: Unauthorized
    ForbiddenExample:
      value:
        status: 403
        title: Forbidden
        instance: kong:trace:2723154947768991354
        detail: You do not have permission to perform this action
    NotFoundExample:
      value:
        status: 404
        title: Not Found
        instance: kong:trace:6816496025408232265
        detail: Not Found
```
