Md Command

POST /user/:user_code/request/md-command

Request Md command execution

Detail

Request

Body

Key

Type

Value

code

String

SA code

targetTime

String

Execution schedule time

  • Can specify up to one month ahead

  • Execute immediately if blank string (“”)

{moduleId}/{type}

int / String

Module ID config format

(Ex.)

<input type="text" name="0/plain">
<input type="file" name="1/binary">

Response

Body

Key

Type

Value

requestModuleMdData

Object

List of requested module IDs

id int

Module ID

binary boolean

Whether or not config is binary format

result int

Result code

Always null

resultModuleMdData

Object

List of Module results

Always null

Other than the above

Shared parameters

See “ Request information

Sample

Request

URL
POST https://*.sacm.jp/public-api/v1/user/tsa99990001/request/md-command
Header
Content-Type: multipart/form-data; boundary=----pQ1z2mxlsg6koFX5
Body
------pQ1z2mxlsg6koFX5
Content-Disposition: form-data; name="0/plain"

show system
------pQ1z2mxlsg6koFX5
Content-Disposition: form-data; name="code"

tss99990001
------pQ1z2mxlsg6koFX5
Content-Disposition: form-data; name="targetTime"

2012/06/27 14:51:25
------pQ1z2mxlsg6koFX5--

Response

Header
Content-Type: text/plain
Body
{
  "id": "1:1",
  "sa": {
    "code": "tss99990001",
    "name": "Service adapter 001",
    "description": "MEMO",
    "distributionId": "0001-0000-0101-0000-0000-0000-1234-5678",
    "up": true
  },
  "type": "md-command",
  "targetTime": "2012/06/27 14:51:25",
  "status": "initial",
  "proxyStatus": "none",
  "resultCode": "none",
  "requestModuleMdData": {
    "id": 0,
    "result": null,
    "binary": false
  },
  "resultModuleMdData": null
}

GET /user/:user_code/request/md-command/:id

Read information for requested Md command execution

Detail

Request

No Parameters

Response

Body

Key

Type

Value

requestModuleMdData

Object

List of requested module IDs

id int

Module ID

binary boolean

Whether or not config is binary format

result int

Result code

Always null

resultModuleMdData

Object

List of Module results

id int

Module ID

binary boolean

Whether or not config is binary format

result int

Result code

Succeeded

100

Failed

Other than 100

Other than the above

Shared parameters

See “ Request information

Sample

Request

URL
GET https://*.sacm.jp/public-api/v1/user/tsa99990001/request/md-command/1:1

Response

Header
Content-Type: application/json
Body
{
  "id": "1:1",
  "sa": {
    "code": "tss99990001",
    "name": "Service adapter 001",
    "description": "MEMO",
    "distributionId": "0001-0000-0101-0000-0000-0000-1234-5678",
    "up": true
  },
  "type": "md-command",
  "targetTime": "2012/06/27 14:51:25",
  "status": "successed",
  "proxyStatus": "success",
  "resultCode": "success",
  "requestModuleMdData": {
    "id": 0,
    "result": null,
    "binary": false
  },
  "resultModuleMdData": {
    "id": 0,
    "result": 100,
    "binary": false
  }
}

PUT /user/:user_code/request/md-command/:id

Update content of requested Md command execution (stop execution, update execution schedule date/time)

Detail

Request

Header
Content-Type: application/json
Body

Key

Type

Value

status

int

Request status

  • Use to stop execution

  • Can update only if status is “initial”

  • Only “3” (cancel) can be specified

targetTime

String

Execute schedule date/time

  • Use to update execution schedule date/time

  • Can update only if status is “initial”

  • Can specify up to one month ahead,

Response

Body

Key

Type

Value

requestModuleMdData

Object

List of requested module IDs

id int

Module ID

binary boolean

Whether or not config is binary format

result int

Result code

Always null

resultModuleMdData

Object

List of Module results

Always null

Other than the above

Shared parameters

See “ Request information

Sample (to stop execution)

Request

URL
PUT https://*.sacm.jp/public-api/v1/user/tsa99990001/request/md-command/1:1
Header
Content-Type: application/json
Body
{"status": 3}

