Trendsic Platform Service

<back to all web services

StationsRequest

Requires Authentication
Required roles:Administrator, Administrator, AdministratorRequires any of the roles:Agent, Administrator
The following routes are available for this service:
GET,POST,PUT,DELETE,OPTIONS/v1/Stations/{Id}
GET,OPTIONS/v1/StationsByLocation/{LocationId}
GET,POST,PUT,DELETE,OPTIONS/v1/Stations
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class StationsRequest
    {
        public UUID Id = null;
        public UUID LocationId = null;
        public ArrayList<Station> Stations = new ArrayList<Station>();
        
        public UUID getId() { return Id; }
        public StationsRequest setId(UUID value) { this.Id = value; return this; }
        public UUID getLocationId() { return LocationId; }
        public StationsRequest setLocationId(UUID value) { this.LocationId = value; return this; }
        public ArrayList<Station> getStations() { return Stations; }
        public StationsRequest setStations(ArrayList<Station> value) { this.Stations = value; return this; }
    }

    public static class Station
    {
        public UUID Id = null;
        public UUID LocationId = null;
        public String LocationName = null;
        public String StationName = null;
        public Boolean Active = null;
        
        public UUID getId() { return Id; }
        public Station setId(UUID value) { this.Id = value; return this; }
        public UUID getLocationId() { return LocationId; }
        public Station setLocationId(UUID value) { this.LocationId = value; return this; }
        public String getLocationName() { return LocationName; }
        public Station setLocationName(String value) { this.LocationName = value; return this; }
        public String getStationName() { return StationName; }
        public Station setStationName(String value) { this.StationName = value; return this; }
        public Boolean isActive() { return Active; }
        public Station setActive(Boolean value) { this.Active = value; return this; }
    }

    public static class StationsResponse
    {
        public ResponseStatus ResponseStatus = null;
        public ArrayList<Station> Stations = new ArrayList<Station>();
        
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public StationsResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
        public ArrayList<Station> getStations() { return Stations; }
        public StationsResponse setStations(ArrayList<Station> value) { this.Stations = value; return this; }
    }

}

Java StationsRequest 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/Stations/{Id} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Id: 00000000000000000000000000000000,
	LocationId: 00000000000000000000000000000000,
	Stations: 
	[
		{
			Id: 00000000000000000000000000000000,
			LocationId: 00000000000000000000000000000000,
			LocationName: String,
			StationName: String,
			Active: False
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	Stations: 
	[
		{
			Id: 00000000000000000000000000000000,
			LocationId: 00000000000000000000000000000000,
			LocationName: String,
			StationName: String,
			Active: False
		}
	]
}