All checks were successful
DEPLOY_MULTI_BRACH/pipeline/head This commit looks good
- .gitattributes: añadir '*.sh text eol=lf' para evitar CRLF en Windows - deployments/entrypoint.sh: renormalizado a LF - postman_environments.json: entornos LOCAL/DEV/PROD en un único fichero - postman_collection.json: eliminadas variables por defecto (vienen del entorno)
136 lines
4.2 KiB
JSON
136 lines
4.2 KiB
JSON
{
|
|
"info": {
|
|
"name": "Django Core Base API",
|
|
"description": "Colección de llamadas para Django Core Base (auth JWT + promociones + automatizados).",
|
|
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
|
|
"_postman_id": "django-core-base-collection"
|
|
},
|
|
"variable": [],
|
|
"item": [
|
|
{
|
|
"name": "Auth",
|
|
"item": [
|
|
{
|
|
"name": "Obtener Token (Login)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"if (pm.response.code === 200) {",
|
|
" const json = pm.response.json();",
|
|
" if (json.access) pm.collectionVariables.set('access_token', json.access);",
|
|
" if (json.refresh) pm.collectionVariables.set('refresh_token', json.refresh);",
|
|
"}"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{ "key": "Content-Type", "value": "application/json" }
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"{{username}}\",\n \"password\": \"{{password}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{base_url}}/api/token/",
|
|
"host": ["{{base_url}}"],
|
|
"path": ["api", "token", ""]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Promociones",
|
|
"item": [
|
|
{
|
|
"name": "Obtener Promoción",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{ "key": "Content-Type", "value": "application/json" },
|
|
{ "key": "Authorization", "value": "Bearer {{access_token}}" }
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"id\": 1,\n \"activo\": true\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{base_url}}/api/promociones/obtener/",
|
|
"host": ["{{base_url}}"],
|
|
"path": ["api", "promociones", "obtener", ""]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Automatizados",
|
|
"item": [
|
|
{
|
|
"name": "Ejecutar Automatizaciones",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{ "key": "Content-Type", "value": "application/json" },
|
|
{ "key": "Authorization", "value": "Bearer {{access_token}}" }
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"nombre\": \"Ejecución manual desde Postman\",\n \"descripcion\": \"Test de las 3 acciones automatizadas\",\n \"origen\": \"manual\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{base_url}}/api/automatizados/ejecutar/",
|
|
"host": ["{{base_url}}"],
|
|
"path": ["api", "automatizados", "ejecutar", ""]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Historial de Ejecuciones",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{ "key": "Content-Type", "value": "application/json" },
|
|
{ "key": "Authorization", "value": "Bearer {{access_token}}" }
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"estado\": \"\",\n \"limit\": 20\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{base_url}}/api/automatizados/historial/",
|
|
"host": ["{{base_url}}"],
|
|
"path": ["api", "automatizados", "historial", ""]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Estado del Módulo",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{ "key": "Content-Type", "value": "application/json" },
|
|
{ "key": "Authorization", "value": "Bearer {{access_token}}" }
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{}"
|
|
},
|
|
"url": {
|
|
"raw": "{{base_url}}/api/automatizados/estado/",
|
|
"host": ["{{base_url}}"],
|
|
"path": ["api", "automatizados", "estado", ""]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|