Shares
SDK methods for the Shares module, accessed via soat.shares. See the Shares module docs for permissions and data model, and each method's REST page for the full request/response schema.
soat.shares.createShare()
Create a share
- Method:
POST - Path:
/api/v1/shares
await soat.shares.createShare({
body: { resource, actions, grantee, /* + optional */ },
});
soat.shares.listShares()
List shares
- Method:
GET - Path:
/api/v1/shares
await soat.shares.listShares({
query: { /* + optional */ },
});
soat.shares.getShare()
Get a share
- Method:
GET - Path:
/api/v1/shares/{share_id}
await soat.shares.getShare({
path: { share_id },
query: { /* + optional */ },
});
soat.shares.updateShare()
Update a share
- Method:
PATCH - Path:
/api/v1/shares/{share_id}
await soat.shares.updateShare({
path: { share_id },
body: { /* + optional */ },
});
soat.shares.deleteShare()
Delete a share
- Method:
DELETE - Path:
/api/v1/shares/{share_id}
await soat.shares.deleteShare({
path: { share_id },
});
soat.shares.acceptShare()
Accept a share
- Method:
POST - Path:
/api/v1/shares/{share_id}/accept
await soat.shares.acceptShare({
path: { share_id },
body: { /* + optional */ },
});
soat.shares.suspendShare()
Suspend a share
- Method:
POST - Path:
/api/v1/shares/{share_id}/suspend
await soat.shares.suspendShare({
path: { share_id },
});
soat.shares.resumeShare()
Resume a share
- Method:
POST - Path:
/api/v1/shares/{share_id}/resume
await soat.shares.resumeShare({
path: { share_id },
});
soat.shares.revokeShare()
Revoke a share
- Method:
POST - Path:
/api/v1/shares/{share_id}/revoke
await soat.shares.revokeShare({
path: { share_id },
query: { /* + optional */ },
body: { /* + optional */ },
});
soat.shares.listShareReferences()
List a grantee's references to a shared resource
- Method:
GET - Path:
/api/v1/shares/{share_id}/references
await soat.shares.listShareReferences({
path: { share_id },
query: { /* + optional */ },
});
soat.shares.listShareAcceptances()
List a share's acceptances
- Method:
GET - Path:
/api/v1/shares/{share_id}/acceptances
await soat.shares.listShareAcceptances({
path: { share_id },
query: { /* + optional */ },
});
soat.shares.revokeShareAcceptance()
Revoke an acceptance
- Method:
POST - Path:
/api/v1/shares/{share_id}/acceptances/{acceptance_id}/revoke
await soat.shares.revokeShareAcceptance({
path: { share_id, acceptance_id },
});
soat.shares.deleteShareAcceptance()
Delete an acceptance
- Method:
DELETE - Path:
/api/v1/shares/{share_id}/acceptances/{acceptance_id}
await soat.shares.deleteShareAcceptance({
path: { share_id, acceptance_id },
});