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

# Get entity archival configuration

> Retrieve the workspace's archival settings: auto-archival from integrations and from GitOps, auto-archival of monorepo entities, and how many days an archived entity is kept before it is deleted.



## OpenAPI

````yaml /openapi/cortex_swagger.json get /api/v1/entity-archival-config
openapi: 3.0.1
info:
  description: >-
    The Cortex REST API provides programmatic access to the data in the catalog,
    Scorecards, and more.
  title: Cortex API
  version: v1
servers:
  - url: https://api.getcortexapp.com
    description: US (Cortex cloud)
  - url: https://api.eu.cortex.io
    description: EU (Cortex cloud)
  - url: '{baseUrl}'
    description: Self-managed
    variables:
      baseUrl:
        description: >-
          Your Cortex backend URL (the app.hostnames.backend value from your
          Helm chart)
        default: https://cortex-api.yourdomain.example
security:
  - bearerAuth: []
tags:
  - name: API Keys
  - name: Audit Logs
  - name: Catalog Entities
  - name: Catalogs
  - name: Custom Data
  - name: Custom Data [Advanced]
  - name: Custom Events
  - name: Custom Metrics
  - name: Dependencies
  - name: Deploys
  - name: Discovery Audit
  - name: Docs
  - name: 'Eng Intel: 1-Registry'
  - name: 'Eng Intel: 2-Metrics'
  - name: 'Eng Intel: 3-Trace'
  - name: 'Eng Intel: User Labels'
  - name: Entity Archival
  - name: Entity Relationship Types
  - name: Entity Relationships
  - name: Entity Types
  - name: GitOps Logs
  - name: Groups
  - name: IP Allowlist
  - name: Initiatives
  - name: Integration Status
  - name: My Workspace
  - name: Notification Logs
  - name: On-call
  - name: Packages
  - name: Plugins
  - name: Queries
  - name: Recommendations
  - name: SCIM
  - name: Scaffolder
  - name: Scorecards
  - name: Secrets
  - name: Team Roles
  - name: Teams
  - name: Teams Hierarchies
  - name: Teams [Advanced]
  - name: Teams [Departments] (legacy)
  - name: Users
  - name: Verifications
  - name: Workflows
  - name: '[Integrations] AWS'
  - name: '[Integrations] Anthropic'
  - name: '[Integrations] Apiiro'
  - name: '[Integrations] ArgoCD'
  - name: '[Integrations] Azure Active Directory'
  - name: '[Integrations] Azure Devops'
  - name: '[Integrations] Azure Resources'
  - name: '[Integrations] BambooHR'
  - name: '[Integrations] Bitbucket'
  - name: '[Integrations] Bugsnag'
  - name: '[Integrations] Buildkite'
  - name: '[Integrations] Checkmarx SAST'
  - name: '[Integrations] CircleCI'
  - name: '[Integrations] ClickUp'
  - name: '[Integrations] Codecov'
  - name: '[Integrations] Coralogix'
  - name: '[Integrations] Datadog'
  - name: '[Integrations] Dynatrace'
  - name: '[Integrations] Firehydrant'
  - name: '[Integrations] GitHub'
  - name: '[Integrations] GitLab'
  - name: '[Integrations] Harness'
  - name: '[Integrations] Incident.io'
  - name: '[Integrations] Instana'
  - name: '[Integrations] Jenkins'
  - name: '[Integrations] Jira'
  - name: '[Integrations] Kubernetes'
  - name: '[Integrations] LaunchDarkly'
  - name: '[Integrations] Lightstep'
  - name: '[Integrations] Mend SAST'
  - name: '[Integrations] Mend SCA'
  - name: '[Integrations] New Relic'
  - name: '[Integrations] Okta'
  - name: '[Integrations] Opsgenie'
  - name: '[Integrations] PagerDuty'
  - name: '[Integrations] Prometheus'
  - name: '[Integrations] Rollbar'
  - name: '[Integrations] Rootly'
  - name: '[Integrations] Semgrep'
  - name: '[Integrations] Sentry'
  - name: '[Integrations] ServiceNow'
  - name: '[Integrations] SignalFx'
  - name: '[Integrations] Snyk'
  - name: '[Integrations] SonarQube'
  - name: '[Integrations] SumoLogic'
  - name: '[Integrations] Veracode'
  - name: '[Integrations] VictorOps'
  - name: '[Integrations] Wiz'
  - name: '[Integrations] Workday'
  - name: '[Integrations] xMatters'
  - name: dev-login-controller
  - name: public-scim-schema-controller
paths:
  /api/v1/entity-archival-config:
    get:
      tags:
        - Entity Archival
      summary: Get entity archival configuration
      description: >-
        Retrieve the workspace's archival settings: auto-archival from
        integrations and from GitOps, auto-archival of monorepo entities, and
        how many days an archived entity is kept before it is deleted.
      operationId: getEntityArchivalConfig
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityArchivalConfig'
          description: The workspace's archival settings
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    EntityArchivalConfig:
      required:
        - defaultForNewEntityTypes
        - entityTypes
        - monorepoAutoArchival
      type: object
      properties:
        defaultForNewEntityTypes:
          $ref: '#/components/schemas/TypeArchivalConfig'
        entityTypes:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TypeArchivalConfig'
          description: >-
            Settings per entity type, keyed by type. Lists the built-in types
            and every type with a setting of its own.
        monorepoAutoArchival:
          type: boolean
          description: >-
            Auto-archive and auto-unarchive entities that have a basepath
            (monorepo entities).
    TypeArchivalConfig:
      required:
        - gitOpsAutoArchival
        - integrationAutoArchival
      type: object
      properties:
        gitOpsAutoArchival:
          type: boolean
          description: Archive entities when their entity YAML file is deleted from Git.
        integrationAutoArchival:
          type: boolean
          description: >-
            Archive and unarchive entities based on their existence in the
            corresponding integrations.
        retentionDays:
          type: integer
          description: >-
            Days an archived entity is kept before Cortex deletes it. Null when
            automatic deletion is not enabled for the workspace.
          format: int32
          nullable: true
          enum:
            - 30
            - 60
            - 90
            - 180
            - 365
      description: >-
        Settings per entity type, keyed by type. Lists the built-in types and
        every type with a setting of its own.
    TooManyRequestsProblemDetail:
      required:
        - type
        - title
        - status
      type: object
      properties:
        detail:
          type: string
        instance:
          type: string
          format: uri-reference
        retryAfter:
          minimum: 0
          type: integer
          description: The number of seconds until the rate limiting resets.
          format: int32
        status:
          maximum: 599
          minimum: 100
          type: integer
          format: int32
          enum:
            - 429
        title:
          type: string
        type:
          type: string
          format: uri-reference
  responses:
    TooManyRequests:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/TooManyRequestsProblemDetail'
      description: >-
        The client has exceeded the rate limit by performing too many requests
        in a short period. Retry the request after a delay.
      headers:
        Retry-After:
          description: The number of seconds until the rate limiting resets.
          schema:
            minimum: 0
            type: integer
            format: int32
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: >-
        All requests to the Cortex API need to provide an `Authorization: Bearer
        <token>` header, where `<token>` is an API key created in the Settings
        page of your workspace.
      scheme: bearer
      type: http

````

## Related topics

- [Update entity archival configuration](https://docs.cortex.io/api/rest/entity-archival/update-entity-archival-configuration.md)
- [Archiving entities automatically](https://docs.cortex.io/ingesting-data-into-cortex/entities-overview/entities/archiving-entities/auto-archive.md)
- [Managing entities](https://docs.cortex.io/ingesting-data-into-cortex/entities-overview/entities.md)
