> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/r/rayventory-source-codes.md).

# RayVentory Source Codes

RayVentory is an inventory platform that stores scan results in result database tables. OctoXLabs reads one table through the RayVentory API and maps its columns to source code repository records.

## Use cases

* List repositories that RayVentory reports.

```
Adapters = rayventory-source-codes
```

## Before you begin

### Network

| Source              | Destination                    | Port                        | Protocol                     |
| ------------------- | ------------------------------ | --------------------------- | ---------------------------- |
| OctoXLabs connector | RayVentory host (IP you enter) | 443 (default, configurable) | HTTPS (HTTP when SSL is off) |

### Required permissions

| Scope or role | Permission | Needed for                                                      |
| ------------- | ---------- | --------------------------------------------------------------- |
| API key       | Read       | Result database table (`/v1/resultDatabase/{table_name}/paged`) |

## Create credentials in RayVentory Source Codes

The source instructions do not describe how to create the API key in RayVentory. Use a key with read access to the result database table. Not verified: where the key is created.

## Connection parameters

| Parameter         | Required | Type    | Default    | Description                                                       |
| ----------------- | -------- | ------- | ---------- | ----------------------------------------------------------------- |
| IP                | Yes      | String  | None       | IP address of the RayVentory host.                                |
| Port              | No       | Integer | 443        | Port of the RayVentory API.                                       |
| API Key           | Yes      | String  | None       | RayVentory API key with read access. Sent in the `ApiKey` header. |
| Table Name        | Yes      | String  | None       | Name of the result database table to read.                        |
| Primary Key Field | No       | String  | PrimaryKey | Column that holds the unique ID of each row.                      |
| SSL               | No       | Boolean | True       | Use HTTPS.                                                        |
| Timeout           | No       | Integer | 30         | Seconds to wait for API responses.                                |

## Troubleshooting

| Error message | Cause                                                                                                                                      | Fix                                                                                                                          |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| Status Code:  | The API answered with a status other than the one the connector expects. The message also lists the URL, the method and the response body. | Read the status code and the response body in the message, then check the credentials, the permissions and the network path. |

## Change history
