Orcish API

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:

FieldTypeRequiredConstraintsDescription
namestringYesNot nullProject name
githubRepoUrlstringYesNot null, uniqueGitHub repository URL
descriptionstringYesNot nullProject 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 id field is automatically generated as a UUID
  • The githubRepoUrl must be unique across all projects
  • The createdAt and updatedAt fields are automatically set to the current timestamp
  • The resetDate field is optional and can be null
  • The deletedAt field is used for soft deletes and is null for active projects
  • If a duplicate GitHub URL is detected (either through explicit check or database constraint), a 409 Conflict error is returned

On this page