External REST API
AutoPage - External REST API
Section titled “AutoPage - External REST API”AutoPage provides a REST API that allows you to trigger rules from external systems such as CI/CD pipelines, scripts, or third-party tools.
Overview
Section titled “Overview”The External REST API allows you to trigger a specific AutoPage rule for a given Jira issue by providing the rule ID and the issue ID.
API Key
Section titled “API Key”Each rule can generate its own API key for authentication. The API key is a cryptographically secure, base64-encoded token.
Generating an API Key
Section titled “Generating an API Key”- Open the rule configuration in Jira.
- Enable the Incoming Webhook trigger.
- The API key and endpoint URL are displayed in the trigger configuration.
Authentication
Section titled “Authentication”All API requests must include the API key in the x-autopage-api-key HTTP header:
x-autopage-api-key: <your-api-key>Requests without a valid API key will receive a 403 Forbidden response.
Endpoint
Section titled “Endpoint”Triggers a specific rule for a specific Jira issue.
URL Format:
{webTriggerUrl}?method=triggerRule&ruleId={ruleId}&issueId={issueId}| Parameter | Description |
|---|---|
webTriggerUrl | The base URL displayed in the rule’s webhook trigger configuration. |
ruleId | The ID of the AutoPage rule to trigger. |
issueId | The Jira issue ID or key (e.g., PROJ-123 or 10001). |
Example Request
Section titled “Example Request”curl -X POST "{webTriggerUrl}?method=triggerRule&ruleId=abc123&issueId=PROJ-42" \ -H "x-autopage-api-key: <your-api-key>" \ -H "Content-Type: application/json" \ -H "Accept: application/json"Integration Examples
Section titled “Integration Examples”Jira Automation
Section titled “Jira Automation”AutoPage integrates directly with Jira Automation via the webhook trigger. This allows you to leverage Jira Automation’s powerful rule engine for advanced trigger conditions like “Version released”, “Sprint finished”, or “Pull request approved”.
CI/CD Pipelines
Section titled “CI/CD Pipelines”You can trigger AutoPage from your CI/CD pipeline to generate or update documentation pages when code is deployed:
- Store the API key as a secret in your CI/CD system.
- Add a pipeline step that calls the AutoPage API with the relevant issue ID.
- The Confluence page will be created or updated based on the rule configuration.
Custom Scripts
Section titled “Custom Scripts”Any system capable of making HTTP requests can trigger AutoPage rules. Use the endpoint URL and API key as described above.