Add initial Copenhagen Truck Wash API documentation, including API overview, authentication, error handling, introduction, and Writerside configuration.
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE topic
|
||||
SYSTEM "https://resources.jetbrains.com/writerside/1.0/xhtml-entities.dtd">
|
||||
<topic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd"
|
||||
title="Error Handling" id="Error-Handling">
|
||||
|
||||
<p>This section details how the API handles and reports errors.</p>
|
||||
|
||||
<chapter title="Standard Error Format" id="error-format">
|
||||
<p>Errors are returned as a JSON object with an error message and code:</p>
|
||||
<code-block lang="json">
|
||||
{
|
||||
"success": false,
|
||||
"message": "Invalid API token",
|
||||
"code": "AUTH_001"
|
||||
}
|
||||
</code-block>
|
||||
</chapter>
|
||||
|
||||
<chapter title="HTTP Status Codes" id="status-codes">
|
||||
<p>The API uses standard HTTP status codes:</p>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Code</td>
|
||||
<td>Meaning</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>200</td>
|
||||
<td>OK - Request succeeded</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>Bad Request - Invalid parameters</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>401</td>
|
||||
<td>Unauthorized - Missing or invalid token</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>Forbidden - Insufficient permissions</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>404</td>
|
||||
<td>Not Found - Resource does not exist</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500</td>
|
||||
<td>Server Error - Internal server failure</td>
|
||||
</tr>
|
||||
</table>
|
||||
</chapter>
|
||||
</topic>
|
||||
Reference in New Issue
Block a user