Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Job Metadata API endpoints #3846

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Job Metadata API endpoints #3846

wants to merge 1 commit into from

Conversation

mauretto78
Copy link
Contributor

@mauretto78 mauretto78 commented Feb 28, 2025

New endpoints

Three new endpoints are available to handle job metadata:

  1. [GET] api/app/jobs/[id]/[:password]/metadata

Use this endpoint to fetch all job metadata.

Response example:

[
    {
        "id": "5",
        "id_job": "5",
        "password": "a9039454f5cc",
        "key": "character_counter_count_tags",
        "value": "1"
    },
    {
        "id": "6",
        "id_job": "5",
        "password": "a9039454f5cc",
        "key": "character_counter_mode",
        "value": "exclude_cjk"
    },
    {
        "id": "7",
        "id_job": "5",
        "password": "a9039454f5cc",
        "key": "tm_prioritization",
        "value": "0"
    }
]
  1. [POST] api/app/jobs/[id]/[:password]/metadata

Use this endpoint to create or modify a single job metadata.

This endpoint requires a JSON payload like this:

{
        "key": "foo",
        "value": "bar"
    }

If everything worked fine, a response example like this is returned:

{
        "id": "5",
        "id_job": "5",
        "password": "a9039454f5cc",
        "key": "foo",
        "value": "bar"
    }
  1. [DELETE] api/app/jobs/[:id]/[:password]/metadata/[:key]

Use this endpoint to delete a job metadata by its key (example: foo).

If everything works fine, a response like this is returned:

{
    "id": 45
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant