API: publish
POST /api/v1/publish/article
Section titled “POST /api/v1/publish/article”Publish Article
Publish one article to its Hugo instance (real the publishing hub flow, async).
404s if the article/instance is unknown; 400 if the instance has no the publishing hub config (so a publish that can never succeed isn’t accepted).
Auth: Authorization: Bearer <token> required
| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
Idempotency-Key | header | no | string | Optional. |
Request body: application/json — schema PublishArticleRequest
| Field | Type | Required | Description |
|---|---|---|---|
article_guid | integer | yes | |
instance_id | string | yes |
Example:
{ "article_guid": 31567, "instance_id": "example-prod-hugo-vps"}Responses:
| Code | Meaning | Body |
|---|---|---|
202 | Successful Response | TaskAccepted |
401 | Missing or invalid authentication credentials | ErrorResponse |
422 | Validation Error | HTTPValidationError |
POST /api/v1/publish/batch
Section titled “POST /api/v1/publish/batch”Publish Batch
Auth: Authorization: Bearer <token> required
| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
Idempotency-Key | header | no | string | Optional. |
Request body: application/json — schema PublishBatchRequest
| Field | Type | Required | Description |
|---|---|---|---|
article_guids | array of integer | yes | |
instance_id | string | yes |
Example:
{ "article_guids": [ 31567, 31568 ], "instance_id": "example-prod-hugo-vps"}Responses:
| Code | Meaning | Body |
|---|---|---|
202 | Successful Response | TaskAccepted |
401 | Missing or invalid authentication credentials | ErrorResponse |
422 | Validation Error | HTTPValidationError |
POST /api/v1/publish/deploy
Section titled “POST /api/v1/publish/deploy”Deploy
Auth: Authorization: Bearer <token> required
| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
Idempotency-Key | header | no | string | Optional. |
Request body: application/json — schema DeployRequest
| Field | Type | Required | Description |
|---|---|---|---|
full_rebuild | boolean | no | |
instance_id | string | yes |
Example:
{ "full_rebuild": false, "instance_id": "example-prod-hugo-vps"}Responses:
| Code | Meaning | Body |
|---|---|---|
202 | Successful Response | TaskAccepted |
401 | Missing or invalid authentication credentials | ErrorResponse |
422 | Validation Error | HTTPValidationError |