Functions
Link to GitHub
POST /v1/functions/{id}/link- Permission
write:functions- Tokens
- API key, CLI user token
Open a pull request containing the definition. Git takes ownership when that pull request merges and syncs.
Path parameters
idstringrequired
{
"path": str,
"repository": str
}
{
"path": str,
"pull_request_url": str
}
1
import os
2
3
from ellipsis import Ellipsis
4
5
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
6
7
result = client.functions.link("...", "api-repo")
8
print(result)
1
import { Ellipsis } from '@ellipsis-dev/sdk';
2
3
const client = new Ellipsis({
4
apiKey: process.env.ELLIPSIS_API_TOKEN!,
5
});
6
7
const request: Parameters<typeof client.functions.link>[1] = {
8
repository: 'api-repo',
9
};
10
11
const result = await client.functions.link('...', request);
12
console.log(result);
1
curl -X POST "https://api.ellipsis.dev/v1/functions/{id}/link" \
2
-H "Authorization: Bearer $ELLIPSIS_API_TOKEN" \
3
-H "Content-Type: application/json" \
4
-d '{
5
"repository": "api-repo"
6
}'
Request
pathstring
File path within the repository. Leave it out for `.ellipsis/functions/<name>.yaml`. If set, it must be a `.yaml` or `.yml` file under `.ellipsis/` at any depth. In the repository named `.ellipsis`, the repository root is that directory.
repositorystringrequired
Repository name within your account. The owner is always the account, so pass a bare name such as "api-repo".
Response
functionFunctionrequired
The function, still managed through the API until the pull request merges.
pathstringrequired
The file path the definition will be written to.
pull_request_urlstringrequired
The pull request that adds the file. The function becomes managed by that file once it merges.