Trendsic Platform Service

<back to all web services

BatchAssignUsersToRole

Requires Authentication
The following routes are available for this service:
POST/v1/roles/batch-assign
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class BatchAssignUsersToRole
    {
        public Integer RoleId = null;
        public ArrayList<UUID> UserIds = new ArrayList<UUID>();
        
        public Integer getRoleId() { return RoleId; }
        public BatchAssignUsersToRole setRoleId(Integer value) { this.RoleId = value; return this; }
        public ArrayList<UUID> getUserIds() { return UserIds; }
        public BatchAssignUsersToRole setUserIds(ArrayList<UUID> value) { this.UserIds = value; return this; }
    }

    public static class BatchAssignUsersToRoleResponse
    {
        public Integer Inserted = null;
        public Integer Requested = null;
        public Integer Skipped = null;
        public ResponseStatus ResponseStatus = null;
        
        public Integer getInserted() { return Inserted; }
        public BatchAssignUsersToRoleResponse setInserted(Integer value) { this.Inserted = value; return this; }
        public Integer getRequested() { return Requested; }
        public BatchAssignUsersToRoleResponse setRequested(Integer value) { this.Requested = value; return this; }
        public Integer getSkipped() { return Skipped; }
        public BatchAssignUsersToRoleResponse setSkipped(Integer value) { this.Skipped = value; return this; }
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public BatchAssignUsersToRoleResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
    }

}

Java BatchAssignUsersToRole DTOs

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

HTTP + JSV

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

POST /v1/roles/batch-assign HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	RoleId: 0,
	UserIds: 
	[
		00000000000000000000000000000000
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Inserted: 0,
	Requested: 0,
	Skipped: 0,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}