/  Yamcs HTTP API  /  File Transfer  /  Get File Transfer Service

Get File Transfer ServiceΒΆ

Get a file transfer service

URI Template

GET /api/filetransfer/{instance}/services/{serviceName}
{instance}

Yamcs instance name

{serviceName}

File transfer service name

Response Type

interface FileTransferServiceInfo {

  // Yamcs instance name
  instance: string;

  // File transfer service name
  name: string;
  localEntities: EntityInfo[];
  remoteEntities: EntityInfo[];
  capabilities: FileTransferCapabilities;
  transferOptions: FileTransferOption[];
}

Related Types

interface EntityInfo {
  name: string;
  id: string;  // String decimal
}

interface FileTransferCapabilities {

  // Whether the transfer service supports uploads
  upload: boolean;

  // Whether the transfer service supports downloads
  download: boolean;

  // Whether the transfer service supports specifying an upload path
  remotePath: boolean;

  // Whether the transfer service supports remote file listings
  fileList: boolean;

  // Whether transfers contain a column describing the Transfer Type
  hasTransferType: boolean;

  // Additional columns to show in a file listing, where id
  // is a key of ``RemoteFile.extra``
  fileListExtraColumns: ExtraColumnInfo[];

  // Additional actions that may be executed on remote files
  fileActions: ActionInfo[];
}

interface ExtraColumnInfo {
  id: string;
  label: string;
}

interface ActionInfo {

  // Action identifier
  id: string;

  // Label describing an action
  label: string;

  // Action style, one of ``PUSH_BUTTON`` or ``CHECK_BOX``
  style: string;

  // Whether this action is currently enabled
  enabled: boolean;

  // Whether this action is currently checked
  checked: boolean;

  // Specification of action options (if any)
  spec: SpecInfo;
}

// Specifies the valid structure of a configuration map
interface SpecInfo {

  // Options for this specification
  options: OptionInfo[];

  // If true, any option is allowed
  allowUnknownKeys: boolean;

  // Constraints on a groups of options. For each group at least one
  // of the keys must be specified.
  requiredOneOf: OptionGroupInfo[];

  // Constraints on a group of options. For each group, all keys must
  // be specified, or none at all.
  requireTogether: OptionGroupInfo[];

  // Conditional constraints on a group of options
  whenConditions: WhenConditionInfo[];
}

interface OptionInfo {

  // Name of this option, unique within a spec
  name: string;

  // Type of this option
  type: OptionType;

  // UI-friendly label for this option
  title: string;

  // Default value when the option is not specified
  default: Value;

  // Whether this options must be specified
  required: boolean;

  // Hint that this option should be excluded from any
  // document generation
  hidden: boolean;

  // Hint that value for this option should not be
  // logged
  secret: boolean;

  // Which version of this software this option was added.
  // Can be the Yamcs version, or the version of a plugin.
  versionAdded: string;

  // Deprecation message for this option
  deprecationMessage: string;

  // Description, each list entry represents a paragraph
  description: string[];

  // When the type is ``LIST`` or ``LIST_OR_ELEMENT``, this indicates the type
  // of each element of that list
  elementType: OptionType;

  // When the type or elementType is ``MAP``, this specifies
  // the options with that map
  spec: SpecInfo;

  // Allowed values for this option
  choices: Value[];

  // When the type is ``MAP``, this property determines whether default values
  // are generated even when a value for that option was not provided.
  applySpecDefaults: boolean;

  // Additional names that can be used for this option
  aliases: string[];
}

// `Value` represents a dynamically typed value which can be either
// null, a number, a string, a boolean, a recursive struct value, or a
// list of values. A producer of value is expected to set one of that
// variants, absence of any variant indicates an error.
//
// The JSON representation for `Value` is JSON value.
interface Value {

  // Represents a null value.
  nullValue: NullValue;

  // Represents a double value.
  numberValue: number;

  // Represents a string value.
  stringValue: string;

  // Represents a boolean value.
  boolValue: boolean;

  // Represents a structured value.
  structValue: {[key: string]: any};

  // Represents a repeated `Value`.
  listValue: ListValue;
}

// `ListValue` is a wrapper around a repeated field of values.
//
// The JSON representation for `ListValue` is JSON array.
interface ListValue {

  // Repeated field of dynamically typed values.
  values: Value[];
}

interface OptionGroupInfo {

  // Option keys
  keys: string[];
}

interface WhenConditionInfo {

  // Option key for checking the condition
  key: string;

  // Value to compare with
  value: Value;

  // Option keys that must be specified, if the condition is satisfied
  requiredKeys: string[];
}

//
//CUSTOMISABLE FILE TRANSFER OPTIONS
interface FileTransferOption {

  // Identifier
  name: string;

  // Option type
  type: Type;

  // Title for the option
  title: string;

  // Help text shown on hover
  description: string;

  // Placeholder for fields and label for checkboxes
  associatedText: string;

  // Default value for the field
  default: string;

  // Values for potential dropdown menu
  values: Value[];

  // Whether a custom field is needed when using the drop-down menu
  allowCustomOption: boolean;
}

interface Value {

  // Real value for the option (used to sent to the server)
  value: string;

  // Display name for the value
  verboseName: string;
}

enum OptionType {
  ANY = "ANY",
  BOOLEAN = "BOOLEAN",
  INTEGER = "INTEGER",
  FLOAT = "FLOAT",
  LIST = "LIST",
  LIST_OR_ELEMENT = "LIST_OR_ELEMENT",
  MAP = "MAP",
  STRING = "STRING",
}

enum NullValue {

  // Null value.
  NULL_VALUE = "NULL_VALUE",
}

enum Type {

  // Shown as checkbox in the UI
  BOOLEAN = "BOOLEAN",

  // Shown as a number field or drop-down if values is specified
  DOUBLE = "DOUBLE",

  // Shown as text field or drop-down if values is specified
  STRING = "STRING",
}