Job ID does not match name in Nomad

I’m submitting a job through JSON / API and I get this error response back. I search but there was nothing I could find. I check the Job ID and name and their the same.

curl -XPUT -d @"prepros_1.json" http://127.0.0.1:4646/v1/job/example
Here’s the bash command

Here’s a snippet of the json

{
    "Job": {
        "Region": null,
        "Namespace": null,
        "ID": "prepros_1",
        "Name": "prepros_1",
        "Type": "batch",
        "Priority": null,
        "AllAtOnce": null,
        "Datacenters": [
            "dc1"
        ],
        "Constraints": null,
        "Affinities": null,

Silly me. I was submitting to the wrong end point. I think the API JSON example in the tutorial has this URL:
http://127.0.0.1:4646/v1/job/example
I changed it to
http://127.0.0.1:4646/v1/job/

and it worked

1 Like