> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aviatrix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit SAML endpoint

> POST /v2/api/edit_saml_endpoint



## OpenAPI

````yaml /openapi/10.0/aviatrix-api.json post /v2/api/edit_saml_endpoint
openapi: 3.1.0
info:
  title: Aviatrix Controller API
  version: '10.0'
  description: >-
    Aviatrix Controller API — version 10.0. Selected operations with Mintlify
    metadata.
servers: []
security: []
tags:
  - name: policies
    x-group: Policies
  - name: authentication
    x-group: Authentication
  - name: account-management
    x-group: Account Management
  - name: rbac
    x-group: RBAC & Permissions
  - name: gateways
    x-group: Gateways
  - name: transit
    x-group: Transit
  - name: nat
    x-group: NAT
  - name: app-domains
    x-group: SmartGroups
  - name: certificates
    x-group: Certificates
  - name: mitm
    x-group: MITM
  - name: monitoring
    x-group: Monitoring & Diagnostics
  - name: fqdn
    x-group: FQDN
  - name: logging
    x-group: Logging
  - name: vpn
    x-group: UserVPN
  - name: site-to-cloud
    x-group: Site-to-Cloud
  - name: controller
    x-group: Controller
  - name: bgp
    x-group: BGP
  - name: general
    x-group: General
  - name: firenet
    x-group: FireNet
  - name: networking
    x-group: Networking
  - name: tgw
    x-group: AWS TGW
  - name: ips
    x-group: IPS
  - name: saml
    x-group: SAML
paths:
  /v2/api/edit_saml_endpoint:
    post:
      tags:
        - saml
      operationId: edit_saml_endpoint
      requestBody:
        content:
          application/json:
            schema:
              properties:
                CID:
                  $ref: '#/components/schemas/CID'
                access_ctrl:
                  description: >-
                    Whether the access level is set by controller or a profile
                    attribute.
                  enum:
                    - controller
                    - profile_attribute
                  type: string
                action:
                  $ref: '#/components/schemas/action'
                block_empty_profiles:
                  description: Block empty profiles.
                  type: boolean
                controller_login:
                  description: Parameter to specify controller login.
                  type: boolean
                endpoint_name:
                  description: A name for the saml Endpoint.
                  type: string
                entity_id:
                  description: Custom entity ID.
                  type: string
                entityid_type:
                  description: EntityID type for SAML.
                  enum:
                    - Custom
                    - Hostname
                  type: string
                groups:
                  description: RBAC groups for controller login.
                  type: string
                hostname:
                  description: Hostname.
                  type: string
                idp_metadata:
                  description: >-
                    A SAML IDP Metadata URL/Text that is required if SAML is
                    enabled on the gateway.
                  type: string
                idp_metadata_type:
                  description: Describes file/Text input of metadata.
                  enum:
                    - Text
                    - URL
                  type: string
                login_ip:
                  description: Remote IP of the user for ctrl login auth.
                  type: string
                msgtemplate:
                  description: Custom msgtemplate.
                  type: string
                msgtemplatetype:
                  description: Whether to use custom msg template.
                  enum:
                    - Custom
                    - Default
                  type: string
                password:
                  description: Password for ctrl login authentication.
                  type: string
                sign_authn_requests:
                  description: Whether to sign Authn requests.
                  type: boolean
                username:
                  description: Username for ctrl login authentication.
                  type: string
              required:
                - idp_metadata
                - endpoint_name
              type: object
        required: true
      responses:
        '200':
          $ref: '#/components/responses/general_response_v2'
        default:
          $ref: '#/components/responses/general_response_v2'
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl -sk -X POST "https://<controller>/v2/api/edit_saml_endpoint" \
              -H "Authorization: cid <CID>"
        - lang: python
          label: Python
          source: |-
            import requests

            url = "https://<controller>/v2/api/edit_saml_endpoint"
            headers = {"Authorization": "cid <CID>"}

            response = requests.post(url, headers=headers, verify=False)
            print(response.status_code)
            print(response.text)
        - lang: javascript
          label: JavaScript
          source: |-
            fetch("https://<controller>/v2/api/edit_saml_endpoint", {
              method: "POST",
              headers: {"Authorization": "cid <CID>"}
            })
              .then(res => res.text())
              .then(console.log)
              .catch(console.error);
        - lang: go
          label: Go
          source: |-
            package main

            import (
              "fmt"
              "net/http"
            )

            func main() {
              req, _ := http.NewRequest("POST", "https://<controller>/v2/api/edit_saml_endpoint", nil)
              req.Header.Set("Authorization", "cid <CID>")

              client := &http.Client{}
              resp, err := client.Do(req)
              if err != nil {
                panic(err)
              }
              defer resp.Body.Close()

              fmt.Println(resp.Status)
            }
components:
  schemas:
    CID:
      description: The opaque session ID token. Required for 7.2 controllers only.
      type: string
    action:
      description: The API action to perform. Required for 7.2 controllers only.
      type: string
    general_response_v2:
      additionalProperties: true
      description: A generic API response container for v2 style APIs.
      properties:
        errortype:
          description: Error type if the API failed.
          type: string
        reason:
          description: Failure reason if the API failed.
          type: string
        results:
          oneOf:
            - description: API response data
              type: boolean
            - description: API response data
              type: integer
            - description: API response data
              type: string
            - description: API response data
              type: object
            - description: API response data
              items: {}
              type: array
        return:
          description: Whether the API returned successfully
          type: boolean
      title: General Response v2
      type: object
  responses:
    general_response_v2:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/general_response_v2'
      description: General v2 API response schema.

````