Platform API

<back to all web services

UpdateRoleWithSharing

Updates a Role record, and updates Sharing.

Requires Authentication
The following routes are available for this service:
PUT/api/roles
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    /**
    * Updates a Role record, and updates Sharing.
    */
    @Api(Description="Updates a Role record, and updates Sharing.")
    public static class UpdateRoleWithSharing
    {
        /**
        * Details of the Contact Role to be Updated.
        */
        @ApiMember(DataType="RoleDetailsModel", Description="Details of the Contact Role to be Updated.", IsRequired=true, Name="RoleDetails", ParameterType="query")
        public RoleDetailsModel RoleDetails = null;

        /**
        * 
        */
        @ApiMember(DataType="FormCollection", Description="", Name="Form", ParameterType="query")
        public FormCollection Form = null;

        /**
        * List of Object Share details.
        */
        @ApiMember(DataType="List<ObjectShareModel>", Description="List of Object Share details.", Name="ShareList", ParameterType="query")
        public ArrayList<ObjectShareModel> ShareList = null;
        
        public RoleDetailsModel getRoleDetails() { return RoleDetails; }
        public UpdateRoleWithSharing setRoleDetails(RoleDetailsModel value) { this.RoleDetails = value; return this; }
        public FormCollection getForm() { return Form; }
        public UpdateRoleWithSharing setForm(FormCollection value) { this.Form = value; return this; }
        public ArrayList<ObjectShareModel> getShareList() { return ShareList; }
        public UpdateRoleWithSharing setShareList(ArrayList<ObjectShareModel> value) { this.ShareList = value; return this; }
    }

    public static class RoleDetailsModel
    {
        /**
        * Role Id
        */
        @ApiMember(DataType="Guid", Description="Role Id", Name="RoleId")
        public UUID RoleId = null;

        /**
        * Role Name
        */
        @ApiMember(DataType="string", Description="Role Name", Name="RoleName")
        public String RoleName = null;

        /**
        * Role Connection Definition Id
        */
        @ApiMember(DataType="Guid", Description="Role Connection Definition Id", Name="RoleConnectionDefinitionId")
        public UUID RoleConnectionDefinitionId = null;

        /**
        * Contact Types the Role applies to
        */
        @ApiMember(DataType="List", Description="Contact Types the Role applies to", Name="ContactTypes")
        public ArrayList<UUID> ContactTypes = null;

        /**
        * Does the role require contacts to accept it?
        */
        @ApiMember(DataType="bool", Description="Does the role require contacts to accept it?", Name="RequireContactsToAccept")
        public Boolean RequireContactsToAccept = null;

        /**
        * Filters linked to the custom role.
        */
        @ApiMember(DataType="List", Description="Filters linked to the custom role.", Name="ListItemFilters")
        public ArrayList<ListItemFilterModel> ListItemFilters = null;
        
        public UUID getRoleId() { return RoleId; }
        public RoleDetailsModel setRoleId(UUID value) { this.RoleId = value; return this; }
        public String getRoleName() { return RoleName; }
        public RoleDetailsModel setRoleName(String value) { this.RoleName = value; return this; }
        public UUID getRoleConnectionDefinitionId() { return RoleConnectionDefinitionId; }
        public RoleDetailsModel setRoleConnectionDefinitionId(UUID value) { this.RoleConnectionDefinitionId = value; return this; }
        public ArrayList<UUID> getContactTypes() { return ContactTypes; }
        public RoleDetailsModel setContactTypes(ArrayList<UUID> value) { this.ContactTypes = value; return this; }
        public Boolean isRequireContactsToAccept() { return RequireContactsToAccept; }
        public RoleDetailsModel setRequireContactsToAccept(Boolean value) { this.RequireContactsToAccept = value; return this; }
        public ArrayList<ListItemFilterModel> getListItemFilters() { return ListItemFilters; }
        public RoleDetailsModel setListItemFilters(ArrayList<ListItemFilterModel> value) { this.ListItemFilters = value; return this; }
    }

    public static class ListItemFilterModel
    {
        public UUID ListItemFilterId = null;
        public String FilterName = null;
        public UUID ListId = null;
        public UUID ListItemId = null;
        public Boolean ListItemIsInFilter = null;
        
        public UUID getListItemFilterId() { return ListItemFilterId; }
        public ListItemFilterModel setListItemFilterId(UUID value) { this.ListItemFilterId = value; return this; }
        public String getFilterName() { return FilterName; }
        public ListItemFilterModel setFilterName(String value) { this.FilterName = value; return this; }
        public UUID getListId() { return ListId; }
        public ListItemFilterModel setListId(UUID value) { this.ListId = value; return this; }
        public UUID getListItemId() { return ListItemId; }
        public ListItemFilterModel setListItemId(UUID value) { this.ListItemId = value; return this; }
        public Boolean isListItemIsInFilter() { return ListItemIsInFilter; }
        public ListItemFilterModel setListItemIsInFilter(Boolean value) { this.ListItemIsInFilter = value; return this; }
    }

    public static class ObjectShareModel
    {
        public UUID ObjectShareId = null;
        public UUID ObjectId = null;
        public String ObjectName = null;
        public String Name = null;
        public String Description = null;
        public String Reference = null;
        public UUID ContactId = null;
        public String ContactName = null;
        public String ContactType = null;
        public String ContactImageUrlPrimary = null;
        public String ContactImageUrlPrimaryThmbnail = null;
        public UUID ShareStatusId = null;
        public String ShareStatusName = null;
        
        public UUID getObjectShareId() { return ObjectShareId; }
        public ObjectShareModel setObjectShareId(UUID value) { this.ObjectShareId = value; return this; }
        public UUID getObjectId() { return ObjectId; }
        public ObjectShareModel setObjectId(UUID value) { this.ObjectId = value; return this; }
        public String getObjectName() { return ObjectName; }
        public ObjectShareModel setObjectName(String value) { this.ObjectName = value; return this; }
        public String getName() { return Name; }
        public ObjectShareModel setName(String value) { this.Name = value; return this; }
        public String getDescription() { return Description; }
        public ObjectShareModel setDescription(String value) { this.Description = value; return this; }
        public String getReference() { return Reference; }
        public ObjectShareModel setReference(String value) { this.Reference = value; return this; }
        public UUID getContactId() { return ContactId; }
        public ObjectShareModel setContactId(UUID value) { this.ContactId = value; return this; }
        public String getContactName() { return ContactName; }
        public ObjectShareModel setContactName(String value) { this.ContactName = value; return this; }
        public String getContactType() { return ContactType; }
        public ObjectShareModel setContactType(String value) { this.ContactType = value; return this; }
        public String getContactImageUrlPrimary() { return ContactImageUrlPrimary; }
        public ObjectShareModel setContactImageUrlPrimary(String value) { this.ContactImageUrlPrimary = value; return this; }
        public String getContactImageUrlPrimaryThmbnail() { return ContactImageUrlPrimaryThmbnail; }
        public ObjectShareModel setContactImageUrlPrimaryThmbnail(String value) { this.ContactImageUrlPrimaryThmbnail = value; return this; }
        public UUID getShareStatusId() { return ShareStatusId; }
        public ObjectShareModel setShareStatusId(UUID value) { this.ShareStatusId = value; return this; }
        public String getShareStatusName() { return ShareStatusName; }
        public ObjectShareModel setShareStatusName(String value) { this.ShareStatusName = value; return this; }
    }

}

Java UpdateRoleWithSharing DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /api/roles HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"RoleDetails":{"RoleId":"00000000-0000-0000-0000-000000000000","RoleName":"String","RoleConnectionDefinitionId":"00000000-0000-0000-0000-000000000000","ContactTypes":["00000000-0000-0000-0000-000000000000"],"RequireContactsToAccept":false,"ListItemFilters":[{"ListItemFilterId":"00000000-0000-0000-0000-000000000000","FilterName":"String","ListId":"00000000-0000-0000-0000-000000000000","ListItemId":"00000000-0000-0000-0000-000000000000","ListItemIsInFilter":false}]},"Form":[],"ShareList":[{"ObjectShareId":"00000000-0000-0000-0000-000000000000","ObjectId":"00000000-0000-0000-0000-000000000000","ObjectName":"String","Name":"String","Description":"String","Reference":"String","ContactId":"00000000-0000-0000-0000-000000000000","ContactName":"String","ContactType":"String","ContactImageUrlPrimary":"String","ContactImageUrlPrimaryThmbnail":"String","ShareStatusId":"00000000-0000-0000-0000-000000000000","ShareStatusName":"String"}]}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}