Skip to content

Align OpenAPI spec and docs with currently working live Jobsuche API#65

Merged
LilithWittmann merged 6 commits intomainfrom
copilot/align-jobsuche-docs-with-live-api
Apr 2, 2026
Merged

Align OpenAPI spec and docs with currently working live Jobsuche API#65
LilithWittmann merged 6 commits intomainfrom
copilot/align-jobsuche-docs-with-live-api

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

The published OpenAPI spec and examples were missing the jobdetails endpoints entirely and referenced a broken logo endpoint (ed/v1), making the documented API contract non-functional against the live API.

OpenAPI spec (openapi.yaml, v2.0.2 → v2.1.0)

  • Added /pc/v4/jobdetails/{encryptedJobCode} (recommended) and /pc/v3/jobdetails/{encryptedJobCode} — path parameter is base64(refnr)
  • Replaced /ed/v1/arbeitgeberlogo/{hashID} (403) with /ct/v1/arbeitgeberlogo/{kundennummerHash} (working), using an OpenAPI 3.0 per-path servers override for the different base URL (https://rest.arbeitsagentur.de/vermittlung/ag-darstellung-service)
  • Added kundennummerHash (nullable) and externeUrl (nullable) to JobSearchResponse stellenangebote items
  • Added live API response fields to JobDetails schema: arbeitgeberKundennummerHash, stellenangebotsBeschreibung, stellenangebotsTitel, referenznummer
  • Documents 404 on the logo endpoint as a normal "no logo available" case

Example code

import base64, requests, urllib.parse

# Step 1: search → get refnr
# Step 2: fetch details
encrypted = base64.b64encode(refnr.encode()).decode()
details = requests.get(
    f"https://rest.arbeitsagentur.de/jobboerse/jobsuche-service/pc/v4/jobdetails/{encrypted}",
    headers={"X-API-Key": "jobboerse-jobsuche"}
).json()

# Step 3: fetch logo (if arbeitgeberKundennummerHash is present)
hash_encoded = urllib.parse.quote(details["arbeitgeberKundennummerHash"], safe="")
logo = requests.get(
    f"https://rest.arbeitsagentur.de/vermittlung/ag-darstellung-service/ct/v1/arbeitgeberlogo/{hash_encoded}",
    headers={"X-API-Key": "jobboerse-jobsuche"}
)  # 404 = no logo, not an error

Other files

  • README.md: Added Ablauf section documenting the full 3-step flow; jobdetails section with base64 encoding explanation; updated logo endpoint; edge cases (nullable hash, 404 semantics)
  • api_example.py: Updated to demonstrate full search → details → logo flow
  • api_example.R: Fixed logo URL to ct/v1; added jobdetails example using base64enc::base64encode(charToRaw(refnr))
  • Python client (default_api.py): Replaced ed_v1_arbeitgeberlogo_hash_id_get with ct_v1_arbeitgeberlogo_kundennummer_hash_get; added pc_v4_jobdetails_encrypted_job_code_get and pc_v3_jobdetails_encrypted_job_code_get
  • .gitignore: Added to exclude __pycache__ and build artifacts

Copilot AI and others added 2 commits March 31, 2026 05:45
…nd fix logo endpoint

Agent-Logs-Url: https://github.com/bundesAPI/jobsuche-api/sessions/cda980ae-6654-42d8-8f3c-ebdbce4fd36f

Co-authored-by: LilithWittmann <891030+LilithWittmann@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bundesAPI/jobsuche-api/sessions/cda980ae-6654-42d8-8f3c-ebdbce4fd36f

Co-authored-by: LilithWittmann <891030+LilithWittmann@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Jobsuche documentation to match live API behavior Align OpenAPI spec and docs with currently working live Jobsuche API Mar 31, 2026
Copilot AI requested a review from LilithWittmann March 31, 2026 05:47
@LilithWittmann
Copy link
Copy Markdown
Member

@copilot resolve conflicts.

…ails/logo endpoints

Co-authored-by: LilithWittmann <891030+LilithWittmann@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 31, 2026

@copilot resolve conflicts.

Resolved in commit 4f00ee2. Merged origin/main into the PR branch, keeping our new jobdetails/logo endpoint changes and incorporating the **Update:** Falls client_id nicht funktioniert... note from main into the Authentifizierung section of the README. All 18 tests pass.

@LilithWittmann LilithWittmann marked this pull request as ready for review April 2, 2026 05:46
@LilithWittmann LilithWittmann merged commit d749e94 into main Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please align Jobsuche documentation/OpenAPI with the currently working live detail and logo endpoints

2 participants