---
sidebar_position: 1
---

import { HutchDevRquestDetails } from "@site/src/components/admonitions/hutch-dev-team";

# Hutch Usage

This document describes the behaviour of Hutch's interactions with BC|OS.

As Hutch interacts with the **Tasks** API in BC|OS REST API v2, you should use the following base URL for all requests on this page:

    http(s)://{rquest-domain(:port)}/bcos-rest/api/task/

and authenticate all requests with a Basic Auth header.

<HutchDevRquestDetails />

## Getting the next query job

Endpoint schema details can be found [here](endpoint-schema#apitasknextjobcollectionid)

| Method  | Path                               |
| ------- | ---------------------------------- |
| **GET** | `nextjob/{rquest-collection-id}.a` |

:::caution
Note the `.a` after the collection id, which indicates the type of job (query).
:::

### Parameters

| Parameter              | Description                                  |
| ---------------------- | -------------------------------------------- |
| `rquest-collection-id` | ID of the Collection to get the next Job for |

## Posting results

Endpoint schema details can be found [here](endpoint-schema#apitaskresultuuidcollectionid)

| Method   | Path                                   |
| -------- | -------------------------------------- |
| **POST** | `result/{uuid}/{rquest-collection-id}` |

### Parameters

| Parameter              | Description                             |
| ---------------------- | --------------------------------------- |
| `uuid`                 | ID of the Job these are the results for |
| `rquest-collection-id` | ID of the Collection the Job was for    |
