POST
/
sources
/
content
Get full source content
curl --request POST \
  --url https://apigcp.trynia.ai/v2/sources/content \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "source_type": "repository",
  "source_identifier": "<string>",
  "metadata": {}
}'
{
  "success": true,
  "content": "<string>",
  "metadata": {
    "repository": "<string>",
    "file_path": "<string>",
    "branch": "<string>",
    "language": "<string>",
    "url": "<string>",
    "title": "<string>",
    "source_type": "<string>"
  },
  "error": "<string>"
}

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Body

application/json
source_type
enum<string>
required

Type of source to retrieve

Available options:
repository,
documentation
source_identifier
string
required

Identifier for the source:

  • For repositories: 'owner/repo:path/to/file' (e.g., 'facebook/react:src/React.js')
  • For documentation: The source URL
metadata
object

Optional metadata from search results to help locate the source

Response

Source content retrieved successfully

success
boolean
content
string

Full content of the source file or document

metadata
object
error
string

Error message if retrieval failed