Back to top

DCCast Host

Resource Group

Send

Start a Sending
POST/send/{transferId}{?dst,port,rate}

A send request will start a NORM sender and send data from its own IP address and port number port to IP address dst and port number port.

Example URI

POST /send/0?dst=127.0.0.1&port=1000&rate=500
URI Parameters
HideShow
transferId
number (required) Example: 0

An unique integer identifier of transfer seesion with a range [0, 100000].

dst
string (required) Example: 127.0.0.1

The desination IP address as a string.

port
number (required) Example: 1000

An integer with a range [1000, 9999]. The port number that will be used as both source port and destination port.

rate
number (required) Example: 500

An integer with a range[1, max(double)] that indicate how many bits the sender should send in 1 second.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": [
        "string",
        "null"
      ],
      "description": "Must be null."
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Reason of the error."
    }
  }
}

Receive

Start a Receiving
POST/receive/{transferId}{?src,port}

A receive request will start a NORM receiver and wait for data from the IP address src and port number port.

Example URI

POST /receive/0?src=127.0.0.1&port=1000
URI Parameters
HideShow
transferId
number (required) Example: 0

An unique integer identifier of transfer seesion with a range [0, 100000].

src
string (optional) Example: 127.0.0.1

The IP address of sender. Currently this parameter will be ignored and “0.0.0.0” will be used instead.

port
number (required) Example: 1000

An integer with a range [1000, 9999]. The port number that will be used as both source port and destination port.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": [
        "string",
        "null"
      ],
      "description": "Must be null."
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Reason of the error."
    }
  }
}

Update Rate

Update the Rate of a Sender
POST/updateRate/{transferId}{?rate}

An update rate request will update rate limit of the sender with id transferId.

Example URI

POST /updateRate/0?rate=500
URI Parameters
HideShow
transferId
number (required) Example: 0

An unique integer identifier of transfer session with a range [0, 100000].

rate
number (required) Example: 500

An integer with a range[1, max(double)] that indicate how many bits the sender should send in 1 second.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": [
        "string",
        "null"
      ],
      "description": "Must be null."
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Reason of the error."
    }
  }
}

Progress

Check Progress
GET/progress/{transferId}

Return how many bytes a sender/receiver has processed.

Example URI

GET /progress/0
URI Parameters
HideShow
transferId
number (required) Example: 0

An unique integer identifier of transfer session with a range [0, 100000].

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "Hello, world!",
  "type": "Hello, world!",
  "progress": 1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": [
        "string",
        "null"
      ],
      "description": "Must be null."
    },
    "type": {
      "type": "string",
      "description": "Either a \"receiver\" or a \"sender\"."
    },
    "progress": {
      "type": "number",
      "description": "Bytes that have been sent/received."
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": [
        "string",
        "null"
      ],
      "description": "Reason of the error."
    }
  }
}

Terminate

Forece a Termination
POST/terminate/{transferId}

Force a sender/receiver to stop.

Example URI

POST /terminate/0
URI Parameters
HideShow
transferId
number (required) Example: 0

An unique integer identifier of transfer session with a range [0, 100000].

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": [
        "string",
        "null"
      ],
      "description": "Must be null."
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Reason of the error."
    }
  }
}

Clean

Clean Any Transmission
POST/cleanAll

Force all senders/receivers to stop.

Example URI

POST /cleanAll
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": [
        "string",
        "null"
      ],
      "description": "Must be null."
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Reason of the error."
    }
  }
}

Active Transfers

Get the List of Active Transfer
GET/activeTransfer

Get the list of all senders/receivers in the host.

Example URI

GET /activeTransfer
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "Hello, world!",
  "senders": [],
  "receivers": []
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": [
        "string",
        "null"
      ],
      "description": "Must be null."
    },
    "senders": {
      "description": "A list of sender's transfer ID."
    },
    "receivers": {
      "description": "A list of receiver's transfer ID."
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Reason of the error."
    }
  }
}

Generated by aglio on 27 May 2018