Skip to main content

Writing Resources

Creating Resources​

To create a resource, construct the object and then call the API.

family_member = { ... }
plasma.create_resource("FamilyMemberHistory", family_member)
tip

For help with constructing resources, see the Resources page.

Updating Resources​

To update a resource, ensure that the object you are passing already exists and has an Id.

family_member.name = "J";
plasma.update("FamilyMemberHistory", family_member)

Deleting Resources​

To delete a resource, ensure that the object you are passing already exists and has an Id. You can either pass in the object itself or only the ID to delete the object.

Delete by Object​

plasma.delete(family_member)

Delete by ID​

plasma.delete_by_id("FamilyMemberHistory", myFamilyMember.id);