2023:API Services (Service): Difference between revisions
Dgreenwood (talk | contribs) |
Dgreenwood (talk | contribs) |
||
| Line 50: | Line 50: | ||
=== Test Endpoints === | === Test Endpoints === | ||
'''''Be aware this section is a work-in-progress. For more information about each API endpoint, set up a test endpoint and try it out for yourself!''''' | |||
Here, you will find more information about testing the Grooper API endpoints. | Here, you will find more information about testing the Grooper API endpoints. | ||
Revision as of 13:42, 20 November 2023
You can perform Batch processing via REST API web calls by installing API Services.
About
The Grooper REST API (Application Programming Interface) allows for seamless integration between line of business solutions or custom-built software and your existing Grooper repositories and processes. A set of REST API methods allows users to push documents through Grooper Batch Processes and retrieve the results.
For example, using the Grooper REST API you can:
- Get information about a single Batch or all Batches
- Create a new Batch
- Delete a Batch
- Start or resume a Batch Process
- Get metadata for a specified Batch Folder.
- And more!
The first step in using the Grooper REST API is setting up an API endpoint for your 3rd party application to interact with a Grooper Repository. To do this, you will need to install a Grooper service in Grooper Config called API Services.
How To
Install the Grooper API Services
Enable a Grooper API Test Endpoint
When using the Grooper REST API, you may find it helpful to test out certain API calls before you implement them. By turning the Enable Test Endpoint property on, you can expose a Grooper REST API testing interface which you can access by entering the API URL in a browser.
From here, you can view and test the various REST API methods available to process documents in Grooper.
Test Endpoints
Be aware this section is a work-in-progress. For more information about each API endpoint, set up a test endpoint and try it out for yourself!
Here, you will find more information about testing the Grooper API endpoints.
- Note, parameters you can pass with the request are in curly brackets.
- Example: You would replace
{BatchID}with the GUID of a Batch.
Delete Batch
DELETE /api/v1/BatchProcessing/Batches/{BatchID}
Enter the GUID of a Batch and press "Execute". The Batch will be deleted in Grooper.
Get specific Batch info
GET /api/v1/BatchProcessing/Batches/{BatchID}
Enter the GUID of a Batch and press "Execute". You will receive a JSON response containing information about the Batch.
See below for an example response:
{
"Id": "c548fe6c-ef2a-4054-ae80-86ee256f79d1",
"Name": "2. GetBatchInfo",
"NodeIndex": 0,
"NumChildren": 2,
"ParentId": "a4100c92-a1f2-45fe-a0b2-edc9105f8c47",
"TypeName": "Grooper.Core.Batch",
"Created": "/Date(1699383023767-0600)/",
"CreatedBy": "company\\user",
"Priority": 3,
"RootFolderId": "e9145698-224a-44ca-9882-46e7be9227e7",
"Status": 4,
"StepNo": -1
}
Get all Batch info
GET /api/v1/BatchProcessing/Batches/All
Press "Execute" to return information about all production Batches in the Grooper Repository.
Get file stream
GET /api/v1/BatchProcessing/Files/{ItemId}/{FileName}
Enter the ID of the desired file and the filename and press "Execute". You will receive information about the file.
- In this example,
{ItemId}was set to the GUID of a Batch Folder and{FileName}was set to the name of an attached PDF. - The MIME type and file size for that file was returned.
- However, this could be used to return any number of things, including the full JSON for the Grooper.DocumentData.json file generated for a Batch Folder after it was extracted.









