<aside> 📣 Answers to common, technical questions.

</aside>

Table of Content


How do I check if a PDA exists?

You can use the public key endpoint to verify if the PDA exists. eg. you can send a GET request to https://test.hubat.net/publickey and if the response is 200 the PDA exists.

I receive a duplicate data error whenever I try to insert the same object to two different endpoints/namespaces.

Currently, the PDA doesn’t allow creating the same object twice, even in different namespaces.

Is there any way to read a record by its record Id?

In its current version, the API doesn't support getting records by their record IDs.

Is it possible to create unique indexes for custom properties in a data path?

For example, not allowing multiple entries at https://postman.hubat.net/api/v2.6/data/testdocumentation/testpath with the same data.value?

At the moment, the PDA doesn't support unique indexes, so you cannot ensure that a property will have a unique value. The PDA only validates if the whole JSON object is unique, but it does not provide such granularity at a single field level.

For example, if you want to post the same object twice, it will fail:

{firstName: "John", lastName: "Smith"};

And it will succeed if you change the value of the property lastName:

{firstName: "John", lastName: "Wick"};

So, you cannot ensure that the value of the property lastName will be unique

Is there any way to update only a nested field of a record Id without first fetching the whole object?