Provider - Init Schema
Runs SchemaAutoMapper against the first <capture_node> in a feed sample. Returns the suggested mapping. Pass {"save": true} to also persist it into sponsor.job_provider.schema_mapping. HTTP mirror of the php spark feed:init <id> [--save] command.
─── Cached-sample behavior (default) ───────────────────────── By default this endpoint REUSES the most recent locally-cached XML file for the provider if one exists and is under max_age_hours old (default 24h). This keeps iterative "adjust capture_node → re-init → adjust → re-init" workflows from burning a fresh download every time. If no cached file exists or the file is too old, falls through to a fresh fetch automatically.
Pass {"force_download": true} to skip the cache and always fetch fresh. The response includes used_cached_file so the SPA can surface which path ran.
─── Timing ────────────────────────────────────────────────── Synchronous. Cached-sample path returns in seconds (parse-only). Fresh-fetch path can run 30-120s depending on feed size — surface a loading state in the SPA when force_download or when no cache exists yet.
─── Warnings (READ THESE) ────────────────────────────────── The response includes a warnings array of advisory strings. Each one means a field will be missing or wrong after ingest: • a mapping landed at "suggested" confidence — the transform step SKIPS those, so the field is empty on every document • a required target (jobid, title, description, joburl, company, city, state, date_posted) has no source at all • the sample contains a self-nested element, which is unsafe to use as capture_node Surface these prominently in the SPA — an empty array is the "good to process" signal. Warnings are advisory and are NOT persisted into schema_mapping when save=true.
─── Failure modes ────────────────────────────────────────── 404 (provider not found), 422 (no feed_url configured), 502 (fetch or parse failed — check feed log for details).
Request
- Base URL: https://api.juju.com
- URL: https://api.juju.com/admin/v1/providers/{id}/schema/init
- Auth: none declared
Path parameters
Request body
Response
Mapping generated. Synchronous — the response includes the suggested mapping directly. NOTE: 200 not 202 (unlike force-run, which is async).
Example response
{
"errors": []
}Changes
No recorded changes to this operation across all 1 revision of this API.