[Tip of the Week] Delete all Table Records using a Table API

Hi @Beth,
Any fix that you/team could come up with? Appreciate your help!

@sahilsaluja You are using workspaces in your instance, correct? So somethign that we need to improve in our documentation, but you need to use the {{your-tulip-instance}}/api/v3/w/{{tulip-workspace-id}}/tables/{{tulip-table-id}}/records API endpoint. Workspaces API Endpoint

If you add in your workspace ID, does this resolve the error?

Another thing to check - does your api token have the necessary permission to delete records? If it only has “tables:read” you could encounter this issue because you will need “tables:write” permission as well Quote from “Setting up the Table API”

One last simple thing, but did you double check the tableID you are inputting is correct (no extra spaces or anything)?

I recreated the API token and connector function from scratch.

  • Added the workspace.
  • Selected tables:write
  • Double checked on the tableID.

Hey @Beth, hope you’re doing well!
Is a similar connector function working fine on your instance or is something up with my setup possibly? Apologies for the repeated follow-ups.

does this same setup work fine, when you use get instead of delete (must remove the allowRecordsInUse parameter).

I have the exact same function but no issues with that.

On changing the method from delete to get, am getting the same error code - forbidden.

So I can’t think of something else than the setting of the authentication is incorrect.
Maybe an additional whitespace or something…

username must begin with apikey. (including) and is 26 characters long.
password is the “secret” and a 43 character random string and may include - and/or _

1 Like

Hi @sahilsaluja - thanks for following up, I had forgotten to respond!

I think @thorsten.langner is right that the issue may be in the authentication - can you try to hit the API without a connector function to isolate the issue?

Another thought is around permissions, as the user running the request, do you have permission to access a connector function in your instance settings?