cURL
curl --request GET \
--url https://{deployment}.convex.site/v1/projects/{projectId}/sourceimport requests
url = "https://{deployment}.convex.site/v1/projects/{projectId}/source"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{deployment}.convex.site/v1/projects/{projectId}/source', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{deployment}.convex.site/v1/projects/{projectId}/source",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{deployment}.convex.site/v1/projects/{projectId}/source"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{deployment}.convex.site/v1/projects/{projectId}/source")
.asString();require 'uri'
require 'net/http'
url = URI("https://{deployment}.convex.site/v1/projects/{projectId}/source")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"version": 4,
"locale": "en",
"keyCount": 142,
"content": "{ \"greeting\": \"Hello\" }",
"pendingDiff": {
"added": [
"<string>"
],
"modified": [
"<string>"
],
"deleted": [
"<string>"
]
},
"updatedAt": 1739712000000
}Source Files
Get v1projects source
Get the current source locale file content, version, and pending diff. Used by CLI to check if local source matches remote.
GET
/
v1
/
projects
/
{projectId}
/
source
cURL
curl --request GET \
--url https://{deployment}.convex.site/v1/projects/{projectId}/sourceimport requests
url = "https://{deployment}.convex.site/v1/projects/{projectId}/source"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{deployment}.convex.site/v1/projects/{projectId}/source', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{deployment}.convex.site/v1/projects/{projectId}/source",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{deployment}.convex.site/v1/projects/{projectId}/source"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{deployment}.convex.site/v1/projects/{projectId}/source")
.asString();require 'uri'
require 'net/http'
url = URI("https://{deployment}.convex.site/v1/projects/{projectId}/source")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"version": 4,
"locale": "en",
"keyCount": 142,
"content": "{ \"greeting\": \"Hello\" }",
"pendingDiff": {
"added": [
"<string>"
],
"modified": [
"<string>"
],
"deleted": [
"<string>"
]
},
"updatedAt": 1739712000000
}Path Parameters
Minimum string length:
1Example:
"proj_abc123"
Response
200 - application/json
Successfully retrieved source file
Example:
4
Required string length:
2 - 10Pattern:
^[a-z]{2,3}(-[A-Z]{2,3})?$/iExample:
"en"
Example:
142
Example:
"{ \"greeting\": \"Hello\" }"
Show child attributes
Show child attributes
Example:
1739712000000
⌘I