Skip to main content

connection_memberships

Creates, updates, deletes, gets or lists a connection_memberships resource.

Overview​

Nameconnection_memberships
TypeResource
Idfivetran.teams.connection_memberships

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe membership entity unique identifier (example: resource_id)
created_atstring (date-time)The timestamp that the user created their Fivetran account (example: 2024-01-01T00:00:00Z)
rolestringThe role the user has within the entity (example: Role Title)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectteam_id, connection_idReturns details of a team membership in a connection.
listselectteam_idcursor, limitReturns all connections a team has membership in.
createinsertteam_id, id, roleAdds a team as a member of a connection.
updateupdateteam_id, connection_id, roleUpdates team membership in a connection
deletedeleteteam_id, connection_idRemoves team membership in a connection.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
connection_idstringThe unique identifier of the connection. Retrieve it from the id field in the [List All Connections](https:​//fivetran.com/docs/rest-api/api-reference/connections/list-connections) response, or from the id field returned when you [Create a Connection](https:​//fivetran.com/docs/rest-api/api-reference/connections/create-connection).
team_idstringThe unique identifier for the team within the account.
cursorstringPaging cursor, [read more about pagination](https:​//fivetran.com/docs/rest-api/pagination)
limitinteger (int32)Number of records to fetch per page. Accepts a number in the range 1..1000; the default value is 100.

SELECT examples​

Returns details of a team membership in a connection.

SELECT
id,
created_at,
role
FROM fivetran.teams.connection_memberships
WHERE team_id = '{{ team_id }}' -- required
AND connection_id = '{{ connection_id }}' -- required
;

INSERT examples​

Adds a team as a member of a connection.

INSERT INTO fivetran.teams.connection_memberships (
id,
role,
team_id
)
SELECT
'{{ id }}' /* required */,
'{{ role }}' /* required */,
'{{ team_id }}'
RETURNING
id,
created_at,
role
;

UPDATE examples​

Updates team membership in a connection

UPDATE fivetran.teams.connection_memberships
SET
role = '{{ role }}'
WHERE
team_id = '{{ team_id }}' --required
AND connection_id = '{{ connection_id }}' --required
AND role = '{{ role }}' --required
RETURNING
id,
created_at,
role;

DELETE examples​

Removes team membership in a connection.

DELETE FROM fivetran.teams.connection_memberships
WHERE team_id = '{{ team_id }}' --required
AND connection_id = '{{ connection_id }}' --required
;