Plataforma de dados abertos da Universidade de São Paulo
USP Aberta — página inicial

USP Aberta · Desenvolvedores

unit-department

Obtém um departamento

Detalhe de um departamento, inclusive arquivado. Referências não canônicas respondem 308.

GET /academic-units/{unit_key}/departments/{department_key} · 1 créditos · Desde a versão 2.0

Variáveis de caminho

NomeTipoDescrição
unit_keystring
obrigatório
Identificador da unidade: slug atual, slug antigo, chave, sigla ou id.
department_keystring
obrigatório
Identificador do departamento dentro da unidade.

Campos da resposta

NomeTipoDescrição
keystringIdentificador imutável dentro da unidade. schema.org/identifier
slugstringSegmento público da URL.
acronymstringSigla de exibição. schema.org/alternateName
namestring | nullNome por extenso. schema.org/name
descriptionstring | nullDescrição em HTML sanitizado. schema.org/description
directorstring | nullChefia. schema.org/employee
viceDirectorstring | nullVice-chefia. schema.org/employee
archivedAtdatetime | nullQuando foi arquivado; nulo se ativo.
facultyCountintegerDocentes distintos vinculados. schema.org/numberOfEmployees
academicUnitKeystringChave da unidade a que pertence. schema.org/parentOrganization
academicUnitAcronymstringSigla da unidade a que pertence.

Links que a resposta oferece

NomeDescrição
upUnidade a que pertence.

Substitui as rotas legadas: department-by-unit-and-ref

Exemplos de código

curl -s 'https://uspaberta.ime.usp.br/api/v2/academic-units/ime/departments/mac' \
  -H 'Authorization: Bearer '"$USPA_API_KEY" \
  -H 'Accept: application/hal+json'

Resposta

Resposta real da API: GET /academic-units/ime/departments/mac

HTTP 200
content-type: application/hal+json
etag: W/"g0-94c1aa14eafe03ea"
cache-control: private, max-age=300, must-revalidate
content-language: pt-BR
vary: Accept, Accept-Language
ratelimit-policy: "daily";q=4000;w=86400, "burst";q=60;w=60
uspa-credit-cost: 1
{
  "_links": {
    "curies": [
      {
        "href": "https://uspaberta.ime.usp.br/api/v2/rels/{rel}",
        "templated": true,
        "name": "uspa"
      }
    ],
    "self": {
      "href": "https://uspaberta.ime.usp.br/api/v2/academic-units/ime/departments/mac"
    },
    "up": {
      "href": "https://uspaberta.ime.usp.br/api/v2/academic-units/ime"
    }
  },
  "academicUnitAcronym": "ime",
  "academicUnitKey": "ime",
  "acronym": "mac",
  "archivedAt": null,
  "description": null,
  "director": null,
  "facultyCount": 37,
  "key": "mac",
  "name": "Departamento de Ciência da Computação",
  "slug": "mac",
  "viceDirector": null
}

USP Aberta · Developers

unit-department

Get a department

Details of a department, archived included. Non-canonical references answer 308.

GET /academic-units/{unit_key}/departments/{department_key} · 1 credits · Since version 2.0

Path variables

NameTypeDescription
unit_keystring
required
Unit identifier: current slug, old slug, key, acronym or id.
department_keystring
required
Department identifier inside the unit.

Response fields

NameTypeDescription
keystringImmutable identifier inside the unit. schema.org/identifier
slugstringPublic URL segment.
acronymstringDisplay acronym. schema.org/alternateName
namestring | nullFull name. schema.org/name
descriptionstring | nullDescription as sanitized HTML. schema.org/description
directorstring | nullHead of department. schema.org/employee
viceDirectorstring | nullDeputy head. schema.org/employee
archivedAtdatetime | nullWhen it was archived; null if active.
facultyCountintegerDistinct linked faculty members. schema.org/numberOfEmployees
academicUnitKeystringKey of the owning unit. schema.org/parentOrganization
academicUnitAcronymstringAcronym of the owning unit.

Links the response offers

NameDescription
upThe owning unit.

Replaces legacy routes: department-by-unit-and-ref

Code samples

