Template operations using CSV file

GET /user/:user_code/template/:id/pack/csv

Read template information in CSV format

Detail

Request

No Parameters

Response

Body

Text(CSV)

Sample

Request

URL
GET https://*.sacm.jp/public-api/v1/user/tsa99990001/template/1/pack/csv

Response

Header
Content-Type: text/csv
Body
[name],HOSTNAME,LAN0ADDRESS,LAN0PREFIX,LAN1ADDRESS
[default],hostname,192.168.0.1,24,172.0.0.1
 tss99990001,SEIL/B1 001,192.168.1.1,24,10.0.0.1
 tss99990002,SEIL/B1 002,192.168.2.1,24,10.0.0.2
 tss99990003,SEIL/B1 003,192.168.3.1,24,10.0.0.3

PUT /user/:user_code/template/:id/pack/csv

Update template information with content in CSV file

Detail

Request

Header
Content-Type: multipart/form-data
Body

CSV file

Response

Header
Content-Type: text/plain
Body
true

Sample

Request

URL
PUT https://*.sacm.jp/public-api/v1/user/tsa99990001/template/1/pack/csv
Header
Content-Type: multipart/form-data; boundary=----ZrY3KS4TWNvr1gNz
Body
------ZrY3KS4TWNvr1gNz
Content-Disposition: form-data; name="variable-csv-file"; filename="sample.csv"
Content-Type: text/csv

(Binary-data)
------ZrY3KS4TWNvr1gNz--

Response

Header
Content-Type: text/plain
Body
true

Template CSV format

File format

Row 1

Variable definitions

[name],connect,interface,ppp_acc,ppp_pass,lan0_addr
Column 1

[name]

  • Fixed headers

2 - n column

Variable name

  • Blank not permitted

  • Duplication not permitted

  • Limit of 50 rows

2nd row

Default Variable value

[default],pppoe,pppoe0,,,
Column 1

[default]

  • Fixed headers

2 - n column

Variable default value

  • Any value

  • Blank permitted

  • Limit of 50 rows

3 - n column

Service adaptor assignment information and service adaptor individual Variable value

tss00000001,,,name@example.jp,username,192.168.0.1/24
Column 1

SA code

  • Treated as available for assignment if described

  • Duplication not permitted

2 - n column

Variable value

  • Any value

  • Blank permitted

  • Limit of 50 columns

CSV file image

[name]

HOSTNAME

LAN0ADDRESS

LAN0PREFIX

LAN1ADDRESS

[default]

hostname

192.168.0.1

24

172.0.0.1

tss99990001

SEIL/B1 001

192.168.1.1

24

10.0.0.1

tss99990002

SEIL/B1 002

192.168.2.1

24

10.0.0.2

tss99990003

SEIL/B1 003

192.168.3.1

24

10.0.0.3