Resources
post /reverse
Reverses a given input string.
curl -X POST \
-H "Content-type: application/json"
-d @body.json \
undefined/reverse
Request Body chevron_right expand_more
ReverseRequest ReverseRequest
application/json
Inherits: object
Parameter | Type | Description |
---|---|---|
input* | string |
Request Body
{
"input": "hello world"
}
200 OK chevron_right expand_more
Success
Job was processed and queued successfully.
JobResponse JobResponse
application/json
Inherits: object
Parameter | Type | Description |
---|---|---|
jobID* | string | Pattern: ^[\dA-Fa-f]{32}$ Min. length: 32 Max. length: 32 |
status* | string | Enum:
Inherits: lib.JobStatus |
queuePosition | integer | Format: int32 |
Response Body
queued
{
"jobID": "9ab9a5886d6abb9ebc82a40f770a1db3",
"status": "queued",
"queuePosition": 3
}
in-progress
{
"jobID": "9ab9a5886d6abb9ebc82a40f770a1db3",
"status": "in-progress"
}
complete
{
"jobID": "9ab9a5886d6abb9ebc82a40f770a1db3",
"status": "complete"
}
failed
{
"jobID": "9ab9a5886d6abb9ebc82a40f770a1db3",
"status": "failed"
}
expired
{
"jobID": "9ab9a5886d6abb9ebc82a40f770a1db3",
"status": "expired"
}
500 Internal Server Error chevron_right expand_more
Internal Server Error
An unexpected exception was thrown while attempting to process the request.
Internal Server Error ServerError
application/json
Parameter | Type | Description |
---|---|---|
status* | string | Enum:
Inherits: error.ErrorType |
message* | string | |
requestId* | string |
Response Body
{
"status": "server-error",
"message": "Datastore connection lost",
"requestId": "b296c3d9-4032-41b1-906e-c97ccfc447e3"
}
post /word-count
Counts the words in an uploaded file.
curl -X POST \
-H "Content-type: multipart/form-data"
-d @file \
undefined/word-count
Request Body chevron_right expand_more
multipart/form-data
multipart/form-data
200 OK chevron_right expand_more
Success
Job was processed and queued successfully.
JobResponse JobResponse
application/json
Inherits: object
Parameter | Type | Description |
---|---|---|
jobID* | string | Pattern: ^[\dA-Fa-f]{32}$ Min. length: 32 Max. length: 32 |
status* | string | Enum:
Inherits: lib.JobStatus |
queuePosition | integer | Format: int32 |
500 Internal Server Error chevron_right expand_more
Internal Server Error
An unexpected exception was thrown while attempting to process the request.
Internal Server Error ServerError
application/json
Parameter | Type | Description |
---|---|---|
status* | string | Enum:
Inherits: error.ErrorType |
message* | string | |
requestId* | string |
Response Body
{
"status": "server-error",
"message": "Datastore connection lost",
"requestId": "b296c3d9-4032-41b1-906e-c97ccfc447e3"
}
get /jobs/{job-id}
Gets the status of the target job.
Parameters chevron_right expand_more
Parameter | Type | Description |
---|---|---|
Path | ||
job-id* | string | Pattern: ^[\dA-Fa-f]{32}$ Min. length: 32 Max. length: 32 |
curl -X GET \
undefined/jobs/{job-id}
200 OK chevron_right expand_more
Success
The target job exists and its status returned.
JobResponse JobResponse
application/json
Inherits: object
Parameter | Type | Description |
---|---|---|
jobID* | string | Pattern: ^[\dA-Fa-f]{32}$ Min. length: 32 Max. length: 32 |
status* | string | Enum:
Inherits: lib.JobStatus |
queuePosition | integer | Format: int32 |
Response Body
queued
{
"jobID": "9ab9a5886d6abb9ebc82a40f770a1db3",
"status": "queued",
"queuePosition": 3
}
in-progress
{
"jobID": "9ab9a5886d6abb9ebc82a40f770a1db3",
"status": "in-progress"
}
complete
{
"jobID": "9ab9a5886d6abb9ebc82a40f770a1db3",
"status": "complete"
}
failed
{
"jobID": "9ab9a5886d6abb9ebc82a40f770a1db3",
"status": "failed"
}
expired
{
"jobID": "9ab9a5886d6abb9ebc82a40f770a1db3",
"status": "expired"
}
404 Not Found chevron_right expand_more
Not Found
The target {job-id}
was not found.
Not Found NotFoundError
application/json
The requested resource was not found on this server.
Discriminator: status
Discriminator value: not-found
Inherits: error.Error
Parameter | Type | Description |
---|---|---|
status* | string | Enum:
Inherits: error.ErrorType |
message* | string |
Response Body
{
"status": "not-found",
"message": "the requested resource could not be found"
}
500 Internal Server Error chevron_right expand_more
Internal Server Error
An unexpected exception was thrown while attempting to process the request.
Internal Server Error ServerError
application/json
Parameter | Type | Description |
---|---|---|
status* | string | Enum:
Inherits: error.ErrorType |
message* | string | |
requestId* | string |
Response Body
{
"status": "server-error",
"message": "Datastore connection lost",
"requestId": "b296c3d9-4032-41b1-906e-c97ccfc447e3"
}
get /jobs/{job-id}/files
Lists the files available for a completed job.
Parameters chevron_right expand_more
Parameter | Type | Description |
---|---|---|
Path | ||
job-id* | string | Pattern: ^[\dA-Fa-f]{32}$ Min. length: 32 Max. length: 32 |
curl -X GET \
undefined/jobs/{job-id}/files
200 OK chevron_right expand_more
Success
The job has completed and has files available.
application/json
application/json
Parameter | Type | Description |
---|---|---|
[] |
Response Body
[
"output"
]
403 Forbidden chevron_right expand_more
Forbidden
The job has not yet completed and thus cannot yet be queried for files.
Forbidden ForbiddenError
application/json
Server understood the request but is refusing it.
Could be caused by incorrect instructions or an authenticated client requesting a resource or action that requires permissions that the client does not have assigned.
Discriminator: status
Discriminator value: forbidden
Inherits: error.Error
Parameter | Type | Description |
---|---|---|
status* | string | Enum:
Inherits: error.ErrorType |
message* | string |
Response Body
{
"status": "forbidden",
"message": "the current user is not permitted to perform this action"
}
404 Not Found chevron_right expand_more
Not Found
The target {job-id}
was not found.
Not Found NotFoundError
application/json
The requested resource was not found on this server.
Discriminator: status
Discriminator value: not-found
Inherits: error.Error
Parameter | Type | Description |
---|---|---|
status* | string | Enum:
Inherits: error.ErrorType |
message* | string |
Response Body
{
"status": "not-found",
"message": "the requested resource could not be found"
}
500 Internal Server Error chevron_right expand_more
Internal Server Error
An unexpected exception was thrown while attempting to process the request.
Internal Server Error ServerError
application/json
Parameter | Type | Description |
---|---|---|
status* | string | Enum:
Inherits: error.ErrorType |
message* | string | |
requestId* | string |
Response Body
{
"status": "server-error",
"message": "Datastore connection lost",
"requestId": "b296c3d9-4032-41b1-906e-c97ccfc447e3"
}
get /jobs/{job-id}/files/{file-name}
Returns the target file from a completed job.
Parameters chevron_right expand_more
Parameter | Type | Description |
---|---|---|
Path | ||
job-id* | string | Pattern: ^[\dA-Fa-f]{32}$ Min. length: 32 Max. length: 32 |
file-name* | string | Min. length: 1 |
curl -X GET \
undefined/jobs/{job-id}/files/{file-name}
200 OK chevron_right expand_more
Success
The job has completed and the target file exists to return.
Headers
Parameter | Type | Description |
---|---|---|
Content-Disposition* | string |
text/plain
text/plain
Response Body
dlrow olleh
403 Forbidden chevron_right expand_more
Forbidden
The job has not yet completed and thus cannot yet be queried for files.
Forbidden ForbiddenError
application/json
Server understood the request but is refusing it.
Could be caused by incorrect instructions or an authenticated client requesting a resource or action that requires permissions that the client does not have assigned.
Discriminator: status
Discriminator value: forbidden
Inherits: error.Error
Parameter | Type | Description |
---|---|---|
status* | string | Enum:
Inherits: error.ErrorType |
message* | string |
Response Body
{
"status": "forbidden",
"message": "the current user is not permitted to perform this action"
}
404 Not Found chevron_right expand_more
Not Found
Either the target {job-id}
was not found or no file with the name {file-name}
exists.
Not Found NotFoundError
application/json
The requested resource was not found on this server.
Discriminator: status
Discriminator value: not-found
Inherits: error.Error
Parameter | Type | Description |
---|---|---|
status* | string | Enum:
Inherits: error.ErrorType |
message* | string |
Response Body
{
"status": "not-found",
"message": "the requested resource could not be found"
}
500 Internal Server Error chevron_right expand_more
Internal Server Error
An unexpected exception was thrown while attempting to process the request.
Internal Server Error ServerError
application/json
Parameter | Type | Description |
---|---|---|
status* | string | Enum:
Inherits: error.ErrorType |
message* | string | |
requestId* | string |
Response Body
{
"status": "server-error",
"message": "Datastore connection lost",
"requestId": "b296c3d9-4032-41b1-906e-c97ccfc447e3"
}
post /jobs/statuses
Lookup the statuses for the list of job IDs posted.
The response will be a mapping whose keys are the posted job IDs and whose values are the status of the job represented by the associated ID.
If a job ID in the input list does not appear to be a real/valid job ID, the ID will be omitted from the response object.
Each status value will be a valid JobStatus enum item, meaning they will each be one of:
- "queued"
- "in-progress"
- "complete"
- "failed"
- "expired"
curl -X POST \
-H "Content-type: application/json"
-d @body.json \
undefined/jobs/statuses
Request Body chevron_right expand_more
application/json
application/json
Parameter | Type | Description |
---|---|---|
[] | string | Pattern: ^[\dA-Fa-f]{32}$ Min. length: 32 Max. length: 32 |
200 OK chevron_right expand_more
Success
JobBulkStatusResponse JobBulkStatusResponse
application/json
Inherits: object
Parameter | Type | Description |
---|
500 Internal Server Error chevron_right expand_more
Internal Server Error
An unexpected exception was thrown while attempting to process the request.
Internal Server Error ServerError
application/json
Parameter | Type | Description |
---|---|---|
status* | string | Enum:
Inherits: error.ErrorType |
message* | string | |
requestId* | string |
Response Body
{
"status": "server-error",
"message": "Datastore connection lost",
"requestId": "b296c3d9-4032-41b1-906e-c97ccfc447e3"
}
get /api
Renders the API documentation for this service.
curl -X GET \
undefined/api
200 OK chevron_right expand_more
text/html
text/html
get /health
Prints information about the overall service health.
curl -X GET \
undefined/health
200 OK chevron_right expand_more
HealthResponse HealthResponse
application/json
Health details about the service
Inherits: object
Parameter | Type | Description |
---|---|---|
status* | string | Status describes the overall service state. A status of "healthy" indicates that everything is running smoothly and all service dependencies are reachable and online. A status of "unhealthy" indicates that something is wrong with either this service or one or more of it's dependency services. Enum:
|
dependencies* | array | A list of external services that this service depends on and some details about them. |
dependencies[] | object | Inherits: DependencyStatus |
dependencies[].name* | string | Name of the external depdendency. |
dependencies[].reachable* | boolean | Whether or not the external service is reachable. |
dependencies[].online* | string | Whether or not the external service is online and available for requests. Enum:
|
info* | object | Additional properties: Yes |
info.threads* | integer | Min. value: 1 |
info.uptime* | string | |
info.uptimeMillis* | integer | Min. value: 1 Format: int64 |
500 Internal Server Error chevron_right expand_more
Internal Server Error ServerError
application/json
Parameter | Type | Description |
---|---|---|
status* | string | Enum:
Inherits: error.ErrorType |
message* | string | |
requestId* | string |
Response Body
{
"status": "server-error",
"message": "Datastore connection lost",
"requestId": "b296c3d9-4032-41b1-906e-c97ccfc447e3"
}
get /metrics
Prometheus metrics for the service.
curl -X GET \
undefined/metrics
200 OK chevron_right expand_more
text/plain
text/plain
Security Schemes
Types
Type ReverseRequest (object)
Inherits: object
Model
Parameter | Type | Description |
---|---|---|
input* | string |
Type JobResponse (object)
Inherits: object
Model
Parameter | Type | Description |
---|---|---|
jobID* | string | Pattern: ^[\dA-Fa-f]{32}$ Min. length: 32 Max. length: 32 |
status* | string | Enum:
Inherits: lib.JobStatus |
queuePosition | integer | Format: int32 |
Type JobBulkStatusResponse (object)
Inherits: object
Model
Parameter | Type | Description |
---|
Type JobStatus (string)
- queued
- in-progress
- complete
- failed
- expired
Inherits: string
Type Error (object)
Discriminator: status
Inherits: object
Model
Parameter | Type | Description |
---|---|---|
status* | string | Enum:
Inherits: error.ErrorType |
message* | string |
Type ErrorType (string)
- bad-request
- unauthorized
- forbidden
- not-found
- bad-method
- invalid-input
- server-error
Inherits: string
Type BadRequestError (object)
Request could not be parsed or was otherwise unusable.
Discriminator: status
Discriminator value: bad-request
Inherits: error.Error
Model
Parameter | Type | Description |
---|---|---|
status* | string | Enum:
Inherits: error.ErrorType |
message* | string |
Examples
{
"status": "bad-request",
"message": "malformed JSON"
}
Type UnauthorizedError (object)
Unauthenticated client requested a resource that requires authentication.
Discriminator: status
Discriminator value: unauthorized
Inherits: error.Error
Model
Parameter | Type | Description |
---|---|---|
status* | string | Enum:
Inherits: error.ErrorType |
message* | string |
Examples
{
"status": "unauthorized",
"message": "users must be logged in to access this resource"
}
Type ForbiddenError (object)
Server understood the request but is refusing it.
Could be caused by incorrect instructions or an authenticated client requesting a resource or action that requires permissions that the client does not have assigned.
Discriminator: status
Discriminator value: forbidden
Inherits: error.Error
Model
Parameter | Type | Description |
---|---|---|
status* | string | Enum:
Inherits: error.ErrorType |
message* | string |
Examples
{
"status": "forbidden",
"message": "the current user is not permitted to perform this action"
}
Type NotFoundError (object)
The requested resource was not found on this server.
Discriminator: status
Discriminator value: not-found
Inherits: error.Error
Model
Parameter | Type | Description |
---|---|---|
status* | string | Enum:
Inherits: error.ErrorType |
message* | string |
Examples
{
"status": "not-found",
"message": "the requested resource could not be found"
}
Type MethodNotAllowedError (object)
The HTTP method used to request a resource is not allowed or configured by the server.
Discriminator: status
Discriminator value: bad-method
Inherits: error.Error
Model
Parameter | Type | Description |
---|---|---|
status* | string | Enum:
Inherits: error.ErrorType |
message* | string |
Examples
{
"status": "bad-method",
"message": "PUT requests are not permitted on this endpoint"
}
Type UnprocessableEntityError (object)
The request payload or parameters are correctly structured but fail resource specific validation.
Discriminator: status
Discriminator value: invalid-input
Inherits: error.Error
Model
Parameter | Type | Description |
---|---|---|
status* | string | Enum:
Inherits: error.ErrorType |
message* | string | |
errors* | object | Additional properties: Yes |
errors.general* | array | Non-field specific errors. |
errors.general[] | string | |
errors.byKey* | object | Field specific errors Additional properties: Yes |
errors.byKey.//* | array | |
errors.byKey.//[] | string |
Examples
{
"status": "invalid-input",
"message": "JSON validation failed",
"errors": {
"general": [],
"byKey": {
"id": [
"Given ID value does not point to an existing record."
]
}
}
}
Type ServerError (object)
Model
Parameter | Type | Description |
---|---|---|
status* | string | Enum:
Inherits: error.ErrorType |
message* | string | |
requestId* | string |
Examples
{
"status": "server-error",
"message": "Datastore connection lost",
"requestId": "b296c3d9-4032-41b1-906e-c97ccfc447e3"
}
Type HealthResponse (object)
Health details about the service
Inherits: object
Model
Parameter | Type | Description |
---|---|---|
status* | string | Status describes the overall service state. A status of "healthy" indicates that everything is running smoothly and all service dependencies are reachable and online. A status of "unhealthy" indicates that something is wrong with either this service or one or more of it's dependency services. Enum:
|
dependencies* | array | A list of external services that this service depends on and some details about them. |
dependencies[] | object | Inherits: DependencyStatus |
dependencies[].name* | string | Name of the external depdendency. |
dependencies[].reachable* | boolean | Whether or not the external service is reachable. |
dependencies[].online* | string | Whether or not the external service is online and available for requests. Enum:
|
info* | object | Additional properties: Yes |
info.threads* | integer | Min. value: 1 |
info.uptime* | string | |
info.uptimeMillis* | integer | Min. value: 1 Format: int64 |
Type DependencyStatus (object)
Inherits: object
Model
Parameter | Type | Description |
---|---|---|
name* | string | Name of the external depdendency. |
reachable* | boolean | Whether or not the external service is reachable. |
online* | string | Whether or not the external service is online and available for requests. Enum:
|