Syndai Docs

Read one of a repository's files

Use a key with only read scopes. Your customer_id is in the reply to Get the calling API key.

GET
/api/v1/external/coding/repos/{coding_repository_id}/files/content

One file on the default branch of a Syndai-hosted repository. kind is text (with the file's text), binary (a NUL byte in its first 8000 bytes, or not UTF-8) or too_large (over 1,000,000 bytes); text is null unless kind is text. 404 for a repository that is not yours, a GitHub repository, or a path that is missing or hidden (credentials, .syndai/). 503 when the file can't be read right now.

Authorization

CustomerApiKey
headerAuthorizationBearer <API Key>

Customer API key sent as a bearer token

Path Parameters

coding_repository_id*string
Formatuuid

Query Parameters

path*string

The file's path from the repository root, e.g. trips/japan.md.

Length1 <= length <= 4096
customer_id?|null

Response Body

Request fulfilled, document follows

application/json
  1. response
kind*string
path*string
size*integer
text?string|null
Example Request
curl -X GET 'https://api.syndai.ai/api/v1/external/coding/repos/497f6eca-6276-4993-bfeb-53cbbbba6f08/files/content?path=string'
Example Response
{  "kind": "string",  "path": "string",  "size": 0,  "text": "string"}
Was this page helpful?