If access token is expired, malformed or invalid then:
401 UNAUTHORIZED status must be returned
Headers:
Content type: application/json
{
"Missing access token or token is invalid"
}
If access token is valid, but does not have required scopes
403 Forbidden status must be returned
Headers:
Content type: application/json
{
"Permission denied"
}
Processing details:
Endpoint should create artist from user and send event to kafka with name - "ArtistRegistrationEvent"
ArtistRegistrationEvent payload in json:
Implement functionality to become an artist. This implementation does not use any music distributor and used to create artist by user himself.
Request:
Method - POST URI - /v1/artist/become-artist Required scopes for this endpoint:
Required headers:
Fields description:
Response
If credentials are valid and request contains valid body, then:
202 ACCEPTED status must be returned Content type: application/json Body:
If access token is expired, malformed or invalid then: 401 UNAUTHORIZED status must be returned Headers:
If access token is valid, but does not have required scopes 403 Forbidden status must be returned Headers:
Processing details: Endpoint should create artist from user and send event to kafka with name - "ArtistRegistrationEvent" ArtistRegistrationEvent payload in json:
The artist must be saved to database. Basic database schema for artist: