# List CodeCommit directory entries

`GET https://api.lingohub.com/v2/integration-authentications/{integrationAuthenticationId}/codecommit-directory-entries`

LingoHub API V2 (Beta) · [CodeCommit Integrations](https://developers.lingohub.com/reference/v2/operations/tags/codecommit-integrations.md) · operation `listCodeCommitDirectoryEntries`

Lists the files and folders directly inside one folder of a CodeCommit repository at a given commit (up to 1,000; more fails with 502). Each file comes with hints, the languages and file formats its name suggests, to help you choose `path_filters`. Leave `path` empty for the root; get `commit_sha` from getCodeCommitBranch. Requires workspace-level stack management or integration management permission, or stack-level settings management permission on any stack.

## Parameters

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `integrationAuthenticationId` | path | yes | string |  |
| `repository_name` | query | yes | string | The repository's `name` from listCodeCommitRepositories. |
| `commit_sha` | query | yes | string | The branch's latest commit from getCodeCommitBranch. |
| `path` | query | no | string | The folder, relative to the repository root, without leading or trailing slashes; empty for the root. |

## Example request

```sh
curl --request GET \
  --url 'https://api.lingohub.com/v2/integration-authentications/INTEGRATION_AUTHENTICATION_ID/codecommit-directory-entries?repository_name=app&commit_sha=e89d9270a7c0b3f1d2e4f5a6b7c8d9e0f1a2b3c4' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

## Responses

- `200`: Provider discovery results retrieved.
- `400`: 
- `401`: 
- `403`: 
- `404`: 
- `409`: `git_integration_unauthorized`: the git host refused the connection's credentials, or the GitHub App installation is suspended or uninstalled.
- `422`: `validation_failed`: a repository, branch, commit or folder that doesn't exist is `not_found` on the parameter that names it.
- `429`: 
- `500`: 
- `502`: `upstream_error`: the git host failed, or answered with more or other data than LingoHub accepts.
- `503`: 
- `504`: `upstream_timeout`: the git host didn't answer in time.

## OpenAPI definition

The complete definition of this operation, with every schema it references:

````json
{
  "openapi": "3.1.0",
  "info": {
    "title": "LingoHub API V2 (Beta)",
    "version": "2.0"
  },
  "servers": [
    {
      "url": "https://api.lingohub.com",
      "description": "LingoHub"
    }
  ],
  "tags": [
    {
      "name": "CodeCommit Integrations",
      "description": "List AWS CodeCommit repositories, branches and folders for a Git integration."
    }
  ],
  "paths": {
    "/v2/integration-authentications/{integrationAuthenticationId}/codecommit-directory-entries": {
      "get": {
        "tags": [
          "CodeCommit Integrations"
        ],
        "summary": "List CodeCommit directory entries",
        "description": "Lists the files and folders directly inside one folder of a CodeCommit repository at a given commit (up to 1,000; more fails with 502). Each file comes with hints, the languages and file formats its name suggests, to help you choose `path_filters`. Leave `path` empty for the root; get `commit_sha` from getCodeCommitBranch. Requires workspace-level stack management or integration management permission, or stack-level settings management permission on any stack.",
        "operationId": "listCodeCommitDirectoryEntries",
        "parameters": [
          {
            "name": "integrationAuthenticationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Public id composed of the resource type prefix and its UUID.",
              "pattern": "^iau_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
            }
          },
          {
            "name": "repository_name",
            "in": "query",
            "description": "The repository's `name` from listCodeCommitRepositories.",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 1024,
              "minLength": 0
            },
            "example": "app"
          },
          {
            "name": "commit_sha",
            "in": "query",
            "description": "The branch's latest commit from getCodeCommitBranch.",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "[0-9a-f]{40}|[0-9a-f]{64}"
            },
            "example": "e89d9270a7c0b3f1d2e4f5a6b7c8d9e0f1a2b3c4"
          },
          {
            "name": "path",
            "in": "query",
            "description": "The folder, relative to the repository root, without leading or trailing slashes; empty for the root.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "",
              "maxLength": 4096,
              "minLength": 0
            },
            "example": "locales"
          }
        ],
        "responses": {
          "200": {
            "description": "Provider discovery results retrieved.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitDirectoryEntryCollection"
                },
                "example": {
                  "object_type": "LIST",
                  "has_more": false,
                  "next_cursor": null,
                  "data": [
                    {
                      "object_type": "GIT_DIRECTORY_ENTRY",
                      "path": "locales/en.json",
                      "type": "FILE",
                      "possible_project_types": [
                        "STANDARD_JSON",
                        "I18NEXT_JSON"
                      ],
                      "detected_language_codes": [
                        "en"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "`git_integration_unauthorized`: the git host refused the connection's credentials, or the GitHub App installation is suspended or uninstalled.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`validation_failed`: a repository, branch, commit or folder that doesn't exist is `not_found` on the parameter that names it.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "description": "`upstream_error`: the git host failed, or answered with more or other data than LingoHub accepts.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "description": "`upstream_timeout`: the git host didn't answer in time.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "headers": {
      "RateLimit": {
        "description": "State of the rate-limit policy currently closest to rejection (IETF draft-ietf-httpapi-ratelimit-headers): the quoted policy name with `r` = requests remaining right now and `t` = seconds until the full quota is available again. Example: `\"api-key\";r=42;t=7`. Advisory: absent when the request fails authentication or the limiter state is momentarily unknown.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit-Policy": {
        "description": "The rate-limit policies applied to the request: each quoted policy name with `q` = sustained request quota per window of `w` seconds. Example: `\"api-key\";q=180;w=60, \"workspace\";q=600;w=60`. Advisory: absent when the request fails authentication or the limiter state is momentarily unknown.",
        "schema": {
          "type": "string"
        }
      },
      "Retry-After": {
        "description": "Seconds to wait before retrying.",
        "schema": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "schemas": {
      "GitDirectoryEntryCollection": {
        "type": "object",
        "description": "One bounded page of direct directory children at the requested commit.",
        "properties": {
          "object_type": {
            "type": "string",
            "description": "Always `LIST`.",
            "enum": [
              "LIST"
            ],
            "example": "LIST"
          },
          "has_more": {
            "type": "boolean",
            "description": "True if more items exist after this page. Iterate by repeating the request with the cursor query parameter set to next_cursor until has_more is false.",
            "example": true
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Opaque cursor token pointing past the last item of this page. Null on the last page. Pass it unchanged via the cursor query parameter to request the next page.",
            "example": "1uO9WTLnYqGAtIWkjDmz4VuJZWLkWMxXIH4Hkp2DTuRtPNQYBpkF6Q"
          },
          "data": {
            "type": "array",
            "description": "The list of items in this page.",
            "example": [
              {
                "object_type": "GIT_DIRECTORY_ENTRY",
                "path": "locales/en.json",
                "type": "FILE",
                "possible_project_types": [
                  "STANDARD_JSON",
                  "I18NEXT_JSON"
                ],
                "detected_language_codes": [
                  "en"
                ]
              }
            ],
            "items": {
              "$ref": "#/components/schemas/GitDirectoryEntry"
            }
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor",
          "object_type"
        ]
      },
      "GitDirectoryEntry": {
        "type": "object",
        "description": "A direct child of a provider directory at an explicit commit. Format and language hints inspect only the path, not file contents or other entries.",
        "properties": {
          "object_type": {
            "type": "string",
            "description": "Always `GIT_DIRECTORY_ENTRY`.",
            "enum": [
              "GIT_DIRECTORY_ENTRY"
            ],
            "example": "GIT_DIRECTORY_ENTRY"
          },
          "path": {
            "type": "string",
            "description": "Path relative to the repository root.",
            "example": "locales/en.json"
          },
          "type": {
            "$ref": "#/components/schemas/GitDirectoryEntryType",
            "description": "Provider-reported entry kind.",
            "example": "FILE"
          },
          "possible_project_types": {
            "type": "array",
            "description": "Project type candidates based on the file extension. This does not establish importability or inspect content; non-files have no candidates.",
            "example": [
              "STANDARD_JSON",
              "I18NEXT_JSON"
            ],
            "items": {
              "$ref": "#/components/schemas/ProjectType"
            }
          },
          "detected_language_codes": {
            "type": "array",
            "description": "Language hints detected from this file path alone. Empty means unknown or not an ordinary file. Does not select a source language or inspect multilingual content.",
            "example": [
              "en"
            ],
            "items": {
              "type": "string",
              "description": "Language code that uniquely identifies a locale. Valid examples would be 'en', 'en-GB', 'de', 'de-DE' etc. according to [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes)."
            }
          }
        },
        "required": [
          "detected_language_codes",
          "object_type",
          "path",
          "possible_project_types",
          "type"
        ]
      },
      "GitDirectoryEntryType": {
        "type": "string",
        "description": "Git entry kind; links and submodules are not inspected as ordinary files.",
        "enum": [
          "FILE",
          "DIRECTORY",
          "SYMLINK",
          "SUBMODULE",
          "OTHER"
        ]
      },
      "ProjectType": {
        "type": "string",
        "description": "The project's file format, or the platform it syncs with (for example `CONTENTFUL` or `ZENDESK`). It decides which files the project accepts and can't be changed after creation.",
        "enum": [
          "ANDROID_XML",
          "IOS_STRINGS",
          "IOS_STRINGS_CATALOG",
          "STANDARD_PROPERTIES",
          "GETTEXT_PO",
          "WINDOWS_RESX",
          "QT_LINGUIST_TS",
          "DEFINE_PHP",
          "STANDARD_INI",
          "STANDARD_ARB",
          "RAILS_YAML",
          "SYMFONY_YAML",
          "STANDARD_JSON",
          "ANGULAR_TRANSLATE_JSON",
          "CHROME_I18N_JSON",
          "GO_I18N_JSON",
          "I18NEXT_JSON",
          "REACT_INTL_JSON",
          "STANDARD_CSV",
          "SINGLE_LANGUAGE_CSV",
          "KEY_VALUE_CSV",
          "STANDARD_XLIFF",
          "STANDARD_XLIFF_2",
          "STANDARD_TXT",
          "TWINE_TXT",
          "STANDARD_MARKDOWN",
          "STANDARD_HTML",
          "FIGMA",
          "ZENDESK",
          "STORYBLOK",
          "STORYBLOK_JSON",
          "CONTENTFUL",
          "SUBTITLE_SRT",
          "SUBTITLE_VTT",
          "HUBSPOT",
          "STRIPO",
          "CRISP_HELPDESK",
          "DOCUMENT",
          "VUE_I18N_JSON"
        ],
        "example": "STANDARD_JSON"
      },
      "Error": {
        "type": "object",
        "description": "RFC 9457 problem details. `code` identifies the problem type (one per `type` URL); `errors` lists rejected fields or parameters; `required_permission` names the permission a 403 lacked.",
        "properties": {
          "type": {
            "type": "string",
            "description": "URL identifying the problem type and pointing to its documentation.",
            "example": "https://api.lingohub.com/errors/resource-not-found"
          },
          "title": {
            "type": "string",
            "description": "Short, constant summary of the problem type.",
            "example": "Resource not found"
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "description": "HTTP status code.",
            "example": 404
          },
          "detail": {
            "type": "string",
            "description": "Human-readable explanation of this occurrence of the problem.",
            "example": "Resource with ID 'pr_0197c8f2-5a6b-7cde-8f12-3456789abcde' was not found."
          },
          "instance": {
            "type": "string",
            "description": "Path of the request that produced the problem.",
            "example": "/v2/projects/pr_0197c8f2-5a6b-7cde-8f12-3456789abcde"
          },
          "code": {
            "$ref": "#/components/schemas/ErrorCode",
            "description": "Machine-readable problem type.",
            "example": "resource_not_found"
          },
          "request_id": {
            "type": "string",
            "description": "Correlation id of the request, also returned in the `X-Request-ID` header. Quote it when contacting support.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "errors": {
            "type": "array",
            "description": "Rejected fields or parameters. Present when the problem concerns specific fields or parameters.",
            "example": [
              {
                "detail": "must be at least 2 characters long",
                "pointer": "#/name",
                "parameter": "limit",
                "code": "minLength"
              }
            ],
            "items": {
              "$ref": "#/components/schemas/FieldError"
            }
          },
          "required_permission": {
            "$ref": "#/components/schemas/RequiredPermission",
            "description": "The permission the API key lacks. Present on 403 responses."
          }
        },
        "required": [
          "code",
          "detail",
          "instance",
          "request_id",
          "status",
          "title",
          "type"
        ]
      },
      "ErrorCode": {
        "type": "string",
        "description": "Machine-readable problem type of a V2 error response. Each code has a fixed HTTP status and documentation at its `type` URL.",
        "enum": [
          "invalid_json",
          "invalid_parameter",
          "missing_parameter",
          "unknown_parameter",
          "invalid_filter",
          "invalid_cursor",
          "bad_request",
          "missing_api_key",
          "invalid_api_key",
          "expired_api_key",
          "revoked_api_key",
          "disabled_api_key",
          "insufficient_permissions",
          "resource_not_found",
          "route_not_found",
          "method_not_allowed",
          "not_acceptable",
          "precondition_failed",
          "content_too_large",
          "unsupported_media_type",
          "already_exists",
          "idempotency_outcome_unknown",
          "idempotency_key_in_use",
          "stack_not_empty",
          "branch_not_ready",
          "backup_not_ready",
          "backup_in_use",
          "default_branch_protected",
          "owner_membership_protected",
          "source_language_protected",
          "branch_limit_reached",
          "context_image_limit_reached",
          "automation_limit_reached",
          "translation_order_pending",
          "git_integration_not_configured",
          "branch_git_integration_not_configured",
          "git_integration_unauthorized",
          "conflict",
          "validation_failed",
          "idempotency_key_mismatch",
          "rate_limit_exceeded",
          "internal_error",
          "upstream_error",
          "service_unavailable",
          "upstream_timeout"
        ]
      },
      "FieldError": {
        "type": "object",
        "description": "A rejected field or parameter. `pointer` locates a body field (RFC 6901 JSON Pointer), `parameter` a query, path or header parameter or a field of a multipart upload; both are set for a position inside a JSON-valued parameter such as `filter`.",
        "properties": {
          "detail": {
            "type": "string",
            "description": "Human-readable description of the problem.",
            "example": "must be at least 2 characters long"
          },
          "pointer": {
            "type": [
              "string",
              "null"
            ],
            "description": "JSON Pointer to the offending body field, or to the position inside a JSON-valued parameter.",
            "example": "#/name"
          },
          "parameter": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the offending query, path or header parameter, or of the multipart form field.",
            "example": "limit"
          },
          "code": {
            "$ref": "#/components/schemas/FieldErrorCode",
            "description": "Why the field or parameter was rejected.",
            "example": "minLength"
          }
        },
        "required": [
          "code",
          "detail",
          "parameter",
          "pointer"
        ]
      },
      "FieldErrorCode": {
        "type": "string",
        "description": "Why a field or parameter was rejected: the JSON Schema keyword of the violated rule, or one of the documented rules that no schema can express.",
        "enum": [
          "required",
          "type",
          "enum",
          "minLength",
          "maxLength",
          "minimum",
          "maximum",
          "pattern",
          "format",
          "additionalProperties",
          "minItems",
          "maxItems",
          "uniqueItems",
          "already_exists",
          "not_found",
          "not_supported",
          "unsupported_file_extension",
          "file_too_large",
          "file_empty",
          "invalid_archive",
          "empty_archive"
        ]
      },
      "RequiredPermission": {
        "type": "object",
        "description": "The permission the API key lacks, in the vocabulary of the API key permission settings.",
        "properties": {
          "scope": {
            "$ref": "#/components/schemas/PermissionScope",
            "description": "Where the permission applies.",
            "example": "STACK"
          },
          "target": {
            "$ref": "#/components/schemas/PermissionTarget",
            "description": "The area the permission governs.",
            "example": "SETTINGS"
          },
          "level": {
            "$ref": "#/components/schemas/PermissionLevel",
            "description": "The access level required.",
            "example": "MANAGE"
          }
        },
        "required": [
          "level",
          "scope",
          "target"
        ]
      },
      "PermissionScope": {
        "type": "string",
        "description": "Where a permission applies: `WORKSPACE` permissions cover workspace-level resources, `STACK` permissions the resources of a stack (its projects, branches, resources, languages, ...).",
        "enum": [
          "WORKSPACE",
          "STACK"
        ]
      },
      "PermissionTarget": {
        "type": "string",
        "description": "The area a permission governs.",
        "enum": [
          "GENERAL",
          "BILLING_SUBSCRIPTION",
          "WORKSPACES",
          "MEMBERS",
          "PLUGINS_INTEGRATIONS",
          "LOGS",
          "API_ACCESS",
          "STACKS",
          "TRANSLATION_ORDERS",
          "WORK_REPORTS",
          "STYLE_GUIDES",
          "GLOSSARIES",
          "TRANSLATION_MEMORIES",
          "LABELS",
          "AI_TRANSLATION",
          "QUICK_TRANSLATIONS",
          "SETTINGS",
          "ACTIVITIES",
          "RESOURCES",
          "CONTEXT_IMAGES",
          "LANGUAGES",
          "SEGMENT_KEYS",
          "SEGMENTS",
          "SEGMENT_TEXTS"
        ]
      },
      "PermissionLevel": {
        "type": "string",
        "description": "Access level of a permission: `MANAGE` includes `WRITE` and `VIEW`.",
        "enum": [
          "NO_ACCESS",
          "VIEW",
          "WRITE",
          "MANAGE"
        ]
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request is malformed: an unknown or invalid query parameter, an invalid id in the path, or a body that is not valid JSON. `code` names the problem, `errors` the parameter or field.",
        "headers": {
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimit-Policy"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Invalid or missing API key.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Insufficient permissions.",
        "headers": {
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimit-Policy"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "The resource does not exist, or the API key cannot see it.",
        "headers": {
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimit-Policy"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "The API rate limit was exceeded. Wait for the number of seconds given in the Retry-After header, then retry.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/Retry-After"
          },
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimit-Policy"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "InternalServerError": {
        "description": "An unexpected internal server error occurred.",
        "headers": {
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimit-Policy"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "The service is temporarily unavailable. Retry after the number of seconds in the Retry-After header.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/Retry-After"
          },
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimit-Policy"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "description": "API key authentication. Create API keys in your LingoHub workspace settings. Keys use the `lh-api_` prefix. Pass the full key as the Bearer token.",
        "scheme": "bearer"
      }
    }
  }
}
````
