Match Targets
- class Match_Targets(session_kwargs, client, return_type='raw')
Civis API
/match_targetsendpoint:import civis client = civis.APIClient() # Call client.match_targets.<method>(<arguments>) to make a request, e.g.: client.match_targets.list_shares(...)
Methods
delete_shares_groups(id, group_id)Revoke the permissions a group has on this object
delete_shares_users(id, user_id)Revoke the permissions a user has on this object
get(id)Show Match Target info
list()List match targets
list_shares(id)List users and groups permissioned on this object
patch(id, *[, name, target_file_name, archived])Update a match target
post(name, *[, target_file_name, archived])Create a new match target
put_archive(id, status)Update the archive status of this object
put_shares_groups(id, group_ids, ...[, ...])Set the permissions groups has on this object
put_shares_users(id, user_ids, ...[, ...])Set the permissions users have on this object
Revoke the permissions a group has on this object
API URL:
DELETE /match_targets/{id}/shares/groups/{group_id}- Parameters:
- idint
The ID of the resource that is shared.
- group_idint
The ID of the group.
- Returns:
- None
Response code 204: success
Revoke the permissions a user has on this object
API URL:
DELETE /match_targets/{id}/shares/users/{user_id}- Parameters:
- idint
The ID of the resource that is shared.
- user_idint
The ID of the user.
- Returns:
- None
Response code 204: success
- get(id: int) Response
Show Match Target info
API URL:
GET /match_targets/{id}- Parameters:
- idint
The ID of the match target
- Returns:
civis.Response- idint
The ID of the match target
- namestr
The name of the match target
- target_file_namestr
The name of the target file
created_at : str (time)
updated_at : str (time)
- archivedbool
Whether the match target has been archived.
- list() ListResponse
List match targets
API URL:
GET /match_targets- Returns:
civis.ListResponse- idint
The ID of the match target
- namestr
The name of the match target
- target_file_namestr
The name of the target file
created_at : str (time)
updated_at : str (time)
- archivedbool
Whether the match target has been archived.
List users and groups permissioned on this object
API URL:
GET /match_targets/{id}/shares- Parameters:
- idint
The ID of the resource that is shared.
- Returns:
civis.ListResponse- readers
civis.Response - usersList[
civis.Response] id : int
name : str
- usersList[
- groupsList[
civis.Response] id : int
name : str
- groupsList[
- readers
- writers
civis.Response - usersList[
civis.Response] id : int
name : str
- usersList[
- groupsList[
civis.Response] id : int
name : str
- groupsList[
- writers
- owners
civis.Response - usersList[
civis.Response] id : int
name : str
- usersList[
- groupsList[
civis.Response] id : int
name : str
- groupsList[
- owners
- total_user_sharesint
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_sharesint
For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.
- patch(id: int, *, name: str = None, target_file_name: str = None, archived: bool = None) Response
Update a match target
API URL:
PATCH /match_targets/{id}- Parameters:
- idint
The ID of the match target
- namestr, optional
The name of the match target
- target_file_namestr, optional
The name of the target file
- archivedbool, optional
Whether the match target has been archived.
- Returns:
civis.Response- idint
The ID of the match target
- namestr
The name of the match target
- target_file_namestr
The name of the target file
created_at : str (time)
updated_at : str (time)
- archivedbool
Whether the match target has been archived.
- post(name: str, *, target_file_name: str = None, archived: bool = None) Response
Create a new match target
API URL:
POST /match_targets- Parameters:
- namestr
The name of the match target
- target_file_namestr, optional
The name of the target file
- archivedbool, optional
Whether the match target has been archived.
- Returns:
civis.Response- idint
The ID of the match target
- namestr
The name of the match target
- target_file_namestr
The name of the target file
created_at : str (time)
updated_at : str (time)
- archivedbool
Whether the match target has been archived.
- put_archive(id: int, status: bool) Response
Update the archive status of this object
API URL:
PUT /match_targets/{id}/archive- Parameters:
- idint
The ID of the object.
- statusbool
The desired archived status of the object.
- Returns:
civis.Response- idint
The ID of the match target
- namestr
The name of the match target
- target_file_namestr
The name of the target file
created_at : str (time)
updated_at : str (time)
- archivedbool
Whether the match target has been archived.
Set the permissions groups has on this object
API URL:
PUT /match_targets/{id}/shares/groups- Parameters:
- idint
The ID of the resource that is shared.
- group_idsList[int]
An array of one or more group IDs.
- permission_levelstr
Options are: “read”, “write”, or “manage”.
- share_email_bodystr, optional
Custom body text for e-mail sent on a share.
- send_shared_emailbool, optional
Send email to the recipients of a share.
- Returns:
civis.Response- readers
civis.Response - usersList[
civis.Response] id : int
name : str
- usersList[
- groupsList[
civis.Response] id : int
name : str
- groupsList[
- readers
- writers
civis.Response - usersList[
civis.Response] id : int
name : str
- usersList[
- groupsList[
civis.Response] id : int
name : str
- groupsList[
- writers
- owners
civis.Response - usersList[
civis.Response] id : int
name : str
- usersList[
- groupsList[
civis.Response] id : int
name : str
- groupsList[
- owners
- total_user_sharesint
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_sharesint
For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.
Set the permissions users have on this object
API URL:
PUT /match_targets/{id}/shares/users- Parameters:
- idint
The ID of the resource that is shared.
- user_idsList[int]
An array of one or more user IDs.
- permission_levelstr
Options are: “read”, “write”, or “manage”.
- share_email_bodystr, optional
Custom body text for e-mail sent on a share.
- send_shared_emailbool, optional
Send email to the recipients of a share.
- Returns:
civis.Response- readers
civis.Response - usersList[
civis.Response] id : int
name : str
- usersList[
- groupsList[
civis.Response] id : int
name : str
- groupsList[
- readers
- writers
civis.Response - usersList[
civis.Response] id : int
name : str
- usersList[
- groupsList[
civis.Response] id : int
name : str
- groupsList[
- writers
- owners
civis.Response - usersList[
civis.Response] id : int
name : str
- usersList[
- groupsList[
civis.Response] id : int
name : str
- groupsList[
- owners
- total_user_sharesint
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_sharesint
For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.