Schema Generation

Trigger schema generation

Changed on

Triggers a repository-based schema generation job for the target. Idempotent: returns the existing active job with 200 when one is already running, or the newly created job with 202. Responds with 400 when the target has no repository source configured. The optional branch field is deprecated and ignored.

post/targets/{target_id}/schema-generation/

Request

  • Base URL
    https://api.probely.com
  • URL
    https://api.probely.com/targets/{target_id}/schema-generation/
  • Auth
    API key in header Authorization

Path parameters

target_idstring required

Request body

branchstring nullable

[Deprecated] Optional branch override. Accepted for backwards compatibility but ignored: SGS resolves the repository's default branch itself, so this value has no effect on generation.

Response

job_idstring required
statusstring required
target_idstring required
target_typestring required

Schema flavor the job was created for.

Reports the job's snapshot (schema_type) so the API never shows a flavour the job is not actually generating after the target's settings change. Falls back to the current API scan settings for jobs created before the snapshot existed.

project_idstring required

Snyk project id, falling back to the snapshot when SET_NULL fired.

repository_namestring required

Repository full name (owner/repo) from the linked Snyk project.

branchstring required

[Deprecated] Retained for backwards compatibility; empty for new jobs because SGS resolves the repository's default branch.

created_atstring date-time required
started_atstring date-time required
completed_atstring date-time required
error_codestring required
error_messagestring required

Changes