resources.configureSource
POST
/resources/{resourceId}/source
const url = 'https://example.com/api/resources/example/source';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"source":{"kind":"local-folder","locator":"./apps/web","displayName":"Web console","baseDirectory":".","metadata":{"framework":"sveltekit"}},"idempotencyKey":"configure-source-res-web-console"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/resources/example/source \ --header 'Content-Type: application/json' \ --data '{ "source": { "kind": "local-folder", "locator": "./apps/web", "displayName": "Web console", "baseDirectory": ".", "metadata": { "framework": "sveltekit" } }, "idempotencyKey": "configure-source-res-web-console" }'Configures the source profile used by later deployment detect and plan stages. Public docs: /docs/resources/profiles/source-runtime/#resource-source-profile
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” resourceId
required
string
Request Body required
Section titled “Request Body required ” Media type application/json
object
source
required
object
kind
required
string
locator
required
string
displayName
string
gitRef
string
commitSha
string
baseDirectory
string
originalLocator
string
repositoryId
string
repositoryFullName
string
defaultBranch
string
imageName
string
imageTag
string
imageDigest
string
metadata
object
key
additional properties
string
idempotencyKey
string
Examples
Example default
{ "source": { "kind": "local-folder", "locator": "./apps/web", "displayName": "Web console", "baseDirectory": ".", "metadata": { "framework": "sveltekit" } }, "idempotencyKey": "configure-source-res-web-console"}Responses
Section titled “ Responses ”OK
Media type application/json
object
id
required
string
Example generated
{ "id": "example"}