How to modify the Chirpstack API files to handle downlink?

Hi,

I want to change the API to handle downlink data in application server. But I don’t able to do it because of that the API files are generating during runtime and they are readonly files such as “as.pb.go” or “common.pb.go”.

How can I satisfy my requirements about API?

Dont know what language you are using, but you might need to have a look at how protobuf works.
And the Endpoint you are looking for is there: chirpstack-api/device.proto at master · brocaar/chirpstack-api · GitHub

I may have been misunderstood, I want to save downlinks to loradatastore db (postgreSql integration) when downlinks are generated for first time in network server as a response to uplink. Your suggestion does not work for me because I want network server to send these downlinks to application server as the same as sending uplinks.

I dont understand why network server does not send downlink payload to application server but
it sends uplink payload.