curl -s 'https://uspaberta.ime.usp.br/api/v2/academic-units/ime/departments/mac' \
  -H 'Authorization: Bearer '"$USPA_API_KEY" \
  -H 'Accept: application/hal+json'

Response

Real response from the API: GET /academic-units/ime/departments/mac

HTTP 200
content-type: application/hal+json
etag: W/"g0-c01c537568fc0671"
cache-control: private, max-age=300, must-revalidate
content-language: en
vary: Accept, Accept-Language
ratelimit-policy: "daily";q=4000;w=86400, "burst";q=60;w=60
uspa-credit-cost: 1
{
  "_links": {
    "curies": [
      {
        "href": "https://uspaberta.ime.usp.br/api/v2/rels/{rel}",
        "templated": true,
        "name": "uspa"
      }
    ],
    "self": {
      "href": "https://uspaberta.ime.usp.br/api/v2/academic-units/ime/departments/mac"
    },
    "up": {
      "href": "https://uspaberta.ime.usp.br/api/v2/academic-units/ime"
    }
  },
  "academicUnitAcronym": "ime",
  "academicUnitKey": "ime",
  "acronym": "mac",
  "archivedAt": null,
  "description": null,
  "director": null,
  "facultyCount": 37,
  "key": "mac",
  "name": "Departamento de Ciência da Computação",
  "slug": "mac",
  "viceDirector": null
}

USP Aberta · Desarrolladores

unit-department

Obtiene un departamento

Detalles de un departamento, incluidos los archivados. Las referencias no canónicas responden 308.

GET /academic-units/{unit_key}/departments/{department_key} · 1 créditos · Desde la versión 2.0

Variables de ruta

NombreTipoDescripción
unit_keystring
obligatorio
Identificador de la unidad: slug actual, slug anterior, clave, sigla o id.
department_keystring
obligatorio
Identificador del departamento dentro de la unidad.

Campos de la respuesta

NombreTipoDescripción
keystringIdentificador inmutable dentro de la unidad. schema.org/identifier
slugstringSegmento público de la URL.
acronymstringSigla mostrada. schema.org/alternateName
namestring | nullNombre completo. schema.org/name
descriptionstring | nullDescripción en HTML saneado. schema.org/description
directorstring | nullJefe del departamento. schema.org/employee
viceDirectorstring | nullSubjefe. schema.org/employee
archivedAtdatetime | nullFecha de archivo; null si está activo.
facultyCountintegerDocentes distintos vinculados. schema.org/numberOfEmployees
academicUnitKeystringClave de la unidad propietaria. schema.org/parentOrganization
academicUnitAcronymstringSigla de la unidad propietaria.

Enlaces que ofrece la respuesta

NombreDescripción
upLa unidad propietaria.

Reemplaza rutas heredadas: department-by-unit-and-ref

Ejemplos de código

curl -s 'https://uspaberta.ime.usp.br/api/v2/academic-units/ime/departments/mac' \
  -H 'Authorization: Bearer '"$USPA_API_KEY" \
  -H 'Accept: application/hal+json'

Respuesta

Respuesta real de la API: GET /academic-units/ime/departments/mac

HTTP 200
content-type: application/hal+json
etag: W/"g0-3eb1d2a24d1087a6"
cache-control: private, max-age=300, must-revalidate
content-language: es
vary: Accept, Accept-Language
ratelimit-policy: "daily";q=4000;w=86400, "burst";q=60;w=60
uspa-credit-cost: 1
{
  "_links": {
    "curies": [
      {
        "href": "https://uspaberta.ime.usp.br/api/v2/rels/{rel}",
        "templated": true,
        "name": "uspa"
      }
    ],
    "self": {
      "href": "https://uspaberta.ime.usp.br/api/v2/academic-units/ime/departments/mac"
    },
    "up": {
      "href": "https://uspaberta.ime.usp.br/api/v2/academic-units/ime"
    }
  },
  "academicUnitAcronym": "ime",
  "academicUnitKey": "ime",
  "acronym": "mac",
  "archivedAt": null,
  "description": null,
  "director": null,
  "facultyCount": 37,
  "key": "mac",
  "name": "Departamento de Ciência da Computação",
  "slug": "mac",
  "viceDirector": null
}