# Key

Generates a new key for a pipeline invalidating the old one. The key is used for authentication when sending logs.

This tag groups all operations for key.

## Create Key

> Creates a new Key.\
> \
> The full Key needs to be provided to create the object.\
> Optional data will be filled with defaults or left empty.<br>

```json
{"openapi":"3.0.3","info":{"title":"IONOS Logging Service REST API","version":"0.0.1"},"tags":[{"name":"Key","description":"Generates a new key for a pipeline invalidating the old one. The key is used for authentication when sending logs.\n\nThis tag groups all operations for key.\n"}],"servers":[{"url":"https://logging.de-fra.ionos.com","description":"service endpoint for location de-fra"},{"url":"https://logging.de-txl.ionos.com","description":"service endpoint for location de-txl"},{"url":"https://logging.es-vit.ionos.com","description":"service endpoint for location es-vit"},{"url":"https://logging.gb-bhx.ionos.com","description":"service endpoint for location gb-bhx"},{"url":"https://logging.gb-lhr.ionos.com","description":"service endpoint for location gb-lhr"},{"url":"https://logging.fr-par.ionos.com","description":"service endpoint for location fr-par"},{"url":"https://logging.us-mci.ionos.com","description":"service endpoint for location us-mci"},{"url":"https://logging.us-ewr.ionos.com","description":"service endpoint for location us-ewr"},{"url":"https://logging.us-las.ionos.com","description":"service endpoint for location us-las"}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"The token can be generated using the \n[Authentication API](https://api.ionos.com/docs/authentication/v1/#tag/tokens/operation/tokensGenerate).\n"}},"schemas":{"KeyCreate":{"type":"object","description":"Generates a new key for a pipeline invalidating the old one. The key is used for authentication when sending logs.\n"},"KeyRead":{"type":"object","description":"Generates a new key for a pipeline invalidating the old one. The key is used for authentication when sending logs.\n","required":["key"],"properties":{"key":{"type":"string","description":"The key is shared once and is used to authenticate the logs sent to the pipeline.\n"}}},"Error":{"description":"The Error object is used to represent an error response from the API.\n","type":"object","properties":{"httpStatus":{"type":"integer","description":"The HTTP status code of the operation."},"messages":{"type":"array","description":"A list of error messages.\n","items":{"type":"object","properties":{"errorCode":{"type":"string","description":"Application internal error code\n"},"message":{"type":"string","description":"A human readable explanation specific to this occurrence of the\nproblem.\n"}}}}}}},"responses":{"BadRequest":{"description":"### Bad Request\nThe request send to the API was malformed.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"### Unauthorized\nThe request is missing authorization information or the authorization information provided are expired.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotAllowed":{"description":"### Not Allowed\nThe user issuing the request does not have the needed permissions.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnsupportedMediaType":{"description":"### Unsupported Media Type\nThe request has an unsupported media type.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnprocessableEntity":{"description":"### Unprocessable Entity\nThe request was well-formed but was unable to be followed due to semantic errors.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"### Too Many Requests\nThe user has sent too many requests in a given amount of time.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"### Internal Server Error\nAn internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServiceUnavailable":{"description":"### Service Unavailable\nThe server is currently unable to handle the request due to a temporary overloading or maintenance of the server.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnexpectedError":{"description":"### Unexpected Internal Server Error\nAn unexpected internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/pipelines/{pipelineId}/key":{"post":{"operationId":"pipelinesKeyPost","summary":"Create Key","tags":["Key"],"description":"Creates a new Key.\n\nThe full Key needs to be provided to create the object.\nOptional data will be filled with defaults or left empty.\n","parameters":[{"name":"pipelineId","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID (UUID) of the Pipeline."}],"requestBody":{"description":"Key to create.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyCreate"}}}},"responses":{"201":{"description":"Key successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyRead"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/NotAllowed"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"},"default":{"$ref":"#/components/responses/UnexpectedError"}}}}}}
```
