Error when attempting to set Data Limit for SIM in a product

In attempting to change the data limit on a SIM, a call like this:

curl -X PUT "https://api.particle.io/v1/products/{id}/sims/{iccid}" -d mb_limit=25 -d access_token=foo

is returning an error message of:

{“ok”:false,“error”:“internal-server-error: undefined method `id’ for nil:NilClass”}

I may well be missing something obvious/new about how that call is supposed to be made?

I have also noticed it is no longer possible to adjust the data limits of SIM cards from the web interface? Presumably it is still possible to limit the data usage of an individual device/SIM in some way?

Hi,
I guess that this is not possible anymore as this API call is deprecated.
From reference:

I tried call this with fetch js. and also get some error:

Thanks for the feedback, much appreciated.

I think I must be missing something obvious. Surely there is some way to stop a single SIM within a product group from using up the entire product group’s data limit (?).

There is no per-SIM data limit anymore. Because the call detail records for some mobile operators with some SIM cards were so long delayed, at least one day, and sometimes as long as a week, the limits became useless for stopping runaway usage.

Ah, well, that is clarifying. At least I know I wasn’t missing something obvious :slight_smile:

Since we will have to try and implement this on our side of the API, do you know if:

/v1/products/{prod_id}/sims/{sim_id}/data_usage

is expected to be going away anytime soon?

The data usage APIs should continue to work, subject to the data being delayed at times.