Response

Header
Content-Type: application/json
Body
{
  "id": "1:1",
  "sa": {
    "code": "tss99990001",
    "name": "Service adapter 001",
    "description": "MEMO",
    "distributionId": "0001-0000-0101-0000-0000-0000-1234-5678",
    "up": true
  },
  "type": "md-command",
  "targetTime": "2012/06/27 14:51:25",
  "status": "canceled",
  "proxyStatus": "none",
  "resultCode": "none",
  "requestModuleMdData":{
    "id": 0,
    "result": null,
    "binary": false
  },
  "resultModuleMdData": null
}

Sample (to update execution schedule date/time)

Request

URL
PUT https://*.sacm.jp/public-api/v1/user/tsa99990001/request/md-command/1:1
Header
Content-Type: application/json
Body
{"targetTime": "2012/06/27 16:00:00"}

Response

Header
Content-Type: application/json
Body
{
  "id": "1:1",
  "sa": {
    "code": "tss99990001",
    "name": "Service adapter 001",
    "description": "MEMO",
    "distributionId": "0001-0000-0101-0000-0000-0000-1234-5678",
    "up": true
  },
  "type": "md-command",
  "targetTime": "2012/06/27 16:00:00",
  "status": "initial",
  "proxyStatus": "none",
  "resultCode": "none",
  "requestModuleMdData": {
    "id": 0,
    "result": null,
    "binary": false
  },
  "resultModuleMdData": null
}

Description

  • ID may be updated if the execution schedule date/time is updated

  • Simultaneous execution cancel and execution schedule date/time update not allowed

GET /user/:user_code/request/md-command/:id/request/module/:module_id/plain

Read content of requested Md command execution (text format)

Detail

Request

No Parameters

Response

Header
Content-Type: text/plain
Body

Command (text)

Sample

Request

URL
GET https://*.sacm.jp/public-api/v1/user/tsa99990001/request/md-command/1:1/request/module/0/plain

Response

Header
Content-Type: text/plain
Body
show system

GET /user/:user_code/request/md-command/:id/request/module/:module_id/binary

Read content of requested Md command execution (binary format)

Detail

Request

No Parameters

Response

Header
Content-Type: application/octet-stream
Body

Command (binary)

Sample

Request

URL
GET https://*.sacm.jp/public-api/v1/user/tsa99990001/request/md-command/1:1/request/module/0/binary

Response

Header
Content-Type: application/octet-stream
Body

Command (binary)

GET /user/:user_code/request/md-command/:id/result/module/:module_id/plain

Read results of requested Md command execution (text format)

Detail

Request

No Parameters

Response

Header
Content-Type: text/plain
Body

Operation result (text)

Sample

Request

URL
GET https://*.sacm.jp/public-api/v1/user/tsa99990001/request/md-command/1:1/result/module/0/plain

Response

Header
Content-Type: application/json
Body
SEIL/B1 IPL Monitor version 1.01
SEIL/B1 Ver. 3.91 (Ritornello)

Arch    : SEIL/B1 Rev. A
CPU     : IXP43X 400.0MHz step A-1 (XScale core)
Vendor  : OEM
Serial  : UT509-##00XXX

Host    : "sample"
Bootinfo: rebooting by software reset
Bootdev : flash

Date    : 2001/01/03 13:53:18 (JST)
Up      : 2 days 4:53  (since 2001/01/01 09:00:00)

Users   : 0 users
Loadavg : 0.00 (1min), 0.00 (5min), 0.00 (15min)
CPUstat : Used 0%, Interrupts 0%
Memory  : Total 128MB, Used 58MB (45%), Avail 69MB (54%)

GET /user/:user_code/request/md-command/:id/result/module/:module_id/binary

Read results of requested Md command execution (binary format)

Detail

Request

No Parameters

Response

Header
Content-Type: application/octet-stream
Body

Operation result (binary)

Sample

Request

URL
GET https://*.sacm.jp/public-api/v1/user/tsa99990001/request/md-command/1:1/result/module/0/binary

Response

Header
Content-Type: application/octet-stream
Body

Operation result (binary)