# Redmine Extractor (`datamule/redmine-extractor`) Actor

Point at any Redmine instance (Ruby core, self-hosted project trackers) and get one structured row per issue: subject, project, tracker, status, priority, author, timestamps. Also lists projects and can attach issue journals.

- **URL**: https://apify.com/datamule/redmine-extractor.md
- **Developed by:** [Datamule](https://apify.com/datamule) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Redmine Extractor

A GENERIC **"point at any Redmine instance"** Apify actor — the issue-tracker
sibling of the Bugzilla/Gitea/Gerrit generic extractors. Redmine is the Rails
project-management / issue tracker behind Ruby-core (bugs.ruby-lang.org), many
distros, and thousands of self-hosted installs, and every install ships the same
native **JSON REST API** with anonymous read on public projects — so ONE actor
spans every Redmine install in existence, no per-tracker scraper.

### Input

| Field | Mode | Meaning |
|-------|------|---------|
| `sources` (**required**) | all | One or more Redmine base URLs — `https://www.redmine.org`, `https://bugs.ruby-lang.org`, or any self-hosted install. `/issues.json` / `/projects.json` is appended for you. |
| `mode` | — | `issues` (default) or `projects`. |
| `projectId` | issues | Restrict to a project by numeric id or identifier (e.g. `redmine`, `ruby-master`). |
| `statusId` | issues | `*` for all statuses, `open`, `closed`, or a numeric id. Redmine returns only open issues by default. |
| `trackerId` | issues | Restrict to a numeric tracker id (per-server, e.g. `1` = Defect). |
| `includeJournals` | issues | Opt-in per-issue fetch that attaches journal (comment) count + the last comment note. Makes one extra request per issue — pair with a small `maxRecords`. |
| `maxRecords` | all | Global cap across every source (one row = one billable event). |
| `apiKey` | all | Optional Redmine API key for a private instance (`X-Redmine-API-Key`). Never logged. |
| `extraHeaders` | all | Optional extra request headers (JSON). |

No filter is required in issues mode — an unfiltered Redmine issue query is valid
and returns the open issues across all public projects. Run `projects` mode first
to discover valid project identifiers.

### Modes

* **issues** (default) — paginated `/issues.json` → one flat row per issue:
  `id`, `subject`, `description`, `project_id`/`project_name`, `tracker_name`,
  `status_name`, `status_is_closed`, `priority_name`, `category_name`,
  `author_name`/`author_id`, `assigned_to_name`/`assigned_to_id`, `done_ratio`,
  `is_private`, `created_on`, `updated_on`, `closed_on`, plus a lossless `_raw`.
  With `includeJournals`, also `journal_count`, `last_note`, `last_note_on`,
  `last_note_by`.
* **projects** — `/projects.json` → one row per public project (`id`, `name`,
  `identifier`, `description`, `status`, `is_public`, `created_on`, `updated_on`).

### Behaviour

* Every field is read by **key presence** (`dict.get`) — Redmine servers differ in
  which optional fields they populate (e.g. `www.redmine.org` issue `status` omits
  `is_closed` while `bugs.ruby-lang.org` includes it), so an absent field yields
  `null` for that column, never a crash. Unknown fields survive in `_raw`.
* Timestamps (`created_on` / `updated_on` / `closed_on`) are normalized to
  ISO-8601 `Z`; a value that is already a bare date is kept as `YYYY-MM-DD`.
* A source behind an **anti-bot interstitial** (a non-JSON HTTP 200), a `403` /
  `404`, or a JSON body without the expected `issues` / `projects` array (the REST
  API disabled) is a clean **skip-with-warning** — the runner continues with the
  other sources. The run only **fails fast (exit 91)** when *every* source was
  skipped, so nothing broken ships and the cloud smoke gate stays honest.
* A valid instance with 0 matching issues → 0 records and a clean exit 0.
  Unpopular is fine; the actor never fabricates rows.

### Pricing

Pay-per-event: one `record` charge per emitted dataset row.

### Development

```bash
python3.12 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python tests_logic.py          # pure-logic tests (no network)
apify validate-schema
apify run                       # local run (set .actor storage INPUT.json)
````

# Actor input Schema

## `sources` (type: `array`):

One or more Redmine server base URLs. Redmine ships a native JSON REST API with anonymous read on public projects, so ONE actor works against any install: https://www.redmine.org (the Redmine project itself), https://bugs.ruby-lang.org (Ruby core tracker), or any self-hosted / project instance. Paste the server root as given (the /issues.json or /projects.json path is appended for you). When several are listed, each is queried in turn and a source that is unreachable, behind an anti-bot wall, or has the REST API disabled is skipped with a warning.

## `mode` (type: `string`):

What to extract. issues (default): one row per issue from /issues.json — optionally filtered by Project, Status, or Tracker. projects: one row per public project from /projects.json (name, identifier, description, status, is\_public) — a cheap way to discover valid project identifiers to feed back into issues mode.

## `projectId` (type: `string`):

ISSUES MODE filter. Restrict to a Redmine project by numeric id (e.g. 1) OR project identifier (e.g. redmine on www.redmine.org, ruby-master on bugs.ruby-lang.org). Run projects mode first to list valid identifiers. Leave empty to fetch issues across all public projects on the server.

## `statusId` (type: `string`):

ISSUES MODE filter. Redmine returns only OPEN issues by default. Pass \* to return issues of ALL statuses (open + closed), open for open only, closed for closed only, or a specific numeric status id (e.g. 1 = New). Leave empty for Redmine's default (open issues).

## `trackerId` (type: `string`):

ISSUES MODE filter. Restrict to a numeric tracker id (e.g. 1 = Defect/Bug, 2 = Feature on many installs). Tracker ids are per-server; leave empty to fetch every tracker.

## `includeJournals` (type: `boolean`):

ISSUES MODE. When enabled, each issue gets a bounded extra fetch (/issues/{id}.json?include=journals) that attaches the journal (comment) count plus the most recent comment note, its author, and its timestamp. This makes one additional request PER issue, so pair it with a small Max records value. Off by default (the list endpoint alone does not return journals).

## `maxRecords` (type: `integer`):

A GLOBAL cap on the number of rows to emit across ALL sources (each row is one issue/project and one billable event). Pagination stops as soon as the cap is reached, so a small value is a cheap, deterministic sample. Leave empty to fetch every matching record — a broad issues query on a large server can return very many rows.

## `apiKey` (type: `string`):

Optional Redmine API key for reading a private instance or private projects (sent as the X-Redmine-API-Key header). NOT required for public projects on the listed servers. Never logged.

## `extraHeaders` (type: `object`):

Optional extra HTTP headers as a JSON object, e.g. {"x-api-key": "..."} for a gated / gateway-fronted instance. Not required for the public servers. Header values are never logged.

## Actor input object example

```json
{
  "sources": [
    "https://www.redmine.org"
  ],
  "mode": "issues",
  "includeJournals": false,
  "maxRecords": 100
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "sources": [
        "https://www.redmine.org"
    ],
    "maxRecords": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("datamule/redmine-extractor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "sources": ["https://www.redmine.org"],
    "maxRecords": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("datamule/redmine-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "sources": [
    "https://www.redmine.org"
  ],
  "maxRecords": 100
}' |
apify call datamule/redmine-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=datamule/redmine-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Redmine Extractor",
        "description": "Point at any Redmine instance (Ruby core, self-hosted project trackers) and get one structured row per issue: subject, project, tracker, status, priority, author, timestamps. Also lists projects and can attach issue journals.",
        "version": "0.1",
        "x-build-id": "pEHPEQivgTozBIUBJ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/datamule~redmine-extractor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-datamule-redmine-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/datamule~redmine-extractor/runs": {
            "post": {
                "operationId": "runs-sync-datamule-redmine-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/datamule~redmine-extractor/run-sync": {
            "post": {
                "operationId": "run-sync-datamule-redmine-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "sources"
                ],
                "properties": {
                    "sources": {
                        "title": "Redmine server URL(s)",
                        "type": "array",
                        "description": "One or more Redmine server base URLs. Redmine ships a native JSON REST API with anonymous read on public projects, so ONE actor works against any install: https://www.redmine.org (the Redmine project itself), https://bugs.ruby-lang.org (Ruby core tracker), or any self-hosted / project instance. Paste the server root as given (the /issues.json or /projects.json path is appended for you). When several are listed, each is queried in turn and a source that is unreachable, behind an anti-bot wall, or has the REST API disabled is skipped with a warning.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "issues",
                            "projects"
                        ],
                        "type": "string",
                        "description": "What to extract. issues (default): one row per issue from /issues.json — optionally filtered by Project, Status, or Tracker. projects: one row per public project from /projects.json (name, identifier, description, status, is_public) — a cheap way to discover valid project identifiers to feed back into issues mode.",
                        "default": "issues"
                    },
                    "projectId": {
                        "title": "Project (issues mode)",
                        "type": "string",
                        "description": "ISSUES MODE filter. Restrict to a Redmine project by numeric id (e.g. 1) OR project identifier (e.g. redmine on www.redmine.org, ruby-master on bugs.ruby-lang.org). Run projects mode first to list valid identifiers. Leave empty to fetch issues across all public projects on the server."
                    },
                    "statusId": {
                        "title": "Status (issues mode)",
                        "type": "string",
                        "description": "ISSUES MODE filter. Redmine returns only OPEN issues by default. Pass * to return issues of ALL statuses (open + closed), open for open only, closed for closed only, or a specific numeric status id (e.g. 1 = New). Leave empty for Redmine's default (open issues)."
                    },
                    "trackerId": {
                        "title": "Tracker (issues mode)",
                        "type": "string",
                        "description": "ISSUES MODE filter. Restrict to a numeric tracker id (e.g. 1 = Defect/Bug, 2 = Feature on many installs). Tracker ids are per-server; leave empty to fetch every tracker."
                    },
                    "includeJournals": {
                        "title": "Include journals (issues mode)",
                        "type": "boolean",
                        "description": "ISSUES MODE. When enabled, each issue gets a bounded extra fetch (/issues/{id}.json?include=journals) that attaches the journal (comment) count plus the most recent comment note, its author, and its timestamp. This makes one additional request PER issue, so pair it with a small Max records value. Off by default (the list endpoint alone does not return journals).",
                        "default": false
                    },
                    "maxRecords": {
                        "title": "Max records (global cap)",
                        "minimum": 1,
                        "type": "integer",
                        "description": "A GLOBAL cap on the number of rows to emit across ALL sources (each row is one issue/project and one billable event). Pagination stops as soon as the cap is reached, so a small value is a cheap, deterministic sample. Leave empty to fetch every matching record — a broad issues query on a large server can return very many rows."
                    },
                    "apiKey": {
                        "title": "Redmine API key",
                        "type": "string",
                        "description": "Optional Redmine API key for reading a private instance or private projects (sent as the X-Redmine-API-Key header). NOT required for public projects on the listed servers. Never logged."
                    },
                    "extraHeaders": {
                        "title": "Extra request headers",
                        "type": "object",
                        "description": "Optional extra HTTP headers as a JSON object, e.g. {\"x-api-key\": \"...\"} for a gated / gateway-fronted instance. Not required for the public servers. Header values are never logged."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
