V1::RegistrationsController
Registrations
index
Get a list of registrations
URL
GET /registrationsObjeto resposta
| Array<Registration> | The created registrations |
show
Get a registration information
URL
GET /registrations/:id or /registrations/:code?find_by=codeParâmetros obrigatórios
| Nome | Tipo | Descrição |
|---|---|---|
| id | Integer | of the registration |
Objeto resposta
| Registration | The requested registration |
create
Create new registration
URL
POST /registrationsParâmetros obrigatórios
| Nome | Tipo | Descrição |
|---|---|---|
| registration | Hash | The registration to create |
| registration[school_id] | Integer | School of the registration |
| registration[student_id] | Integer | Student of the registration |
Parâmetros opcionais
| Nome | Tipo | Descrição |
|---|---|---|
| registration[code] | String | Code of the registration |
| registration[status] | String | Status of the registration |
Objeto resposta
| Registration | The created registration or a list of errors |
update
Update an existing registration and redirect to 'show' action
URL
PUT/PATCH /registrations/:id or /registrations/:code?find_by=codeParâmetros obrigatórios
| Nome | Tipo | Descrição |
|---|---|---|
| registration | Hash | The registration to update |
| registration[school_id] | Integer | School of the registration |
| registration[student_id] | Integer | Student of the registration |
Parâmetros opcionais
| Nome | Tipo | Descrição |
|---|---|---|
| registration[code] | String | Code of the registration |
| registration[status] | String | Status of the registration |
Objeto resposta
| Registration | The created registration or a list of errors |
destroy
Change registration status to 'Canceled'
URL
DELETE /registrations/:id or /registrations/:code?find_by=codeParâmetros obrigatórios
| Nome | Tipo | Descrição |
|---|---|---|
| id | Integer | Id of an registration |