Create an issue source
const url = 'http://localhost:8080/api/v1/projects/example/issue-sources';const options = { method: 'POST', headers: { cookie: 'cetra_session=<cetra_session>', 'Content-Type': 'application/json' }, body: '{"budget_period":"day","budget_usd":1,"channel_ids":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"chat_connection_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","chat_model":"example","daily_cap":1,"embed_connection_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","embed_model":"example","enabled":true,"feedback_sources":["example"],"filter":"example","floor":1,"kind":"error","min_issue_size":1,"name":"example","sample_rate":1,"score_names":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8080/api/v1/projects/example/issue-sources \ --header 'Content-Type: application/json' \ --cookie cetra_session=<cetra_session> \ --data '{ "budget_period": "day", "budget_usd": 1, "channel_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "chat_connection_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "chat_model": "example", "daily_cap": 1, "embed_connection_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "embed_model": "example", "enabled": true, "feedback_sources": [ "example" ], "filter": "example", "floor": 1, "kind": "error", "min_issue_size": 1, "name": "example", "sample_rate": 1, "score_names": [ "example" ] }'Project members and above. API keys cannot call it. 403 plan_limit when the org is at its active-source limit.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project UUID, URL-encoded org-slug/project-slug, or current.
Request Bodyrequired
Section titled “Request Bodyrequired”POST /api/v1/projects/{project}/issue-sources body. Absent optional fields take their defaults.
Optional fields refuse null (spec 09 § Conventions).
object
Period of the budget. Needed with budget_usd.
Spend limit per budget_period, in USD. Needs budget_period, and the models must be
priced.
Channels notified of new and regressed issues, at most 10 channels of this project. Default none.
Connection of the chat model. Required for LLM kinds.
Chat model of that connection. Required for LLM kinds.
Most candidates admitted per UTC day, 1 to 10 000. LLM kinds only. Default 500.
Connection of the embedding model. Required for LLM kinds. Anthropic cannot embed.
Embedding model of that connection. Required for LLM kinds. Fixed after create.
Whether the source runs. Default true.
Feedback sources of a feedback source: end_user and/or human. Default both.
Spans filter. Absent means no filter.
Cosine similarity at which a candidate joins an issue, 0.5 to 0.99. Default 0.80.
What the source reads.
Smallest group a refit makes into a new issue, 2 to 100. Default 5.
Display name, 1 to 128 characters after trimming.
Share of the matching traces or scores that become candidates, in (0, 1]. LLM kinds
only. Default 1.
Score names of a score or feedback source: 1 to 8 names of 1 to 255 bytes. Required
for those kinds; a topic source refuses it.
Responses
Section titled “Responses”The created source.
An issue source. Spec 09 § Issues.
object
Period of the budget. Present exactly when budget_usd is.
Spend limit per budget_period, in USD. Omitted when there is no budget.
Candidates created in the last 24 hours, by status. LLM kinds only.
object
Joined an issue.
Not kept: the trace is gone, or the daily cap was reached.
Failed after its retries.
Embedded, waiting for the next refit.
Waiting for a worker, or for their retry time.
Skipped: the source was deleted, paused too long, or the trace was deleted.
Channels notified of new and regressed issues. Ordered by id.
Connection of the chat model that summarizes and names. LLM kinds only.
Chat model of that connection. LLM kinds only.
Creation time. JSON is RFC 3339.
User who created the source. Omitted when that user is unknown.
Most candidates admitted per UTC day, 1 to 10 000. LLM kinds only.
Connection of the embedding model. Fixed after create. LLM kinds only.
Vector dimension of the embedding model, set once the source first embeds. LLM kinds only.
Embedding model of that connection. Fixed after create. LLM kinds only.
Whether the source runs. A disabled source counts for no plan limit.
Feedback sources read by a feedback source: end_user and/or human. Omitted for other
kinds.
Spans filter for error sources. Omitted when there is none.
Cosine similarity at which a candidate joins an issue, 0.5 to 0.99. LLM kinds only.
Source id.
What the source reads. Immutable.
Smallest group a refit makes into a new issue, 2 to 100. LLM kinds only.
Display name, unique in the project. 1 to 128 characters.
When the next refit is due. Omitted for other kinds. JSON is RFC 3339.
Issues of this source that are open now.
The provider’s error text for a connection pause. Omitted when the source is not paused for a connection.
Why the sweeper skips the source. Omitted when it runs.
The project the source belongs to.
Share of the matching traces or scores that become candidates, in (0, 1]. LLM kinds only.
Score names read by a score or feedback source. Omitted for other kinds.
Spend of the current UTC day, in USD. LLM kinds only.
Last change time. JSON is RFC 3339.
Example
{ "budget_period": "day", "kind": "error"}The request is malformed or a filter is invalid.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}No credentials, or the credentials are invalid.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The credentials do not allow this operation, or the organization’s plan does not include it (code plan_required).
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The resource does not exist.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The request conflicts with the current state.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}Too many requests.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}