Required role: | REGISUserRole |
POST | /Programs |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using regis.ClassLibrary.Requests;
using regis.ClassLibrary.Responses;
namespace regis.ClassLibrary.Requests
{
public partial class ProgramsRequest
{
}
}
namespace regis.ClassLibrary.Responses
{
public partial class ProgramResponse
{
public virtual ResponseStatus ResponseStatus { get; set; }
public virtual int id { get; set; }
public virtual string program_code { get; set; }
public virtual string program_pretty_code { get; set; }
public virtual string program_long_name { get; set; }
public virtual string available_concentrations { get; set; }
public virtual bool is_active { get; set; }
public virtual DateTime timestamp { get; set; }
}
public partial class ProgramsResponse
{
public ProgramsResponse()
{
programs = new List<ProgramResponse>{};
}
public virtual ResponseStatus ResponseStatus { get; set; }
public virtual List<ProgramResponse> programs { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Programs HTTP/1.1
Host: data.regent-college.edu
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"programs":[{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"id":0,"program_code":"String","program_pretty_code":"String","program_long_name":"String","available_concentrations":"String","is_active":false,"timestamp":"0001-01-01T00:00:00.0000000"}]}