# Utilities

## Check health of endpoint

> Check if the endpoint is healthy and well

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Storage API","version":"1.0.0"},"tags":[{"name":"Utilities"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/health-check":{"get":{"operationId":"utilities-healthCheck","summary":"Check health of endpoint","description":"Check if the endpoint is healthy and well","tags":["Utilities"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Request a list of valid challenges

> Generates an arbitrary number of valid challenges for a did, then returns them

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Storage API","version":"1.0.0"},"tags":[{"name":"Utilities"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.NOT_FOUND":{"title":"Not found error (404)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/challenges":{"get":{"operationId":"utilities-getChallenges","summary":"Request a list of valid challenges","description":"Generates an arbitrary number of valid challenges for a did, then returns them","tags":["Utilities"],"parameters":[{"in":"query","name":"amount","schema":{"default":100,"type":"integer","exclusiveMinimum":0,"maximum":100}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Get LCN Did

> Gets the did:web for the LearnCloud itself

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Storage API","version":"1.0.0"},"tags":[{"name":"Utilities"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/did":{"get":{"operationId":"utilities-getDid","summary":"Get LCN Did","description":"Gets the did:web for the LearnCloud itself","tags":["Utilities"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```
