> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.odr.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.odr.io/_mcp/server.

# job [update]

PUT https://job
Content-Type: application/json

POST a template id and pass the email of the creating user to create a new dataset with metadata corresponding to the template ID.

This requires an x-auth header with a valid API Token.

Reference: https://docs.odr.io/odr-search-api-v-4/job-update

## Request

### Body (application/json)

This endpoint expects an object.

- `user_email` (string, required)
- `job` (object, required)
  - `id` (integer, required)
  - `job_type` (string, required)
  - `total` (integer, required)
  - `current` (integer, required)
  - `started` (object, required)
    - `date` (string, required)
    - `timezone_type` (integer, required)
    - `timezone` (string, required)
  - `additional_data` (string, required)
  - `target_entity` (string, required)
  - `completed` (any, optional)
  - `viewed` (any, optional)

## Response

### 200

OK

- `database_uuid` (string, required)
- `internal_id` (integer, required)
- `record_name` (integer, required)
- `record_uuid` (string, required)
- `template_uuid` (string, required)
- `metadata_for_uuid` (string, required)
- `_record_metadata` (object, required)
  - `_create_date` (string, required)
  - `_updated_date` (string, required)
  - `_create_auth` (string, required)
  - `_public_date` (string, required)
- `fields` (list of any, required)
- `records` (list of any, required)

## Examples

**Request**

```json
{
  "user_email": "nate@opendatarepository.org",
  "job": {
    "id": 1875,
    "job_type": "ima_update",
    "total": 755,
    "current": 150,
    "started": {
      "date": "2024-07-27 18:39:51.000000",
      "timezone_type": 3,
      "timezone": "UTC"
    },
    "additional_data": "none",
    "target_entity": "ima_page"
  }
}
```

**Response**

```json
{
  "database_uuid": "48e7e532a715a1c1cb02bed99138",
  "internal_id": 326,
  "record_name": 326,
  "record_uuid": "b14c1b13587b9db6832a8635cb78",
  "template_uuid": "93253b88d314bc2f11848f0eca15",
  "metadata_for_uuid": "b418ef9777d61f2f0a88144ed71a",
  "_record_metadata": {
    "_create_date": "2022-08-24 20:56:03",
    "_updated_date": "2022-08-24 20:56:03",
    "_create_auth": "nate@opendatarepository.org",
    "_public_date": "2200-01-01 00:00:00"
  },
  "fields": [],
  "records": []
}
```

**SDK Code**

```python job [update]_example
import requests

url = "https://https/job"

payload = {
    "user_email": "nate@opendatarepository.org",
    "job": {
        "id": 1875,
        "job_type": "ima_update",
        "total": 755,
        "current": 150,
        "started": {
            "date": "2024-07-27 18:39:51.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "additional_data": "none",
        "target_entity": "ima_page"
    }
}
headers = {"Content-Type": "application/json"}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript job [update]_example
const url = 'https://https/job';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json'},
  body: '{"user_email":"nate@opendatarepository.org","job":{"id":1875,"job_type":"ima_update","total":755,"current":150,"started":{"date":"2024-07-27 18:39:51.000000","timezone_type":3,"timezone":"UTC"},"additional_data":"none","target_entity":"ima_page"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go job [update]_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://https/job"

	payload := strings.NewReader("{\n  \"user_email\": \"nate@opendatarepository.org\",\n  \"job\": {\n    \"id\": 1875,\n    \"job_type\": \"ima_update\",\n    \"total\": 755,\n    \"current\": 150,\n    \"started\": {\n      \"date\": \"2024-07-27 18:39:51.000000\",\n      \"timezone_type\": 3,\n      \"timezone\": \"UTC\"\n    },\n    \"additional_data\": \"none\",\n    \"target_entity\": \"ima_page\"\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby job [update]_example
require 'uri'
require 'net/http'

url = URI("https://https/job")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"user_email\": \"nate@opendatarepository.org\",\n  \"job\": {\n    \"id\": 1875,\n    \"job_type\": \"ima_update\",\n    \"total\": 755,\n    \"current\": 150,\n    \"started\": {\n      \"date\": \"2024-07-27 18:39:51.000000\",\n      \"timezone_type\": 3,\n      \"timezone\": \"UTC\"\n    },\n    \"additional_data\": \"none\",\n    \"target_entity\": \"ima_page\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java job [update]_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://https/job")
  .header("Content-Type", "application/json")
  .body("{\n  \"user_email\": \"nate@opendatarepository.org\",\n  \"job\": {\n    \"id\": 1875,\n    \"job_type\": \"ima_update\",\n    \"total\": 755,\n    \"current\": 150,\n    \"started\": {\n      \"date\": \"2024-07-27 18:39:51.000000\",\n      \"timezone_type\": 3,\n      \"timezone\": \"UTC\"\n    },\n    \"additional_data\": \"none\",\n    \"target_entity\": \"ima_page\"\n  }\n}")
  .asString();
```

```php job [update]_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://https/job', [
  'body' => '{
  "user_email": "nate@opendatarepository.org",
  "job": {
    "id": 1875,
    "job_type": "ima_update",
    "total": 755,
    "current": 150,
    "started": {
      "date": "2024-07-27 18:39:51.000000",
      "timezone_type": 3,
      "timezone": "UTC"
    },
    "additional_data": "none",
    "target_entity": "ima_page"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp job [update]_example
using RestSharp;

var client = new RestClient("https://https/job");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"user_email\": \"nate@opendatarepository.org\",\n  \"job\": {\n    \"id\": 1875,\n    \"job_type\": \"ima_update\",\n    \"total\": 755,\n    \"current\": 150,\n    \"started\": {\n      \"date\": \"2024-07-27 18:39:51.000000\",\n      \"timezone_type\": 3,\n      \"timezone\": \"UTC\"\n    },\n    \"additional_data\": \"none\",\n    \"target_entity\": \"ima_page\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift job [update]_example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "user_email": "nate@opendatarepository.org",
  "job": [
    "id": 1875,
    "job_type": "ima_update",
    "total": 755,
    "current": 150,
    "started": [
      "date": "2024-07-27 18:39:51.000000",
      "timezone_type": 3,
      "timezone": "UTC"
    ],
    "additional_data": "none",
    "target_entity": "ima_page"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://https/job")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```