### Describe Remote Provider Process Request
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/processes.rst
Example of a GET request to describe a specific process from a registered remote provider. Use the provider-prefixed route to access remote processes.
```http
GET {WEAVER_URL}/providers/my-service/processes/my-process
```
--------------------------------
### Install Weaver from GitHub (source)
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/installation.rst
Clone the Weaver repository and install it locally. This is recommended for development or contributing to the project.
```sh
git clone https://github.com/crim-ca/weaver.git
cd weaver
make install
```
--------------------------------
### Start Weaver WSGI Application Server
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/running.rst
Use this command to start the Weaver WSGI application server. Ensure MongoDB is accessible and configuration is set in weaver.ini.
```sh
$ make start # start Weaver WSGI application server
```
--------------------------------
### AWS S3 Bucket File List Example
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/package.rst
An example of a JSON file list from an AWS S3 bucket. Proper access must be granted if the bucket contents are not publicly accessible.
```json
{
"objects": [
{
"key": "file1.txt",
"size": 1024,
"last_modified": "2023-01-01T10:00:00Z"
},
{
"key": "subdir/file2.txt",
"size": 2048,
"last_modified": "2023-01-01T11:00:00Z"
}
]
}
```
--------------------------------
### Install Weaver from GitHub (pip)
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/installation.rst
Install Weaver directly from its GitHub repository using pip. This method is suitable for general installation.
```sh
pip install https://github.com/crim-ca/weaver
```
--------------------------------
### Describe Process Example (Python)
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/cli.rst
Use the client.describe() method to obtain a process definition programmatically. Pass the process name as an argument.
```python
client.describe("jsonarray2netcdf")
```
--------------------------------
### HTML File Index Example
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/package.rst
An example of an HTML file index where each reference to be staged should be contained in a ```` tag. The structure can be contained in a ``
``, an HTML list, or a plain list of ```` hyperlinks.
```html
```
--------------------------------
### JSON File List Example
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/package.rst
A JSON body returned from an endpoint obtained by a ``GET`` request, which advertises the corresponding ``Content-Type: application/json`` header. Each listed file to be staged should also be accessible on provided endpoints.
```json
{
"files": [
{
"path": "file1.txt",
"url": "/files/file1.txt"
},
{
"path": "subdir/file2.txt",
"url": "/files/subdir/file2.txt"
}
]
}
```
--------------------------------
### GET / — Landing Page
Source: https://context7.com/crim-ca/weaver/llms.txt
Returns service metadata, available endpoints, supported standards, and conformance links.
```APIDOC
## GET / — Landing Page
### Description
Returns service metadata, available endpoints, supported standards, and conformance links.
### Method
GET
### Endpoint
/
### Response
#### Success Response (200)
- **message** (string) - Service information.
- **configuration** (string) - The operational mode of Weaver (e.g., HYBRID).
- **description** (string) - A detailed description of the service.
- **parameters** (array) - List of available API parameters and their URLs.
- **links** (array) - Hypermedia links to related resources.
### Request Example
```bash
curl -X GET "https://example.com/weaver" \
-H "Accept: application/json"
```
### Response Example
```json
{
"message": "Weaver Information",
"configuration": "HYBRID",
"description": "Workflow Execution Management Service (EMS)...",
"parameters": [
{"name": "api", "enabled": true, "url": "https://example.com/weaver/wps3"},
{"name": "wps", "enabled": true, "url": "https://example.com/weaver/ows/wps"},
{"name": "vault", "enabled": true, "url": "https://example.com/weaver/vault"}
],
"links": [
{"href": "https://example.com/weaver", "rel": "self", "type": "application/json"},
{"href": "https://example.com/weaver/conformance", "rel": "http://www.opengis.net/def/rel/ogc/1.0/conformance"},
{"href": "https://example.com/weaver/processes", "rel": "http://www.opengis.net/def/rel/ogc/1.0/processes"}
]
}
```
```
--------------------------------
### Python: Deploy Process with CWL
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/cli.rst
Example of deploying a process using a CWL definition from a URL via the Weaver Python client.
```python
client.deploy(
process_id="docker-python-script-report",
cwl="https://raw.githubusercontent.com/crim-ca/weaver/master/docs/examples/docker-python-script-report.cwl",
)
```
--------------------------------
### Sample Vault File Uploaded JSON Output
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/cli.rst
This is an example of the JSON output received after a file has been successfully uploaded to the Vault.
```json
{
"message": "File uploaded successfully.",
"file_id": "f1234567-890a-1234-5678-90abcdef1234",
"filename": "file.txt",
"size": 1024,
"upload_time": "2023-10-27T10:00:00Z"
}
```
--------------------------------
### WPS Format with Media-Type
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/package.rst
This example demonstrates a WPS format with media-type specification. The 'formats' array lists supported MIME types.
```json
{
"id": "input",
"formats": [
{
"mimeType": "text/plain",
"type": "literal"
},
{
"mimeType": "application/json",
"type": "complex"
}
]
}
```
--------------------------------
### CWL Format with Namespace
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/package.rst
This example shows a CWL format with namespace specification. The 'inputs' array defines input parameters, including their formats.
```json
{
"inputs": [
{
"id": "input_file",
"type": "File",
"format": {
"class": "File",
"location": "http://example.com/schemas/file.json"
}
}
]
}
```
--------------------------------
### GET /processes — List Processes
Source: https://context7.com/crim-ca/weaver/llms.txt
Lists all registered processes. Supports paging, sorting, and optional provider listing.
```APIDOC
## GET /processes — List Processes
### Description
Lists all registered processes. Supports paging, sorting, and optional provider listing.
### Method
GET
### Endpoint
/processes
### Query Parameters
- **detail** (boolean) - Optional - If true, includes detailed information about each process.
- **page** (integer) - Optional - The page number for pagination.
- **limit** (integer) - Optional - The maximum number of processes to return per page.
- **sort** (string) - Optional - The field to sort the processes by (e.g., 'id').
### Response
#### Success Response (200)
- **processes** (array) - A list of registered processes.
- **id** (string) - The unique identifier of the process.
- **version** (string) - The version of the process.
- **title** (string) - The human-readable title of the process.
- **description** (string) - A description of the process.
- **jobControlOptions** (array) - Supported job control options (e.g., 'async-execute', 'sync-execute').
- **outputTransmission** (array) - Supported output transmission modes (e.g., 'value', 'reference').
- **links** (array) - Hypermedia links related to the process.
- **total** (integer) - The total number of processes available.
- **page** (integer) - The current page number.
- **limit** (integer) - The limit of processes per page.
- **count** (integer) - The number of processes returned in this response.
- **links** (array) - Hypermedia links for pagination and navigation.
### Request Example
```bash
curl -X GET "https://example.com/weaver/processes?detail=true&page=0&limit=10&sort=id" \
-H "Accept: application/json"
```
### Response Example
```json
{
"processes": [
{
"id": "echo_process",
"version": "1.0.0",
"title": "Echo Process",
"description": "Simple echo test process.",
"jobControlOptions": ["async-execute", "sync-execute"],
"outputTransmission": ["value", "reference"],
"links": [{"rel": "self", "href": "https://example.com/weaver/processes/echo_process"}]
}
],
"total": 1,
"page": 0,
"limit": 10,
"count": 1,
"links": []
}
```
```
--------------------------------
### Create Dummy Input Files for WPS Execution
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/tutorial.rst
Prepare input files required for WPS process execution. This example creates a dummy NetCDF file reference and a JSON file containing this reference.
```sh
$ echo 'Test WPS' > /tmp/test.nc
$ echo '["file:///tmp/test.nc"]' > /tmp/test.json
```
--------------------------------
### KVP Query Parameters with By-Reference Input and Output Selection
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/processes.rst
Shows how to use by-reference input with a specified content type and select output inclusion.
```text
input[href]=http://example.com/data.geojson&
input[type]=application/geo%2Bjson&
output[include]=true
```
--------------------------------
### Describe Process Example (CLI)
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/cli.rst
Use the 'weaver describe' command to retrieve the definition of a specific process. Requires the Weaver URL and the process name.
```shell
weaver describe -u ${WEAVER_URL} -p jsonarray2netcdf
```
--------------------------------
### Install Weaver with a Specific Conda Environment
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/installation.rst
Enforce the installation of Weaver into a specific Conda environment using the make command.
```sh
make CONDA_ENV= install
```
--------------------------------
### Example Data Sources Configuration (YAML)
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/configuration.rst
A sample YAML file demonstrating the structure for configuring data sources in Weaver. This file can also refer to other configurations like OpenSearch.
```yaml
---
```
--------------------------------
### Execute Process Example (Python)
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/cli.rst
Execute a process using the client.execute() method with a Python dictionary for inputs. This method automatically handles file uploads for local paths specified with a type.
```python
client.execute("Echo", {
"message": "Hello World!",
"value": 123456,
"array": [1.23, 4.56],
"multi": [
{"href": "http://example.com/data.json"},
{"href": "http://other.com/catalog.json"},
{"href": "http://another.com/data.json"},
],
"single": {
"href": "/workspace/data.xml", # note: uploaded to vault automatically before execution
"type": "text/xml",
}
})
```
--------------------------------
### Get Job Results
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/references.rst
Retrieves the results for a specific job.
```APIDOC
## GET /jobs/{jobID}/results (Results)
### Description
Retrieves the results for a given job.
### Method
GET
### Endpoint
/jobs/{jobID}/results
```
--------------------------------
### Request Asynchronous Execution Profiles
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/processes.rst
This example demonstrates how to request specific profiles for asynchronous execution, including input, output, and response profiles. It shows how to control the representation of job status and final results.
```text
?...
&input[href]=http://example.com/data.json
&input[type]=application/geo%2Bjson
&input[profile]=http://www.opengis.net/def/format/ogcapi-processes/0/geojson-geometry
&output[include]=true
&output[profile]=http://www.opengis.net/def/format/ogcapi-processes/0/geojson-feature-collection
&response=collection
&response[profile]=http://www.opengis.net/def/format/ogcapi-processes/0/stac
&response[prefer]=respond-async
&profile=ogc
&f=json
```
--------------------------------
### Get Job Outputs
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/references.rst
Retrieves the outputs for a specific job.
```APIDOC
## GET /jobs/{jobID}/outputs (Outputs)
### Description
Retrieves the outputs for a given job.
### Method
GET
### Endpoint
/jobs/{jobID}/outputs
```
--------------------------------
### Get Job Inputs
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/references.rst
Retrieves the inputs for a specific job.
```APIDOC
## GET /jobs/{jobID}/inputs (Inputs)
### Description
Retrieves the inputs for a given job.
### Method
GET
### Endpoint
/jobs/{jobID}/inputs
```
--------------------------------
### KVP Query Parameters with Multiple Inputs and Output Format
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/processes.rst
Demonstrates multiple inputs and specifying the output format, including metric and result details.
```text
values=1.5,2.3,4.7&metric=mean&
result[include]=true&
result[mediaType]=application/json
```
--------------------------------
### Get Process Package
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/references.rst
Retrieves the package associated with a specific process.
```APIDOC
## GET /processes/{processID}/package (Package)
### Description
Retrieves the package for a given process.
### Method
GET
### Endpoint
/processes/{processID}/package
```
--------------------------------
### Execute Process with Inline Inputs and Download Results
Source: https://context7.com/crim-ca/weaver/llms.txt
Execute a process with inputs provided directly in the command line as a JSON string. Results can be downloaded to a specified directory.
```bash
weaver -u https://example.com/weaver execute \
--process echo_process \
--inputs '{"stringInput": "hello"}' \
--monitor \
--download \
--outdir /tmp/results
```
--------------------------------
### Get Provenance Metadata
Source: https://context7.com/crim-ca/weaver/llms.txt
Retrieves provenance metadata for a job in a specified format.
```APIDOC
## Get Provenance Metadata
### Description
Retrieves the provenance metadata associated with a specific job. The metadata can be requested in various formats.
### Method
CLI Command
### Endpoint
weaver -u prov
### Parameters
#### Path Parameters
- **--job** (string) - Required - The unique identifier of the job.
#### Query Parameters
- **--prov-format** (string) - Required - The desired format for the provenance metadata (e.g., prov-json).
### Request Example
```bash
weaver -u https://example.com/weaver prov \
--job a1b2c3d4-... \
--prov-format prov-json
```
```
--------------------------------
### Complex KVP Query Parameters for Execution
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/processes.rst
An advanced example combining bounding box with CRS, by-reference input, literal threshold, and detailed output and response formatting.
```text
bbox=5.8,47.2,15.1,55.1&
bbox[crs]=http://www.opengis.net/def/
crs/OGC/1.3/CRS84&
data[href]=http://example.com/input.nc&
data[type]=application/netcdf&
threshold=0.75&
result[include]=true&
result[mediaType]=application/json&
result[encoding]=gzip&
response[format]=application/json&
response[prefer]=respond-async
```
--------------------------------
### Get Job Logs
Source: https://context7.com/crim-ca/weaver/llms.txt
Retrieves the execution log messages for a specific job.
```APIDOC
## GET /jobs/{jobID}/logs — Get Job Logs
### Description
Retrieve execution log messages for a job.
### Method
GET
### Endpoint
/jobs/{jobID}/logs
### Parameters
#### Path Parameters
- **jobID** (string) - Required - The unique identifier of the job whose logs are to be retrieved.
### Response
#### Success Response (200 OK)
- An array of log objects, each containing:
- **level** (string) - The severity level of the log message (e.g., 'INFO', 'ERROR').
- **message** (string) - The log message content.
- **timestamp** (string) - The timestamp when the log entry was created.
### Request Example
```bash
curl -X GET "https://example.com/weaver/jobs/a1b2c3d4-.../logs" \
-H "Accept: application/json"
```
### Response Example
```json
[
{"level": "INFO", "message": "Job started.", "timestamp": "2024-11-01T10:00:01Z"},
{"level": "INFO", "message": "Executing CWL tool...", "timestamp": "2024-11-01T10:00:02Z"}
]
```
```
--------------------------------
### Get Job Results
Source: https://context7.com/crim-ca/weaver/llms.txt
Retrieves the output results of a successfully completed job.
```APIDOC
## GET /jobs/{jobID}/results — Get Job Results
### Description
Retrieve the output results of a successfully completed job.
### Method
GET
### Endpoint
/jobs/{jobID}/results
### Parameters
#### Path Parameters
- **jobID** (string) - Required - The unique identifier of the job whose results are to be retrieved.
### Query Parameters
- **Prefer** (string) - Optional - Controls the representation of the results (e.g., 'return=minimal').
### Response
#### Success Response (200 OK)
- **field** (object) - Key-value pairs representing the job's output parameters and their values. The structure of the values depends on the output type (e.g., 'value' for simple types, 'href' for links to files).
### Request Example
```bash
curl -X GET "https://example.com/weaver/jobs/a1b2c3d4-.../results" \
-H "Accept: application/json" \
-H "Prefer: return=minimal"
```
### Response Example
```json
{
"stringOutput": {"value": "Hello, Weaver!"},
"fileOutput": {"href": "https://example.com/weaver/wpsoutputs/a1b2c3d4-.../output.nc"}
}
```
```
--------------------------------
### Get Job Status
Source: https://context7.com/crim-ca/weaver/llms.txt
Retrieves the current status and details of a specific job.
```APIDOC
## GET /jobs/{jobID} — Get Job Status
### Description
Retrieve the current status of a job. Supports JSON, XML, and HTML representations.
### Method
GET
### Endpoint
/jobs/{jobID}
### Parameters
#### Path Parameters
- **jobID** (string) - Required - The unique identifier of the job.
### Response
#### Success Response (200 OK)
- **jobID** (string) - The unique identifier of the job.
- **processID** (string) - The identifier of the process associated with the job.
- **status** (string) - The current status of the job (e.g., 'successful', 'running', 'failed').
- **message** (string) - A descriptive message about the job's status.
- **created** (string) - The timestamp when the job was created.
- **started** (string) - The timestamp when the job started execution.
- **finished** (string) - The timestamp when the job finished execution.
- **duration** (string) - The duration of the job execution (ISO 8601 duration format).
- **progress** (integer) - The completion progress of the job (0-100).
- **links** (array) - Links to related resources, such as results.
### Request Example
```bash
curl -X GET "https://example.com/weaver/jobs/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "Accept: application/json"
```
### Response Example
```json
{
"jobID": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"processID": "echo_process",
"status": "successful",
"message": "Job completed successfully.",
"created": "2024-11-01T10:00:00Z",
"started": "2024-11-01T10:00:01Z",
"finished": "2024-11-01T10:00:05Z",
"duration": "PT4S",
"progress": 100,
"links": [
{"rel": "results", "href": "https://example.com/weaver/jobs/a1b2c3d4-.../results"}
]
}
```
```
--------------------------------
### Get Job Status
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/references.rst
Retrieves the status of a specific job within a process.
```APIDOC
## GET /processes/{processID}/jobs/{jobID} (GetStatus)
### Description
Retrieves the status of a specific job.
### Method
GET
### Endpoint
/processes/{processID}/jobs/{jobID}
```
--------------------------------
### Execute Process with Vault Files (HTTP Request)
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/processes.rst
Sample HTTP request to execute a process that uses files stored in the Vault. Ensure the 'X-Auth-Vault' header is correctly formatted, especially when multiple vault files are involved.
```http
POST /jobs HTTP/1.1
Host: weaver.example.com
Content-Type: application/json
X-Auth-Vault: token YOUR_TOKEN id "vault-id-1"
{
"script": "echo \"Hello World\"",
"inputs": {
"file1": {
"class": "File",
"location": "vault:///path/to/your/file.txt"
}
}
}
```
--------------------------------
### Get Job Exceptions
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/references.rst
Fetches the exceptions for a specific job within a process.
```APIDOC
## GET /processes/{processID}/jobs/{jobID}/exceptions (GetLogs)
### Description
Retrieves the exceptions for a specific job.
### Method
GET
### Endpoint
/processes/{processID}/jobs/{jobID}/exceptions
```
--------------------------------
### Get Job Logs
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/references.rst
Fetches the logs for a specific job within a process.
```APIDOC
## GET /processes/{processID}/jobs/{jobID}/logs (GetLogs)
### Description
Retrieves the logs for a specific job.
### Method
GET
### Endpoint
/processes/{processID}/jobs/{jobID}/logs
```
--------------------------------
### Retrieve Process Description
Source: https://context7.com/crim-ca/weaver/llms.txt
Fetch the description of a deployed process, including its inputs, outputs, and capabilities. Use the ?schema=OGC query parameter for explicit OGC schema representation.
```bash
curl -X GET "https://example.com/weaver/processes/echo_process" \
-H "Accept: application/json"
```
```bash
curl -X GET "https://example.com/weaver/processes/echo_process?schema=OGC" \
-H "Accept: application/json"
```
--------------------------------
### Get Job Statistics
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/references.rst
Retrieves statistics for a specific job identified by its jobID.
```APIDOC
## GET /jobs{jobID}/statistics
### Description
Retrieves statistics for a specific job.
### Method
GET
### Endpoint
/jobs{jobID}/statistics
### Parameters
#### Path Parameters
- **jobID** (string) - Required - The unique identifier of the job.
### Response
#### Success Response (200)
- **field1** (type) - Description
#### Response Example
```json
{
"example": "response body"
}
```
```
--------------------------------
### CWL I/O Key-Value Mapping Example
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/package.rst
This snippet demonstrates a CWL input/output definition using the key-value mapping format. It is equivalent to the array list format.
```json
{
"inputs": {
"single-str": {
"type": "string"
},
"multi-file": {
"type": "File[]"
}
},
"outputs": {
"output-1": {
"type": "File"
},
"output-2": {
"type": "File"
}
}
}
```
--------------------------------
### Get Capabilities
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/references.rst
Retrieves the capabilities of the Weaver service, listing available processes.
```APIDOC
## GET /processes (GetCapabilities)
### Description
Retrieves the capabilities of the Weaver service, listing available processes.
### Method
GET
### Endpoint
/processes
### Response
#### Success Response (200)
- **field1** (type) - Description
#### Response Example
```json
{
"example": "response body"
}
```
```
--------------------------------
### Execute Process with Inline Inputs and Download Results
Source: https://context7.com/crim-ca/weaver/llms.txt
Executes a process with inputs provided directly in the command line as a JSON string. Results can be automatically downloaded.
```APIDOC
## Execute Process with Inline Inputs and Download Results
### Description
Executes a specified process using inputs provided directly as a JSON string. The command can monitor the job and automatically download the results to a specified directory.
### Method
CLI Command
### Endpoint
weaver -u execute
### Parameters
#### Path Parameters
- **--process** (string) - Required - The name of the process to execute.
- **--inputs** (string) - Required - A JSON string representing the input parameters.
#### Query Parameters
- **--monitor** - Optional - If present, the command will monitor the job's progress until completion.
- **--download** - Optional - If present, the results will be downloaded.
- **--outdir** (string) - Optional - The directory where the results should be saved when --download is used.
### Request Example
```bash
weaver -u https://example.com/weaver execute \
--process echo_process \
--inputs '{"stringInput": "hello"}' \
--monitor \
--download \
--outdir /tmp/results
```
```
--------------------------------
### Get Provenance Metadata
Source: https://context7.com/crim-ca/weaver/llms.txt
Retrieve provenance metadata for a job in a specified format, such as PROV-JSON.
```bash
weaver -u https://example.com/weaver prov \
--job a1b2c3d4-... \
--prov-format prov-json
```
--------------------------------
### Get Job Errors
Source: https://context7.com/crim-ca/weaver/llms.txt
Retrieves detailed error information and exceptions if a job failed.
```APIDOC
## GET /jobs/{jobID}/exceptions — Get Job Errors
### Description
Retrieve error details and exceptions if a job failed.
### Method
GET
### Endpoint
/jobs/{jobID}/exceptions
### Parameters
#### Path Parameters
- **jobID** (string) - Required - The unique identifier of the job whose errors are to be retrieved.
### Response
#### Success Response (200 OK)
- An array of error objects, each containing:
- **Code** (string) - An error code.
- **Locator** (string) - A locator for the error, if applicable.
- **Text** (string) - A textual description of the error.
### Request Example
```bash
curl -X GET "https://example.com/weaver/jobs/a1b2c3d4-.../exceptions" \
-H "Accept: application/json"
```
### Response Example
```json
[
{
"Code": "NoApplicableCode",
"Locator": "None",
"Text": "Process execution failed: [error details]"
}
]
```
```
--------------------------------
### Update Process with PATCH Request
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/processes.rst
This example demonstrates a PATCH request to update a process definition. It shows how to specify the process ID and version, and includes a sample request body for modifying process metadata. This operation results in a PATCH revision.
```http
PATCH /processes/test-process:1.2.3 HTTP/1.1
Host: localhost:8080
Content-Type: application/json
{
"description": "A new description for the test process."
}
```
--------------------------------
### GET /versions — API Version Info
Source: https://context7.com/crim-ca/weaver/llms.txt
Returns the current Weaver version.
```APIDOC
## GET /versions — API Version Info
### Description
Returns the current Weaver version.
### Method
GET
### Endpoint
/versions
### Response
#### Success Response (200)
- **versions** (array) - A list of version information objects.
- **name** (string) - The name of the component (e.g., 'weaver').
- **version** (string) - The version number.
- **type** (string) - The type of component (e.g., 'api').
### Request Example
```bash
curl -X GET "https://example.com/weaver/versions" \
-H "Accept: application/json"
```
### Response Example
```json
{
"versions": [
{"name": "weaver", "version": "6.11.0", "type": "api"}
]
}
```
```
--------------------------------
### Deploy Docker App as CWL CommandLineTool
Source: https://context7.com/crim-ca/weaver/llms.txt
Defines a Docker-based command-line application as an OGC process using CWL. Requires Docker and network access configurations.
```json
{
"processDescription": {
"process": {
"id": "ndvi-calculator",
"title": "NDVI Calculator",
"description": "Computes NDVI from Sentinel-2 bands.",
"keywords": ["earth-observation", "ndvi"]
}
},
"executionUnit": [
{
"unit": {
"cwlVersion": "v1.2",
"class": "CommandLineTool",
"$namespaces": {"ogc": "http://www.opengis.net/ogcapi-processes-1/1.0/"},
"requirements": {
"DockerRequirement": {"dockerPull": "registry.example.com/ndvi-tool:1.0"},
"NetworkAccess": {"networkAccess": false},
"ResourceRequirement": {"coresMin": 2, "ramMin": 4096}
},
"baseCommand": ["python", "/app/ndvi.py"],
"arguments": ["--output-dir", "$(runtime.outdir)"],
"inputs": {
"red_band": {
"type": "File",
"inputBinding": {"prefix": "--red"},
"format": "http://www.opengis.net/def/glossary/term/ImageFile"
},
"nir_band": {
"type": "File",
"inputBinding": {"prefix": "--nir"},
"format": "http://www.opengis.net/def/glossary/term/ImageFile"
},
"scale_factor": {
"type": "float?",
"default": 0.0001,
"inputBinding": {"prefix": "--scale"}
}
},
"outputs": {
"ndvi_output": {
"type": "File",
"outputBinding": {"glob": "ndvi_result.tif"},
"format": "image/tiff; application=geotiff"
}
}
}
}
]
}
```
--------------------------------
### Simple KVP Query Parameter
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/processes.rst
A basic example of a KVP query parameter with a URL-encoded space.
```text
message=Hello%20World
```
--------------------------------
### Run Local File Server for Weaver
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/installation.rst
Start a simple HTTP server to serve files locally. This is useful for Weaver when it expects input/output files to be accessible via HTTP.
```sh
python -m http.server 8000 -b 127.0.0.1 --directory
```
--------------------------------
### Get Job Logs, Errors, and Stats
Source: https://context7.com/crim-ca/weaver/llms.txt
Retrieves logs, errors, or statistics for a specific job.
```APIDOC
## Get Job Logs, Errors, and Stats
### Description
Retrieves specific information about a job, such as its logs, errors, or statistics.
### Method
CLI Command
### Endpoint
weaver -u logs | errors | stats
### Parameters
#### Path Parameters
- **--job** (string) - Required - The unique identifier of the job.
### Request Example
```bash
weaver -u https://example.com/weaver logs --job a1b2c3d4-...
weaver -u https://example.com/weaver errors --job a1b2c3d4-...
weaver -u https://example.com/weaver stats --job a1b2c3d4-...
```
```
--------------------------------
### Python: Undeploy Process
Source: https://github.com/crim-ca/weaver/blob/master/docs/source/cli.rst
Example of undeploying a process using its ID via the Weaver Python client.
```python
client.undeploy("docker-python-script-report")
```