Jobs API
The Notehub jobs API provides RESTful methods that can be used to manage batch jobs.
| Name | HTTP Request |
|---|---|
| Get Jobs | GET /v1/projects/{projectOrProductUID}/jobs |
| Create Job | POST /v1/projects/{projectOrProductUID}/jobs |
| Get Job | GET /v1/projects/{projectOrProductUID}/jobs/{jobUID} |
| Delete Job | DELETE /v1/projects/{projectOrProductUID}/jobs/{jobUID} |
| Run Job | POST /v1/projects/{projectOrProductUID}/jobs/{jobUID}/run |
| Get Job Runs | GET /v1/projects/{projectOrProductUID}/jobs/{jobUID}/runs |
| Get Job Run | GET /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID} |
| Cancel Job Run | POST /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}/cancel |
Get Jobs Notehub
List all batch jobs for a project.
| HTTP Method: | GET |
| URL: | https://api.notefile.net/v1/projects/{projectOrProductUID}/jobs |
| Path Parameters: |
|
| Minimum Notehub project-level role: | viewer |
| Required HTTP Headers: | Authorization: Bearer <token>, where the token is a valid authentication token. |
curl -X GET
-L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/jobs'
-H 'Authorization: Bearer <access_token>'Response Members
jobs
array of objects
An array of batch job objects. Each object contains the following fields:
jobs.job_uid
string
The globally-unique identifier of the batch job.
jobs.name
string
The name of the batch job.
jobs.created
UNIX Epoch time
The time the job was created.
jobs.created_by
string
The email address of the user who created the job.
{
"jobs": [
{
"job_uid": "00000000-0000-0000-0000-000000000000",
"name": "My Batch Job",
"created": 1750773741,
"created_by": "User Name"
}
]
}Create Job Notehub
Create a new batch job.
| HTTP Method: | POST |
| URL: | https://api.notefile.net/v1/projects/{projectOrProductUID}/jobs |
| Path Parameters: |
|
| Minimum Notehub project-level role: | developer |
| Required HTTP Headers: | Authorization: Bearer <token>, where the token is a valid authentication token. |
name
string (required)
A name for the batch job.
This argument must be provided in the query string.
body
object (required)
The job definition as a JSON object.
This object must be provided as the request's body.
curl -X POST
-L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/jobs?name=<name>'
-H 'Authorization: Bearer <access_token>'
-H 'Content-Type: application/json'
-d '<job_definition>'Response Members
job_uid
string
The globally-unique identifier of the newly created batch job.
{
"job_uid": "00000000-0000-0000-0000-000000000000"
}Get Job Notehub
Get details on a batch job.
| HTTP Method: | GET |
| URL: | https://api.notefile.net/v1/projects/{projectOrProductUID}/jobs/{jobUID} |
| Path Parameters: |
|
| Minimum Notehub project-level role: | viewer |
| Required HTTP Headers: | Authorization: Bearer <token>, where the token is a valid authentication token. |
curl -X GET
-L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/jobs/<jobUID>'
-H 'Authorization: Bearer <access_token>'Response Members
job_uid
string
The globally-unique identifier of the batch job.
name
string
The name of the batch job.
created
UNIX Epoch time
The time the job was created.
created_by
string
The user who created the job.
definition
object
The job definition. Structure varies by job type.
{
"job_uid": "00000000-0000-0000-0000-000000000000",
"name": "My Batch Job",
"created": 1750773741,
"created_by": "User Name",
"definition": {}
}Delete Job Notehub
Delete a batch job.
| HTTP Method: | DELETE |
| URL: | https://api.notefile.net/v1/projects/{projectOrProductUID}/jobs/{jobUID} |
| Path Parameters: |
|
| Minimum Notehub project-level role: | developer |
| Required HTTP Headers: | Authorization: Bearer <token>, where the token is a valid authentication token. |
curl -X DELETE
-L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/jobs/<jobUID>'
-H 'Authorization: Bearer <access_token>'Response Members
success
boolean
Whether the job was successfully deleted.
{
"success": true
}Run Job Notehub
Execute a batch job.
| HTTP Method: | POST |
| URL: | https://api.notefile.net/v1/projects/{projectOrProductUID}/jobs/{jobUID}/run |
| Path Parameters: |
|
| Minimum Notehub project-level role: | developer |
| Required HTTP Headers: | Authorization: Bearer <token>, where the token is a valid authentication token. |
dry_run
boolean (optional, default false)
When true, runs the job in dry-run mode without making actual changes.
curl -X POST
-L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/jobs/<jobUID>/run'
-H 'Authorization: Bearer <access_token>'Response Members
report_uid
string
The globally-unique identifier of the job run. Use this to check the run's status with Get Job Run.
{
"report_uid": "00000000-0000-0000-0000-000000000000"
}Get Job Runs Notehub
List all runs for a specific batch job.
| HTTP Method: | GET |
| URL: | https://api.notefile.net/v1/projects/{projectOrProductUID}/jobs/{jobUID}/runs |
| Path Parameters: |
|
| Minimum Notehub project-level role: | viewer |
| Required HTTP Headers: | Authorization: Bearer <token>, where the token is a valid authentication token. |
status
string (optional)
Filter runs by status.
dry_run
boolean (optional)
Filter runs by whether they were executed as a dry run.
curl -X GET
-L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/jobs/<jobUID>/runs'
-H 'Authorization: Bearer <access_token>'Response Members
runs
array of objects
An array of job run objects. Each object contains the following fields:
runs.report_uid
string
The globally-unique identifier of the job run.
runs.job_uid
string
The globally-unique identifier of the batch job.
runs.job_name
string
The name of the batch job.
runs.status
string
The current status of the job run.
runs.dry_run
boolean
Whether the job run was executed in dry-run mode.
runs.submitted_by
string
The email address of the user who submitted the job run.
runs.submitted
UNIX Epoch time
The time the job run was submitted.
runs.started
UNIX Epoch time
The time the job run started executing.
runs.updated
UNIX Epoch time
The time the job run was last updated.
runs.cancel
boolean
Whether a cancellation has been requested for this job run.
{
"runs": [
{
"report_uid": "00000000-0000-0000-0000-000000000000",
"job_uid": "00000000-0000-0000-0000-000000000001",
"job_name": "my-batch-job",
"status": "completed",
"dry_run": false,
"submitted_by": "user@example.com",
"submitted": 1700000000,
"updated": 1700000060,
"cancel": false
}
]
}Get Job Run Notehub
Get the result of a job execution.
| HTTP Method: | GET |
| URL: | https://api.notefile.net/v1/projects/{projectOrProductUID}/jobs/runs/{reportUID} |
| Path Parameters: |
|
| Minimum Notehub project-level role: | viewer |
| Required HTTP Headers: | Authorization: Bearer <token>, where the token is a valid authentication token. |
curl -X GET
-L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/jobs/runs/<reportUID>'
-H 'Authorization: Bearer <access_token>'Response Members
report_uid
string
The globally-unique identifier of the job run.
job_uid
string
The globally-unique identifier of the batch job.
job_name
string
The name of the batch job.
status
string
The current status of the job run.
dry_run
boolean
Whether the job run was executed in dry-run mode.
submitted_by
string
The email address of the user who submitted the job run.
submitted
UNIX Epoch time
The time the job run was submitted.
started
UNIX Epoch time
The time the job run started executing.
updated
UNIX Epoch time
The time the job run was last updated.
completed
UNIX Epoch time
The time the job run completed.
cancel
boolean
Whether a cancellation has been requested for this job run.
results
object
The results of the job run. Structure varies by job type.
{
"report_uid": "00000000-0000-0000-0000-000000000000",
"job_uid": "00000000-0000-0000-0000-000000000001",
"job_name": "my-batch-job",
"status": "completed",
"dry_run": false,
"submitted_by": "user@example.com",
"submitted": 1700000000,
"updated": 1700000060,
"completed": 1700000060,
"results": {}
}Cancel Job Run Notehub
Cancel a running job execution.
| HTTP Method: | POST |
| URL: | https://api.notefile.net/v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}/cancel |
| Path Parameters: |
|
| Minimum Notehub project-level role: | developer |
| Required HTTP Headers: | Authorization: Bearer <token>, where the token is a valid authentication token. |
curl -X POST
-L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/jobs/runs/<reportUID>/cancel'
-H 'Authorization: Bearer <access_token>'Response Members
successful
boolean
Whether the cancellation request was successfully submitted.
{
"successful": true
}