CUPS.GetJobsAsJSON
------------------

Queries some jobs and returns JSON Array.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CUPS](component_CUPS.md) | [10.5](newinversion105.md) | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ❌ No |

MBS( "CUPS.GetJobsAsJSON" { ; Name; OnlyMyJobs; whichJobs } ) 

**MBS**( **"CUPS.GetJobsAsJSON";** /\* Queries some jobs and returns JSON Array. \*/  
**$Name**; /\* Optional; Name of the printer queue to query.   
If no name or empty string is specified, we get all queues.e.g. "Brother\_DCP\_8085DN" \*/   
**$OnlyMyJobs**; /\* Optional; Pass either "my" for your users jobs or "all" for all jobs.e.g. "all" \*/   
**$whichJobs**) /\* Optional; Pass "active" to get only active jobs, "all" for all jobs or "complete" for completed jobs.e.g. "complete" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Name | Name of the printer queue to query.    If no name or empty string is specified, we get all queues. | "Brother\_DCP\_8085DN" | Optional |
| OnlyMyJobs | Pass either "my" for your users jobs or "all" for all jobs. | "all" | Optional |
| whichJobs | Pass "active" to get only active jobs, "all" for all jobs or "complete" for completed jobs. | "complete" | Optional |

### Result

Returns JSON array or error.

### Description

Queries some jobs and returns JSON Array.  
States value can be Pending, Held, Processing, Stopped, Cancelled, Aborted or Completed.  
  
See also newer [Printer.GetJobsAsJSON](PrinterGetJobsAsJSON.md) function.  
### Examples

Find all jobs:

 MBS ("CUPS.GetJobsAsJSON"; ""; "all"; "all")  
### See also

- [CUPS.GetJobCompletionTime](CUPSGetJobCompletionTime.md)
- [CUPS.GetJobCreationTime](CUPSGetJobCreationTime.md)
- [CUPS.GetJobFormat](CUPSGetJobFormat.md)
- [CUPS.GetJobID](CUPSGetJobID.md)
- [CUPS.GetJobPriority](CUPSGetJobPriority.md)
- [CUPS.GetJobSize](CUPSGetJobSize.md)
- [CUPS.GetJobState](CUPSGetJobState.md)
- [CUPS.GetJobTitle](CUPSGetJobTitle.md)
- [CUPS.GetJobUser](CUPSGetJobUser.md)
- [Printer.GetJobsAsJSON](PrinterGetJobsAsJSON.md)

### Release notes

- **Version 10.5**
    - Added [CUPS.GetPrintersAsJSON](https://www.mbsplugins.eu/CUPSGetPrintersAsJSON.shtml) and [CUPS.GetJobsAsJSON](https://www.mbsplugins.eu/CUPSGetJobsAsJSON.shtml) functions.

### Blog Entries

- [New in MBS FileMaker Plugin 10.5](https://www.mbsplugins.de/archive/2020-11-23/New_in_MBS_FileMaker_Plugin_10/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.5pr2](https://www.mbsplugins.de/archive/2020-10-05/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 6/2020, Seite 26](https://filemaker-magazin.de/neuigkeit/4118-Appetithappen-FMM_202006)

This function checks for a license.

Created 5th October 2020 , last changed 18th May 2026

  
[CUPS.GetJobUser](CUPSGetJobUser.md) - [CUPS.GetJobsCount](CUPSGetJobsCount.md)

[HTML Version](CUPSGetJobsAsJSON.shtml)