ovh / php-ovh

Lightweight PHP wrapper for OVH APIs. That's the easiest way to use OVH.com APIs in your PHP applications.
Other
286 stars 106 forks source link

Get multiple phonebook contacts #132

Closed Inglebard closed 1 year ago

Inglebard commented 1 year ago

Hi,

I would like to retrieve all number of my phonebook.

On OVH manager, they can pass 50 contacts IDs like this : /engine/apiv6/sms/{sms-account}/phonebooks/{phonebook}/phonebookContact/{id1},{id2},{id3},{id4},{id5},...

On the API, I can only pass one ID.

I need to retrieve 1000 numbers, and it is slow.

Is there something not documented where I can pass multiple IDs like in the OVH manager interface ?

a-beudin commented 1 year ago

Hi,

You can add the "X-Ovh-Batch:," header to your request this way the request /sms/{sms-account}/phonebooks/{phonebook}/phonebookContact/{id1},{id2},{id3},{id4},{id5} should work.

However, please take note that we don't guarantee this feature will continue to work in the long term as it is not a documented feature and we may change the way batch calls work in the future.

Inglebard commented 1 year ago

Hi, Thanks. Faster than ever. I hope this hidden feature will stay.