USP Aberta · Desenvolvedores
academic-unit
Obtém uma unidade acadêmica
Detalhe de uma unidade. Referências que não sejam o slug atual (slug antigo, chave, sigla, id) respondem 308 para o endereço canônico.
GET /academic-units/{unit_key} · 1 créditos · Desde a versão 2.0
Variáveis de caminho
| Nome | Tipo | Descrição |
|---|---|---|
unit_key | string obrigatório | Identificador da unidade: slug atual, slug antigo, chave, sigla ou id. |
Campos da resposta
| Nome | Tipo | Descrição |
|---|---|---|
key | string | Identificador imutável da unidade. schema.org/identifier |
slug | string | Segmento público da URL; acompanha a sigla. |
acronym | string | Sigla de exibição. schema.org/alternateName |
name | string | null | Nome por extenso. schema.org/name |
unitType | string | standard, museum ou specialized_institute. schema.org/additionalType |
singleDepartment | boolean | A unidade tem um único departamento. |
description | string | null | Descrição em HTML sanitizado. schema.org/description |
website | string | null | Página oficial. schema.org/url |
director | string | null | Direção. schema.org/employee |
address | string | null | Endereço. schema.org/address |
contact | string | null | Contato. schema.org/contactPoint |
workingHours | string | null | Horário de funcionamento. schema.org/openingHours |
isVerified | boolean | Dados conferidos pela unidade. |
logoUrl | string | null | Logotipo. schema.org/logo |
photoUrl | string | null | Foto. schema.org/image |
Links que a resposta oferece
| Nome | Descrição |
|---|---|
uspa:departments | Departamentos da unidade. |
Substitui as rotas legadas: academic-unit
Exemplos de código
curl -s 'https://uspaberta.ime.usp.br/api/v2/academic-units/ime' \
-H 'Authorization: Bearer '"$USPA_API_KEY" \
-H 'Accept: application/hal+json'Resposta
Resposta real da API: GET /academic-units/ime
HTTP 200
content-type: application/hal+json
etag: W/"g0-52fddc51e64a613b"
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": {
"collection": {
"href": "https://uspaberta.ime.usp.br/api/v2/academic-units"
},
"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"
},
"uspa:departments": {
"href": "https://uspaberta.ime.usp.br/api/v2/academic-units/ime/departments"
}
},
"acronym": "ime",
"address": "Rua do Matão, 1010 – Cidade Universitária, São Paulo – SP – 05508-090, Brasil",
"contact": "+55 (11) 3091-6101 / 6102",
"description": "<p>O Instituto de Matemática, Estatística e Ciência da Computação da Universidade de São Paulo, fundado em 15 de janeiro de 1970 pela Reforma Universitária, …",
"director": "Prof. Dr. Roberto M. Cesar Jr.",
"isVerified": true,
"key": "ime",
"logoUrl": null,
"name": "Instituto de Matemática, Estatística e Ciência da Computação",
"photoUrl": null,
"singleDepartment": false,
"slug": "ime",
"unitType": "standard",
"website": "https://ime.usp.br",
"workingHours": "Segunda a Sexta: 06:00 às 23:30\r\nSábados, Domingos e Feriados: 06:00 às 22:00 (acesso controlado, com regras específicas)"
}USP Aberta · Developers
academic-unit
Get an academic unit
Details of one unit. References other than the current slug (old slug, key, acronym, id) answer 308 to the canonical address.
GET /academic-units/{unit_key} · 1 credits · Since version 2.0
Path variables
| Name | Type | Description |
|---|---|---|
unit_key | string required | Unit identifier: current slug, old slug, key, acronym or id. |
Response fields
| Name | Type | Description |
|---|---|---|
key | string | Immutable unit identifier. schema.org/identifier |
slug | string | Public URL segment; follows the acronym. |
acronym | string | Display acronym. schema.org/alternateName |
name | string | null | Full name. schema.org/name |
unitType | string | standard, museum or specialized_institute. schema.org/additionalType |
singleDepartment | boolean | The unit has a single department. |
description | string | null | Description as sanitized HTML. schema.org/description |
website | string | null | Official website. schema.org/url |
director | string | null | Head of the unit. schema.org/employee |
address | string | null | Address. schema.org/address |
contact | string | null | Contact. schema.org/contactPoint |
workingHours | string | null | Working hours. schema.org/openingHours |
isVerified | boolean | Data verified by the unit. |
logoUrl | string | null | Logo. schema.org/logo |
photoUrl | string | null | Photo. schema.org/image |
Links the response offers
| Name | Description |
|---|---|
uspa:departments | The unit's departments. |
Replaces legacy routes: academic-unit
Code samples
curl -s 'https://uspaberta.ime.usp.br/api/v2/academic-units/ime' \
-H 'Authorization: Bearer '"$USPA_API_KEY" \
-H 'Accept: application/hal+json'Response
Real response from the API: GET /academic-units/ime
HTTP 200
content-type: application/hal+json
etag: W/"g0-487a21ed118fdd3f"
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": {
"collection": {
"href": "https://uspaberta.ime.usp.br/api/v2/academic-units"
},
"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"
},
"uspa:departments": {
"href": "https://uspaberta.ime.usp.br/api/v2/academic-units/ime/departments"
}
},
"acronym": "ime",
"address": "Rua do Matão, 1010 – Cidade Universitária, São Paulo – SP – 05508-090, Brasil",
"contact": "+55 (11) 3091-6101 / 6102",
"description": "<p>O Instituto de Matemática, Estatística e Ciência da Computação da Universidade de São Paulo, fundado em 15 de janeiro de 1970 pela Reforma Universitária, …",
"director": "Prof. Dr. Roberto M. Cesar Jr.",
"isVerified": true,
"key": "ime",
"logoUrl": null,
"name": "Instituto de Matemática, Estatística e Ciência da Computação",
"photoUrl": null,
"singleDepartment": false,
"slug": "ime",
"unitType": "standard",
"website": "https://ime.usp.br",
"workingHours": "Segunda a Sexta: 06:00 às 23:30\r\nSábados, Domingos e Feriados: 06:00 às 22:00 (acesso controlado, com regras específicas)"
}USP Aberta · Desarrolladores
academic-unit
Obtiene una unidad académica
Detalles de una unidad. Las referencias distintas del slug actual (slug anterior, clave, sigla, id) responden 308 hacia la dirección canónica.
GET /academic-units/{unit_key} · 1 créditos · Desde la versión 2.0
Variables de ruta
| Nombre | Tipo | Descripción |
|---|---|---|
unit_key | string obligatorio | Identificador de la unidad: slug actual, slug anterior, clave, sigla o id. |
Campos de la respuesta
| Nombre | Tipo | Descripción |
|---|---|---|
key | string | Identificador inmutable de la unidad. schema.org/identifier |
slug | string | Segmento público de la URL; sigue a la sigla. |
acronym | string | Sigla mostrada. schema.org/alternateName |
name | string | null | Nombre completo. schema.org/name |
unitType | string | standard, museum o specialized_institute. schema.org/additionalType |
singleDepartment | boolean | La unidad tiene un único departamento. |
description | string | null | Descripción en HTML saneado. schema.org/description |
website | string | null | Sitio web oficial. schema.org/url |
director | string | null | Responsable de la unidad. schema.org/employee |
address | string | null | Dirección. schema.org/address |
contact | string | null | Contacto. schema.org/contactPoint |
workingHours | string | null | Horario de atención. schema.org/openingHours |
isVerified | boolean | Datos verificados por la unidad. |
logoUrl | string | null | Logotipo. schema.org/logo |
photoUrl | string | null | Foto. schema.org/image |
Enlaces que ofrece la respuesta
| Nombre | Descripción |
|---|---|
uspa:departments | Departamentos de la unidad. |
Reemplaza rutas heredadas: academic-unit
Ejemplos de código
curl -s 'https://uspaberta.ime.usp.br/api/v2/academic-units/ime' \
-H 'Authorization: Bearer '"$USPA_API_KEY" \
-H 'Accept: application/hal+json'Respuesta
Respuesta real de la API: GET /academic-units/ime
HTTP 200
content-type: application/hal+json
etag: W/"g0-70cb713c9e8f17f4"
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": {
"collection": {
"href": "https://uspaberta.ime.usp.br/api/v2/academic-units"
},
"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"
},
"uspa:departments": {
"href": "https://uspaberta.ime.usp.br/api/v2/academic-units/ime/departments"
}
},
"acronym": "ime",
"address": "Rua do Matão, 1010 – Cidade Universitária, São Paulo – SP – 05508-090, Brasil",
"contact": "+55 (11) 3091-6101 / 6102",
"description": "<p>O Instituto de Matemática, Estatística e Ciência da Computação da Universidade de São Paulo, fundado em 15 de janeiro de 1970 pela Reforma Universitária, …",
"director": "Prof. Dr. Roberto M. Cesar Jr.",
"isVerified": true,
"key": "ime",
"logoUrl": null,
"name": "Instituto de Matemática, Estatística e Ciência da Computação",
"photoUrl": null,
"singleDepartment": false,
"slug": "ime",
"unitType": "standard",
"website": "https://ime.usp.br",
"workingHours": "Segunda a Sexta: 06:00 às 23:30\r\nSábados, Domingos e Feriados: 06:00 às 22:00 (acesso controlado, com regras específicas)"
}