Read Storage

POST /user/:user_code/request/read-storage

Request read config

Detail

Request

Body

Key

Type

Value

sa

Object

Requested service adaptor information

code: String

SA code

targetTime

String

Execution schedule time

  • Can specify up to one month ahead

  • Execute immediately if blank string (“”)

storage

String

Config type to be read

startup

Startup config

running

Running config

backup

Backup config

Response

Status Code
201
Body

Key

Type

Value

storage

String

Config type to be read

startup

Startup config

running

Running config

backup

Backup config

moduleMdData

Array

Module information

Always null

Other than the above

Shared parameters

See “ Request information

Sample

Request

URL
POST https://*.sacm.jp/public-api/v1/user/tsa99990001/request/read-storage
Header
Content-Type: application/json
Body
{
  "sa": {
    "code": "tss99990001"
  },
  "targetTime": "2012/06/27 14:51:25",
  "storage": "running"
}

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": "read-storage",
  "targetTime": "2012/06/27 14:51:25",
  "status": "initial",
  "proxyStatus": "none",
  "resultCode": "none",
  "storage": "running",
  "moduleMdData": null
}

GET /user/:user_code/request/read-storage/:id

Read information for requested read config

Detail

Request

No Parameters

Response

Body

Key

Type

Value

storage

String

Config type to be read

startup

Startup config

running

Running config

backup

Backup config

moduleMdData

Array

Module information

id int

Module ID

result int

Result code

isBinary boolean

Whether or not config is binary format

Other than the above

Shared parameters

See “ Request information

Sample

Request

URL
GET https://*.sacm.jp/public-api/v1/user/tsa99990001/request/read-storage/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": "read-storage",
  "targetTime": "2012/06/27 14:51:25",
  "status": "successed",
  "proxyStatus": "success",
  "resultCode": "success",
  "storage": "running",
  "moduleMdData": [
    {
      "id": 0,
      "result": 0,
      "binary": false
    },
    {
      "id": 1,
      "result": 0,
      "binary": false
    }
  ]
}

PUT /user/:user_code/request/read-storage/:id

Update information for read config (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

storage

String

Config type to be read

startup

Startup config

running

Running config

backup

Backup config

moduleMdData

Array

Module information

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/read-storage/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": "read-storage",
  "targetTime": "2012/06/27 14:51:25",
  "status": "canceled",
  "proxyStatus": "none",
  "resultCode": "none",
  "storage": "startup",
  "moduleMdData": null
}

Sample (to update execution date/time)

Request

URL
PUT https://*.sacm.jp/public-api/v1/user/tsa99990001/request/read-storage/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": "read-storage",
  "targetTime": "2012/06/27 16:00:00",
  "status": "initial",
  "proxyStatus": "none",
  "resultCode": "none",
  "storage": "startup",
  "moduleMdData": 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/read-storage/:id/result/module/:module_id/plain

Read execution results of requested read config (text format)

Detail

Request

No Parameters

Response

Header
Content-Type: text/plain
Body

Config (text)

Sample

Request

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

Response

Header
Content-Type: text/plain
Body
hostname "SEIL/B1 001"
interface lan0 add 192.168.0.1/24
interface lan1 add dhcp
route add default dhcp
telnetd enable

GET /user/:user_code/request/read-storage/:id/result/module/:module_id/binary

Read execution results of requested read config (binary format)

Detail

Request

No Parameters

Response

Header
Content-Type: application/octet-stream
Body

Config (binary)

Sample

Request

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

Response

Header
Content-Type: application/octet-stream
Body

Config (binary)