DHIS2 Web API and using cURL to submit data to the /api/dataValueSets endpoint
how to processes or controls the data that comes from such API requests
any rules on incoming dataValues via cURL?
are there any logics, configurations, user permissions , (whether the data is accepted or rejected specially for/ from the external request)
Our Problem are : from external API requests and other applications sends unlimited data, generating unnecessary periods, also accept the future period
The dataValueSets should follow the same configuration rules as the data set, so if the dataset doesnât allow a future period then the API shouldnât be able to bypass that. If this is the case, then this one might be a potential bug which we could create a Jira ticket and triage it after testing.
You can control which external API requests and other apps are allowed the send data by controlling the tokens you give them. Could you please provide more details about the workflow of these applications that you are using?
I think that for this you will need to create a Python script that interacts with the dataValueSets API and the external API requests. Itâs not an out of the box feature.
Youâre welcome to share more about the use-case and why this is important by creating an idea, see ideas ! If you do create this feature request, please share the link here.
Hi @Gassim
I have entered 0 on âOpen future periods for data entryâ, but it accepts future datavalues from API.
Its in a Nepali Calender setup, and its a bug.
also i am unable to ticket on jira bug
You can control which external API requests and other apps are allowed the send data by controlling the tokens you give them. Could you please provide more details about the workflow of these applications that you are using?
We provide a username and password which is also login on DHIS2 instance.
the key value mapping on the json format and send data through the cURL or other language request.
We have a problem in api request that we have no control over the system if someone has the username and password
Weâre supposed to use only the API secret key for external datavalue send, tracker data send apis?
You donât need to provide a username or password for an external service that only uses the API. You could create a user with limited authority and then provide only a secret token.
As for how many requests they can make per second, I think this can be controlled from the server side. I will ask @tkipkurgat and the server admin group.
@rcpoudel you cannot control how many requests per second are made to any endpoint with DHIS2. You can however attempt to do this from your reverse proxy.