Projects API
Complete API documentation for Project endpoints
Projects API for the Horde livestream review
You can submit your project through the Orcish API.
Create Project Endpoint
Create a new project in the database.
Endpoint: POST /api/projects
Request Body:
{
"name": "Orcish Battle Manager",
"githubRepoUrl": "https://github.com/orcclan/battle-manager",
"description": "A comprehensive battle management system for orcish clans"
}Request Body Schema:
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
name | string | Yes | Not null | Project name |
githubRepoUrl | string | Yes | Not null, unique | GitHub repository URL |
description | string | Yes | Not null | Project description |
Response: 201 Created
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Orcish Battle Manager",
"githubRepoUrl": "https://github.com/orcclan/battle-manager",
"description": "A comprehensive battle management system for orcish clans",
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"resetDate": "2024-12-31T23:59:59.000Z",
"deletedAt": null
}Error Responses:
400 Bad Request:{ "error": "name, githubRepoUrl, and description are required" }409 Conflict:{ "error": "A project with this GitHub URL already exists" }500 Internal Server Error: Server error during project creation
Example Request:
curl -X POST https://orcish-api.com/api/projects \
-H "Content-Type: application/json" \
-d '{
"name": "Orcish Battle Manager",
"githubRepoUrl": "https://github.com/orcclan/battle-manager",
"description": "A comprehensive battle management system for orcish clans",
"resetDate": "2024-12-31T23:59:59.000Z"
}'Example Request Without Reset Date:
curl -X POST https://orcish-api.com/api/projects \
-H "Content-Type: application/json" \
-d '{
"name": "Orcish Battle Manager",
"githubRepoUrl": "https://github.com/orcclan/battle-manager",
"description": "A comprehensive battle management system for orcish clans"
}'Notes:
- The
idfield is automatically generated as a UUID - The
githubRepoUrlmust be unique across all projects - The
createdAtandupdatedAtfields are automatically set to the current timestamp - The
resetDatefield is optional and can benull - The
deletedAtfield is used for soft deletes and isnullfor active projects - If a duplicate GitHub URL is detected (either through explicit check or database constraint), a
409 Conflicterror is returned