Skip to content

School Level

Get School Level


GET - /schoollevel/pk_school_level/

Description

Description

Captura as informações detalhadas de uma Area do Conhecimento específica.

Name In Type Default Nullable Description
Authorization header string None No Obtained in Login
pk_school_level path variables string None No Obtained in List School Level

Response Body

200
{
    "results": {
        "pk_school_level": 2,
        "name": "ensino fundamental II"
    }
}
Schema
{
    "results": {
        "pk_school_level": integer,
        "name": string
    }
}
400
{
    "detail": "Não foi possivel encontrar este SchoolLevel.",
    "render": 1
}
Schema
    {
        "detail": string,
        "render": integer
    }
500
    {
        "detail":  "Problemas ao visualizar SchoolLevel",
        "error": "descrição do erro interno"
    }
Schema
    {
        "detail": string,
        "error": string
    }

List School Level

GET - /schoollevel/list/

Description

Description

Lista todos as Area do Conhecimentos cadastrados no sistema

Name In Type Default Nullable Description
Authorization header string None No Obtained in Login
page query param string 1 Yes
page_size query param string 30 Yes
search query param string None Yes Name of the subject to search
status query param string 1 Yes 1-Active/0-Inative

Response Body

200
{
    "navigation": {
        "next": "http://alppi/sys/api/v1/schoollevel/list/?page=3&page_size=20", // link para proxima pagina
        "previous": "http://alppi/sys/api/v1/schoollevel/list/?page=1&page_size=10" // link para pagina anterior
    },
    "next": 3, // numero da proxima pagina
    "previous": 1, // numero na pagina anterior
    "count": 1, // quantidade encontrata
    "results": [
            {
                "pk_school_level": 1,
                "name": "ensino fundamental I"
            }
        ]
    }
Schema
{
    "navigation": {
        "next": null,
        "previous": null
    },
    "next": null,
    "previous": null,
    "count": integer,
    "results": array of objects {
           {
                "pk_school_level": integer,
                "name": string
            }
    }

}
500
    {
        "detail": "Problemas ao listar todos os SchoolLevel.",
        "error": "descrição do erro interno"
    }
Schema
    {
        "detail": string,
        "error": string
    }

Create School Level

POST - /schoollevel/create/

Description

Description

Rota para criação de uma nova Area do Conhecimento.

Name In Type Default Nullable Description
Authorization header string None No Obtained in Login

Request Body

{
    "name": "create"
}
Body Schema
{
    "name": string
}

Response Body

200
{
    "results": {
        "pk_school_level": 6,
        "name": "Create"
    }
}
Schema
{
    "results": {
        "pk_school_level": integer,
        "name": string
    }
}
400
{
    "detail": {
        "name": [
            "This field is required."
        ]
    },
    "render": 0
}
Schema
    {
        "detail": object,
        "render": integer
    }
500
    {
        "detail": "Problemas ao cadastrar SchoolLevel",
        "error": "descrição do erro interno"
    }
Schema
    {
        "detail": string,
        "error": string
    }

Update School Level

PUT - /schoollevel/pk_school_level/update/

Description

Description

Rota para a atualização dos dados de uma Area do Conhecimento.

Name In Type Default Nullable Description
Authorization header string None No Obtained in Login
pk_school_level path variables string None No Obtained in List School Level

Request Body

{
    "name": "update"
}
Schema
{
    "name": string
}

Response Body

200
{
    "results": {
        "pk_school_level": 5,
        "name": "Update"
    }
}
Schema
{
    "results": {
        "pk_school_level": integer,
        "name": string
    }
}
400
{
    "detail": "Não foi possivel encontrar este SchoolLevel.",
    "render": 1
}
Schema
    {
        "detail": string,
        "render": integer
    }
{
    "detail": {
        "name": [
            "This field is required."
        ]
    },
    "render": 0|
}
Schema
    {
        "detail": object,
        "render": integer
    }
500
    {
        "detail":  "Não foi possivel encontrar este SchoolLevel.",
        "error": "descrição do erro interno"
    }
Schema
    {
        "detail": string,
        "error": string
    }

Delete School Level

DELL - /schoollevel/pk_school_level/delete/

Description

Description

Rota para excluir uma Area do Conhecimento.

Name In Type Default Nullable Description
Authorization header string None No Obtained in Login
pk_school_level h variables string None No Obtained in List School Level

Response Body

204 No Content

400
    {
        "detail":  "Não foi possivel encontrar este SchoolLevel."
    }
Schema
    {
        "detail": string,
        "render": integer
    }
500
    {
        "detail": "Problemas ao deletar SchoolLevel",
        "error": "descrição do erro interno"
    }
Schema
    {
        "detail": string,
        "error": string
    }