Skip to content

Commit 8c53cc9

Browse files
authored
Translate three unlisted pages into Spanish and update CLI Sync (#919)
1 parent f0bf1f4 commit 8c53cc9

7 files changed

Lines changed: 398 additions & 76 deletions

File tree

‎docs/build-for-developers/build-compliant-apps.md‎

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ This section is for you if you are hoping to build or extend an existing
77
application that can connect to OpenFn. We follow modern web-standard JSON API
88
guidelines.
99

10-
For your application to a be data provider (or "source") for OpenFn
10+
For your application to be a data provider (or "source") for OpenFn
1111
integrations, we highly recommend that you create a "notifications service"
1212
(sometimes called a "webhooks service" or "event-based push API"). This is
13-
preferable to using a REST api for two reasons: (1) A notifications service will
13+
preferable to using a REST API for two reasons: (1) A notifications service will
1414
give your clients the ability to set up real-time integrations, and (2) a
1515
notifications service is more efficient for both your servers and OpenFn—instead
1616
of having requests be made and handled every X seconds, your servers and
@@ -35,19 +35,19 @@ curl -X POST \
3535
```
3636

3737
OpenFn will respond with a 200 and an empty JSON object in the event of a
38-
successful post. 400s mean that the user's external URL is wrong, and 500s means
38+
successful post. 400s mean that the user's external URL is wrong, and 500s mean
3939
that there is an application error on OpenFn. While 500s are rare, they could be
4040
due to invalid JSON in your POST body.
4141

4242
If you cannot notify an external URL when some event takes place, you can still
4343
integrate with OpenFn if you have a JSON-based REST API. OpenFn users can make
4444
HTTP GET requests to your application and perform additional actions based on
45-
your response. You should allow either basic or token authentication and
46-
response to a valid GET with JSON. There is no specific format for your
47-
response, as users can parse it any way they'd like, extracting relevant data
48-
and then performing other actions—like loading it into a destination system—with
49-
that data. See [language-http](https://www.github.com/openfn/language-http) for
50-
details on how users make these generic HTTP requests.
45+
your response. You should allow either basic or token authentication and respond
46+
to a valid GET with JSON. There is no specific format for your response, as
47+
users can parse it any way they'd like, extracting relevant data and then
48+
performing other actions—like loading it into a destination system—with that
49+
data. See [language-http](/adaptors/http) for details on how users make these
50+
generic HTTP requests.
5151

5252
### Payload sizing
5353

@@ -61,15 +61,14 @@ keep your payloads well below that limit.
6161
To make it easy for users to connect to your application, it's highly
6262
recommended that you create a language-package with your required authentication
6363
and a set of simple, allowable actions nicely abstracted into "helper
64-
functions". See [language-dhis2](https://www.github.com/openfn/language-dhis2)
65-
for an example of a language-package which creates a simpler interface for a
66-
traditional JSON-based REST api. Adaptors are written in Javascript and execute
67-
in Node. You can convert OpenFn's JSON into XML, or any other format before
68-
sending it to your application and you may make use of any node modules you'd
69-
like. See
70-
[language-postgresql](https://www.github.com/openfn/language-postgresql) for an
71-
example of an adaptor that connects directly to PostgreSQL databases using a
72-
popular NPM module called "pg".
64+
functions". See [language-dhis2](/adaptors/dhis2) for an example of a
65+
language-package which creates a simpler interface for a traditional JSON-based
66+
REST API. Adaptors are written in JavaScript and execute in Node. You can
67+
convert OpenFn's JSON into XML, or any other format before sending it to your
68+
application and you may make use of any node modules you'd like. See
69+
[language-postgresql](/adaptors/postgresql) for an example of an adaptor that
70+
connects directly to PostgreSQL databases using a popular NPM module called
71+
"pg".
7372

7473
To receive data from OpenFn's generic `language-http` adaptor, your application
7574
must allow either basic, token, or digest authenticated POST, PUT, or GET

‎docs/build-for-developers/cli-sync.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Whether using the CLI or GitHub Sync, a Project has the following structure:
6969
├── my-workflow
7070
│ ├── my-workflow.yaml
7171
│ ├── my-step.js
72-
├──.openfn
72+
├── .openfn
7373
```
7474

7575
Briefly, these files are:
@@ -81,11 +81,11 @@ Briefly, these files are:
8181
- `workflows` contains one sub folder per workflow, and "expands" a workflow to
8282
the file system for convenient editing.
8383
- The `.projects` folder contains a complete YAML representation of each
84-
Project. This is rarely used by humans
84+
Project. This is rarely used by humans.
8585
- The `.openfn` folder contains metadata used by the CLI. It is not used by
8686
humans and should not be checked-in to git.
8787

88-
::: note
88+
:::note
8989

9090
For users well-versed in the OpenFn portability specification, this folder
9191
structure represents a project _spec_. The `.projects` folder contains project
@@ -102,12 +102,12 @@ workflows a little easier.
102102

103103
A workflow can be defined as a single yaml file - you'll see that if you hit
104104
"View workflow as YAML" in the app, or if you look at the project state files in
105-
`.projects. But for convenience, the workflow can also be "checked out" or
105+
`.projects`. But for convenience, the workflow can also be "checked out" or
106106
expanded so that each step has its job code (its expression) written to a .js
107107
file.
108108

109-
You edit these expanded workflow files as much as you like, and changes will be
110-
tracked when you push/deploy back to the app.
109+
You can edit these expanded workflow files as much as you like, and changes will
110+
be tracked when you push/deploy back to the app.
111111

112112
You can only check out one project at a time. This is actually great for working
113113
with git, because you can checkout two projects on different branches and

‎docs/design/overview.md‎

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Good user stories will capture 3 parts:
4343
2. _What_ - what do they hope to achieve via the solution?
4444
3. _Why_ - why is this desire important? What are the business implications?
4545

46-
If you capture these 3 elements, user stories can b ean effective way of
46+
If you capture these 3 elements, user stories can be an effective way of
4747
detailing integration requirements and starting discussions at your organization
4848
about which requirements are priority.
4949

@@ -57,16 +57,16 @@ about which requirements are priority.
5757
from the district clinic electronic medical record system with the national
5858
DHIS2 health information system, so that I can securely and automatically
5959
report on health outcomes for key indicators in my district.
60-
- **Kobo Toolbox - MSSQL Database:** As a M&E manager, I want to monitor Kobo
61-
Toolbox survey responses in a central database in real-time, so that I can
60+
- **KoboToolbox - MSSQL Database:** As a M&E manager, I want to monitor
61+
KoboToolbox survey responses in a central database in real-time, so that I can
6262
better understand data collection activities and program performance across my
6363
research partner sites.
6464

6565
## 2. Diagram the business process
6666

6767
Once the user stories have been identified, start to document the functional
6868
processes that are in place (or will need to be implemented) in order to achieve
69-
the desired requirments. These might be automated or human/manually-driven
69+
the desired requirements. These might be automated or human/manually-driven
7070
processes. This is the precursor step to mapping out the data flow (which
7171
details the technical steps for how connections will be made and data exchanged
7272
between systems). Again, process mapping is _business analysis_–not a technical
@@ -76,16 +76,13 @@ For example, if you want to exchange information between your organization and
7676
another... how might this exchange work from a functional point of view? _What_
7777
information will be exchanged? With _whom_ (between which systems or users)?
7878
_When_ will the information be exchanged? And what are the human or automation
79-
steps that should facilitate and trigger this exchange? These business process
80-
questions are discussed in more detail on the
81-
[So, what is an integration?](/documentation/tutorials/tutorial/) page.
79+
steps that should facilitate and trigger this exchange?
8280

83-
:::tip
81+
:::tip Capture the current & desired process
8482

85-
Capture the current & desired process Document _current and desired_ business
86-
processes in order to determine how information should be exchanged between your
87-
organization/system/users and others, and to ensure alignment of expectations
88-
and assumptions across partners.
83+
Document _current and desired_ business processes in order to determine how
84+
information should be exchanged between your organization/system/users and
85+
others, and to ensure alignment of expectations and assumptions across partners.
8986

9087
:::
9188

@@ -125,10 +122,10 @@ Once the business processes are documented, start to document the specific data
125122
elements to be exchanged. This exercise requires a lot of specificity to detail
126123
the individual "fields" or "attributes" to be exchanged.
127124

128-
The output of this exerice is a `Data Element Mapping Specification`, which will
129-
serve as (1) documentation of the specific data elements agreed to be exchanges,
130-
as well as (2) a guide for how to translate meaning between partners and systems
131-
(e.g., `client` in one system might mean `patient` in another).
125+
The output of this exercise is a `Data Element Mapping Specification`, which
126+
will serve as (1) documentation of the specific data elements agreed to be
127+
exchanged, as well as (2) a guide for how to translate meaning between partners
128+
and systems (e.g., `client` in one system might mean `patient` in another).
132129

133130
If your organization already has a data management or sharing agreement, this
134131
might be the perfect starting point for identifying the specific data points to
@@ -197,5 +194,5 @@ solution, as well as memorialize the business decisions and agreements made by
197194
implementing partners.
198195

199196
Share this documentation with any technical implementation team, or check out
200-
the [Build](/documentation/build/workflows) documentation section to learn how
201-
to implement these design specifications using OpenFn.
197+
the [Build](/build/workflows.md) documentation section to learn how to implement
198+
these design specifications using OpenFn.
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: Desarrollar aplicaciones conectadas
3+
sidebar_label: Crear API compatibles
4+
translation_source_hash: e0d8e1d398d235e8cb533a3eb6d4f55280ad62d5
5+
translation_review_status: machine
6+
---
7+
8+
Esta sección es para ti si quieres crear una aplicación que se pueda conectar a
9+
OpenFn, o ampliar una que ya tengas. Seguimos las pautas modernas de los
10+
estándares web para las API JSON.
11+
12+
Para que tu aplicación sea un proveedor de datos (o "origen") para las
13+
integraciones de OpenFn, te recomendamos mucho que crees un "servicio de
14+
notificaciones" (a veces llamado "servicio de webhooks" o "API push basada en
15+
eventos"). Es mejor que usar una API REST por dos motivos: (1) un servicio de
16+
notificaciones permite a tus clientes configurar integraciones en tiempo real, y
17+
(2) un servicio de notificaciones es más eficiente tanto para tus servidores
18+
como para OpenFn: en lugar de hacer y atender solicitudes cada X segundos, tus
19+
servidores y los de OpenFn solo trabajan cuando hay datos nuevos.
20+
21+
Para que tu aplicación sea un consumidor (o "destino") de OpenFn, debes tener
22+
una API REST estándar basada en JSON o crear un language-package que cumpla las
23+
especificaciones de tu API.
24+
25+
## Enviar datos a OpenFn {#sending-data-to-openfn}
26+
27+
Para enviar datos a OpenFn, tu aplicación debe poder hacer un POST por HTTPS a
28+
una URL externa, con un objeto JSON válido como cuerpo. Mira este ejemplo con
29+
cURL:
30+
31+
```sh
32+
curl -X POST \
33+
-H "Content-Type: application/json" \
34+
-H "Cache-Control: no-cache" \
35+
-d '{"foo":"bar", "baz":"qux"}' \
36+
"https://app.openfn.org/i/some-secret-inbox-uuid"
37+
```
38+
39+
Si el POST se completa correctamente, OpenFn responde con un 200 y un objeto
40+
JSON vacío. Un error 400 significa que la URL externa del usuario es incorrecta,
41+
y un 500 significa que hay un error de la aplicación en OpenFn. Los errores 500
42+
son poco frecuentes, pero pueden deberse a un JSON no válido en el cuerpo del
43+
POST.
44+
45+
Si no puedes notificar a una URL externa cuando ocurre un evento, puedes
46+
integrarte con OpenFn de todos modos si tienes una API REST basada en JSON. Los
47+
usuarios de OpenFn pueden hacer solicitudes HTTP GET a tu aplicación y realizar
48+
otras acciones según tu respuesta. Deberías permitir la autenticación básica o
49+
por token, y responder con JSON a un GET válido. La respuesta no tiene que
50+
seguir ningún formato concreto, porque los usuarios pueden procesarla como
51+
quieran: extraer los datos que les interesan y luego hacer otras acciones con
52+
ellos, como cargarlos en un sistema de destino. Consulta
53+
[language-http](/adaptors/http) para ver cómo hacen los usuarios estas
54+
solicitudes HTTP genéricas.
55+
56+
### Tamaño del payload {#payload-sizing}
57+
58+
Si usas la plataforma y no piensas contratar un plan empresarial, tendrás que
59+
tener en cuenta el tamaño de los datos que envías en cada payload. El `state` de
60+
un run suele estar limitado a `10MB`, así que deberías mantener tus payloads muy
61+
por debajo de ese límite.
62+
63+
## Recibir datos de OpenFn {#receiving-data-from-openfn}
64+
65+
Para que los usuarios puedan conectarse fácilmente a tu aplicación, te
66+
recomendamos mucho que crees un language-package con la autenticación que
67+
necesitas y un conjunto de acciones sencillas y permitidas, bien abstraídas en
68+
"funciones auxiliares". Consulta [language-dhis2](/adaptors/dhis2) para ver un
69+
ejemplo de language-package que crea una interfaz más sencilla para una API REST
70+
tradicional basada en JSON. Los adaptors se escriben en JavaScript y se ejecutan
71+
en Node. Puedes convertir el JSON de OpenFn a XML, o a cualquier otro formato,
72+
antes de enviarlo a tu aplicación, y puedes usar los módulos de Node que
73+
quieras. Consulta [language-postgresql](/adaptors/postgresql) para ver un
74+
ejemplo de adaptor que se conecta directamente a bases de datos PostgreSQL con
75+
un módulo de NPM muy conocido llamado "pg".
76+
77+
Para recibir datos del adaptor genérico `language-http` de OpenFn, tu aplicación
78+
debe permitir solicitudes POST, PUT o GET con autenticación básica, por token o
79+
digest. (Aunque no es recomendable crear una API que exija solicitudes GET para
80+
crear o actualizar datos.)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
id: build-with-api
3+
title: Crear proyectos con la API de OpenFn
4+
sidebar_label: Crear con la API
5+
slug: /build-with-api
6+
translation_source_hash: 4578f2253ce460b1b667107c61855e2079036646
7+
translation_review_status: machine
8+
---
9+
10+
OpenFn te permite configurar proyectos con solicitudes HTTP enviadas a la API
11+
REST. Consulta el
12+
[repositorio de OpenFn/Lightning en GitHub](https://openfn.github.io/lightning/provisioning.html)
13+
para ver la documentación detallada para desarrolladores.

0 commit comments

Comments
 (0)