Changing PHP allocation settings via API

Hi

Please may you verify that the /v2/sites/{site_id}/change-site-php-allocation API endpoint is working as documented?

When I send the following request I get a good 202 response with an operation_id in its body:

POST /v2/sites/REDACTED/change-site-php-allocation HTTP/1.1
Accept: application/json
Authorization: Bearer REDACTED
Content-Type: application/json; charset=utf-8
Host: api.kinsta.com
Connection: close
Content-Length: 38

{“thread_count”:6,“thread_memory”:512}

But the change doesn’t take affect and when i check the operation_id it says:

{
  “status”: 400,
  “message”: “Operation failed! Please refer to `data` for more details.”,
  “data”: {
    “status”: 400,
    “message”: “invalid type for variable: ‘worker_memory’”
  }
}

I have tried using the docs’ deprecated body instead but that didn’t work either.

Please let me know if I’ve made a mistake but I think I followed the docs correctly.

Thanks - Ed

@edjeavons

Thank you for the report! I can replicate the error as well, and I have forwarded this possible bug to our developers for review. We will keep you updated on any progress.

Best,

Hi @edjeavons

We are glad to inform you that our Developer team has fixed this issue. When you get a chance, please test it as well and confirm that the issue is resolved.

Thanks!

I confirm it’s working now. Thanks for fixing that.

Ed

2 Likes

Awesome! glad to hear that it’s working now from your end too, Ed @edjeavons ! :smiley:

You’re most welcome and thank you for your confirmation as well! :+1:

Best regards,
Agus Utomo