Closed m-mohr closed 6 years ago
I think we need to add the option to include billing in download services as well, for at least two reasons:
@mkadunc Who would be paying for downloading? The user who has generated the results or the one who is downloading the results?
I'm not sure OpenEO will go into this much details, but I would imagine that both scenarios are possible.
The difference between the two options will only be evident when the back-end supports enough security configuration to allow 3rd parties (or unauthenticated general public) to access results. Initial setup of all back-ends will probably only allow owners to download job results.
So, I'll propose this model for downloading:
POST /preview
) is always included in the OpenEO-Costs
header returned. Preview is only used by the owner and can't be shared so there is no problem with "requester pays".GET /jobs/:job_id/estimate
) gets a new property downloads_included
which specifies how many full downloads of the processed data are included in the estimate. (GET /jobs/:job_id/results
) has a new header that indicates the costs for downloading. If a requester other than the owner is requesting the data of a shared job this header indicates the costs for the requester. When sharing jobs the owner can choose who needs to pay. If the requester is requested to pay, access is denied for unauthorized users.
Currently, people are billed by processing costs. Is there anybody who thinks downloading of processed results (and user files?) should be billed, too? If so, we would need to add it, too. This may be of special interest when sharing resources publicly becomes a thing with #85.