Skip to main content

create_consumer

Function create_consumer 

Source
async fn create_consumer(
    __arg0: State<Arc<SharedState>>,
    __arg1: Json<ConsumerConfig>,
) -> impl IntoResponse
Expand description

POST /api/consumers — creates a new consumer from the JSON body, then rebuilds the consumer store. Returns 201 Created on success.

Errors: 409 Conflict if the name is taken; 400 Bad Request if the store rebuild rejects the config (duplicate credentials, malformed credential objects) — the previous store stays active.