---
updatedAt: 2026-05-28T08:16:45.000Z
agentTools:
  projectIndex: https://docs.scalr.io/llms.txt
---

# Update federated environments relationships

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "FederatedEnvironmentRelationship": {
        "description": "Describes JSON:API generic Resource Identifier object.\nsee https://jsonapi.org/format/#document-resource-identifier-objects",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "enum": [
              "environments"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "id"
        ],
        "type": "object"
      },
      "FederatedEnvironmentRelationshipFieldsetsListingDocument": {
        "description": "Document Listing.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/FederatedEnvironmentRelationship"
            },
            "type": "array"
          },
          "included": {
            "items": {
              "type": "object"
            },
            "readOnly": true,
            "type": "array"
          },
          "links": {
            "additionalProperties": {
              "type": "string"
            },
            "readOnly": true,
            "type": "object"
          },
          "meta": {
            "readOnly": true,
            "type": "object"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "API-Key": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Scalr IACP API",
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "title": "Scalr IACP API",
    "version": "unversioned"
  },
  "openapi": "3.0.0",
  "paths": {
    "/environments/{environment}/relationships/federated-environments": {
      "patch": {
        "operationId": "replace_federated_environments",
        "parameters": [
          {
            "description": "The ID of the environment to update.",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/vnd.api+json": {
              "examples": {
                "default": {
                  "summary": "Update environment's federated environments relationships",
                  "value": "{\n\"data\": [\n    {\n      \"id\": \"env-svrcnchebt61e30\",\n      \"type\": \"environments\"\n    }\n  ]\n}"
                }
              },
              "schema": {
                "$ref": "#/components/schemas/FederatedEnvironmentRelationshipFieldsetsListingDocument"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Successfully updated the federated environments relationships."
          },
          "404": {
            "description": "Environments not found, or user unauthorized to perform action."
          },
          "4XX": {
            "description": "Client error."
          },
          "5XX": {
            "description": "Server error."
          }
        },
        "summary": "Update federated environments relationships",
        "tags": [
          "federated-environments"
        ],
        "x-resource": "Environment",
        "x-service": "tf-api"
      }
    }
  },
  "security": [
    {
      "API-Key": []
    }
  ],
  "servers": [
    {
      "url": "https://{Domain}/api/iacp/v3",
      "variables": {
        "Domain": {
          "default": "example.scalr.io",
          "description": "Domain where Scalr is hosted"
        }
      }
    }
  ]
}
```

# Sibling pages

* [Delete federated environment relationship](https://docs.scalr.io/scalr/reference/delete_federated_environment.md)
* [List environment's federated environments relationship](https://docs.scalr.io/scalr/reference/list_federated_environments.md)
* [Create environment's federated environments relationships](https://docs.scalr.io/scalr/reference/add_federated_environments.md)