Template variable (Template start point)

GET /user/:user_code/template/:id/variable

Read Template Variable information

Detail

Request

No Parameters

Response

Body

Key

Type

Value

results

Array

List of variables

name String

Variable name

defaultValue String

Variable default value

Sample

Request

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

Response

Body
{
  "results": [
    {
      "name": "HOSTNAME",
      "defaultValue": ""
    },
    {
      "name": "LAN0PREFIX",
      "defaultValue": "24"
    },
    {
      "name": "LAN0ADDRESS",
      "defaultValue": "192.168.0.1"
    }
  ]
}

POST /user/:user_code/template/:id/variable

Add Template Variable

Detail

Request

Header
Content-Type: application/json
Body

Key

Type

Value

name

String

Variable name (1 - 40 characters) (required)

defaultValue

String

Variable default value (1 - 500 characters) (option)

Response

Status Code
201
Body

Key

Type

Value

name

String

Variable name

defaultValue

String

Variable default value

values

Array

List of variable values

Sample

  • Up to 50 variables can be added

Request

URL
POST https://*.sacm.jp/public-api/v1/user/tsa99990001/template/1/variable
Header
Content-Type: application/json
Body
{
  "name": "LAN1ADDRESS",
  "defaultValue": "10.0.0.1"
}

Response

Header
Content-Type: application/json
Body
{
  "name": "LAN1ADDRESS",
  "defaultValue": "10.0.0.1",
  "values": [
  ]
}

GET /user/:user_code/template/:id/variable/:name

Read details for specified Variable name

Detail

Request

No Parameters

Response

Body

Key

Type

Value

name

String

Variable name

defaultValue

String

Variable default value

values

Array

List of variable values

code String

SA code

value String

Variable value

Sample

Request

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

Response

Header
Content-Type: application/json
Body
{
  "name": "LAN1ADDRESS",
  "defaultValue": "172.0.0.1",
  "values": [
    {
      "code": "tss99990001",
      "value": "10.0.0.1"
    },
    {
      "code": "tss99990002",
      "value": "10.0.0.2"
    }
  ]
}

PUT /user/:user_code/template/:id/variable/:name

Update details for specified Variable name

Detail

Request

Header
Content-Type: application/json
Body

Key

Type

Value

defaultValue

String

Variable default value (1 - 500 characters) (option)

values

Array

List of Variable values (option)

code String

SA code

value String

Variable value

Response

Body

Key

Type

Value

name

String

Variable name

defaultValue

String

Variable default value

values

Array

List of variable values

code String

SA code

value String

Variable value

Sample

Request

URL
PUT https://*.sacm.jp/public-api/v1/user/tsa99990001/template/1/variable/LAN1ADDRESS
Header
Content-Type: application/json
Body
{
  "defaultValue": "172.0.1.1",
  "values": [
    {
      "code": "tss99990001",
      "value": "10.0.0.1"
    },
    {
      "code": "tss99990002",
      "value": "10.0.0.3"
    }
  ]
}

Response

Header
Content-Type: application/json
Body
{
  "name": "LAN1ADDRESS",
  "defaultValue": "172.0.1.1",
  "values": [
    {
      "code": "tss99990001",
      "value": "10.0.0.1"
    },
    {
      "code": "tss99990002",
      "value": "10.0.0.3"
    }
  ]
}

DELETE /user/:user_code/template/:id/variable/:name

Delete specified template variable

Detail

Request

No Parameters

Response

Status Code
204
Header
Content-Type: text/plain
Body

No Body

Sample

Request

URL
DELETE https://*.sacm.jp/public-api/v1/user/tsa99990001/template/1/variable/LAN1ADDRESS

Response

Header
Content-Type: text/plain
Body

No Body