public GetAssignmentsAsync ( string legalHoldPolicyId, string fields = null, string assignToType = null, string assignToId = null, int limit = 100, string marker = null, bool autoPaginate = false ) : Task |
||
legalHoldPolicyId | string | ID of Policy to get Assignments for. |
fields | string | Attribute(s) to include in the response. |
assignToType | string | Filter assignments of this type only. Can be file_version, file, folder, or user. |
assignToId | string | Filter assignments to this ID only. Note that this will only show assignments applied directly to this entity. |
limit | int | Limit result size to this number. Defaults to 100, maximum is 1,000. |
marker | string | Take from "next_marker" column of a prior call to get the next page. |
autoPaginate | bool | Whether or not to auto-paginate to fetch all items; defaults to false. |
리턴 | Task |
public async Task<BoxCollectionMarkerBased<BoxLegalHoldPolicyAssignment>> GetAssignmentsAsync(string legalHoldPolicyId, string fields = null, string assignToType = null, string assignToId = null, int limit = 100, string marker = null, bool autoPaginate = false)
{
legalHoldPolicyId.ThrowIfNullOrWhiteSpace("legalHoldPolicyId");
BoxRequest request = new BoxRequest(_config.LegalHoldPoliciesEndpointUri, string.Format(Constants.LegalHoldPolicyAssignmentsPathString, legalHoldPolicyId))
.Method(RequestMethod.Get)
.Param(ParamFields, fields)
.Param("assign_to_type", assignToType)
.Param("assign_to_id", assignToId)
.Param("limit", limit.ToString())
.Param("marker", marker);
if (autoPaginate)
{
return await AutoPaginateMarker<BoxLegalHoldPolicyAssignment>(request, limit);
}
else
{
IBoxResponse<BoxCollectionMarkerBased<BoxLegalHoldPolicyAssignment>> response = await ToResponseAsync<BoxCollectionMarkerBased<BoxLegalHoldPolicyAssignment>>(request).ConfigureAwait(false);
return response.ResponseObject;
}
}