Sincronização¶
Esta seção cobre pull e push de dados e metadados.
Push de valor de dados¶
To initiate a data value push to a remote server one must first configure the URL and credentials for the relevant server from System settings > Synchronization, then make a POST request to the following resource:
/ api / 33 / synchronization / dataPush
Metadata pull¶
To initiate a metadata pull from a remote JSON document you can make a POST request with a url as request payload to the following resource:
/ api / 33 / synchronization / metadataPull
Note
The supplied URL will be checked against the config property
system.remote_servers_allowedin thedhis.conffile. If the base URL is not one of the configured servers allowed then the operation will not be allowed. See failure example below.
Some examples where the config set issystem.remote_servers_allowed=https://server1.org/,https://server2.org/- supplyhttps://server1.org/path/to/resource-> this will be accepted - supplyhttps://server2.org/resource/path-> this will be accepted - supplyhttps://oldserver.org/resource/path-> this will be rejectedSample failure response
{
"httpStatus": "Conflict",
"httpStatusCode": 409,
"status": "ERROR",
"message": "Provided URL is not in the remote servers allowed list",
"errorCode": "E1004"
}
Verificação de disponibilidade¶
To check the availability of the remote data server and verify user credentials you can make a GET request to the following resource:
/ api / 33 / sincronização / disponibilidade