---
title: "Get all Public Code Containers"
method: GET
path: "/code_containers/public"
tags: ["Code Containers"]
---

# Get all Public Code Containers

`GET /code_containers/public`

## Request

- Base URL: `https://dataops.nexla.io/nexla-api`
- URL: `https://dataops.nexla.io/nexla-api/code_containers/public`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nexla/apis/nexla-rest-api/docs/code_containers/public/get.ts> (a function with typed inputs; its response is checked against the schema)

The Nexla team regularly adds common code containers that are made available to all Nexla accounts. 

Use this endpoint to fetch all such "publicly" available code containers.

## Headers

- `Accept` 'application/vnd.nexla.api.v1+json' | 'application/json': Setting to `application/vnd.nexla.api.v1+json` is recommended.

## Response `200`

Success

- CodeContainer[]
  - `id` integer
  - `name` string
  - `resource_type` 'transform' | 'ai_function' | 'source' | 'sink' | 'error' | 'validator': The type of resource that this code container is to be used for. - `transform`: For user defined code that is used in a Nexset transform. - `ai_function`: For user defined code that is used in an AI function. See `ai_function_type` for the scenarios where this is used. - `source`: For user defined code in a source. - `sink`: For user defined code in a sink. - `error`: For user defined code that acts as an error handler. - `validator`: For user defined code that acts as a validator.
  - `ai_function_type` 'chunker' | 'context_enricher' | 'query_rewriter' | 'reranker': The type of AI function that this code container is used for. - `chunker`: Used to chunk parsed file content into smaller chunks in a Document Ingestion flow. - `context_enricher`: Used to enrich the context of a query in a RAG flow. - `query_rewriter`: Used to rewrite a query in a RAG flow. - `reranker`: Used to rerank a list of results in a RAG flow.
  - `reusable` boolean
  - `public` boolean
  - `owner` UserSimplified
    - `id` integer
    - `full_name` string
    - `email` string
    - `email_verified_at` string, date-time
  - `org` OrgSimplified
    - `id` integer
    - `name` string
    - `email_domain` string
    - `email` string
    - `client_identifier` string
    - `org_webhook_host` string
  - `access_roles` string[]: This property reflects all the permissions the user/team/organization has to this resource. 1. `collaborator`: The user/team/organization can view the resource but not make any modifications to it. 2. `operator`: The user/team/organization can view the resource and can activate/pause it, but not make any other modifications to it. 3. `administrator`: The user/team/organization has complete administrative rights to this resource. 4. `owner`: This user created the resource and so has complete administrative rights to it.
  - `data_credentials` object
    - `id` integer
    - `name` string
    - `description` string
    - `updated_at` string, date-time
    - `created_at` string, date-time
  - `runtime_data_credentials` object
    - `id` integer
    - `name` string
    - `description` string
    - `updated_at` string, date-time
    - `created_at` string, date-time
  - `description` string
  - `code_type` 'jolt_standard' | 'jolt_custom' | 'python' | 'python3' | 'javascript'
  - `output_type` 'record' | 'attribute' | 'custom': The type of output that this code container produces. - `record`: Produces a full Nexset record. Used only when the code container is used to modify a Nexset, i.e output_type: `transform` - `attribute`: Produces value for an attribute inside a Nexset record. Used only when the code container is used to modify a value inside a Nexset, i.e output_type: `transform` - `custom`: Produces custom output. Used as a catch-all output format when a code container is used in any context other than for Nexset modification.
  - `code_config` object
  - `custom_config` object
  - `code_encoding` string
  - `code` object[]
    - `operation` string
    - `spec` object
      - `language` string
      - `encoding` string
      - `script` string
  - `managed` boolean
  - `data_sets` integer[]
  - `copied_from_id` integer
  - `updated_at` string, date-time
  - `created_at` string, date-time
  - `tags` string[]

## Other responses

- `401`: Unauthorized
- `403`: Forbidden

---

[API](https://skmtc.dev/nexla/apis/nexla-rest-api.md) - [All operations](https://skmtc.dev/nexla/apis/nexla-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nexla/apis/nexla-rest-api/revisions/ef02be92fe7b?raw)
