Template

GET /user/:user_code/template

Read Template information

Detail

Request

No Parameters

Response

Body

Key

Type

Value

results

Array

Template list

id int

Template ID. null in case of default (unassigned)

name String

Name of the Template

moduleId Array

List of Module IDs for registered Template configs

member int

Number of assigned service adaptors

lastModified String

Date and time of last modification

Sample

Request

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

Response

Body
{
  "results":[
    {
      "id": null,
      "name": null,
      "member": 0,
      "moduleId": [],
      "lastModified": null
    },
    {
      "id": 1,
      "name": "Template1",
      "member": 0,
      "moduleId": [
        0,
        1
      ],
      "lastModified": "2012/06/25 13:06:40"
    }
  ]
}

POST /user/:user_code/template

Add template

Detail

Request

Header
Content-Type: application/json
Body

Key

Type

Value

name

String

Template name (1-40 characters) (required)

Response

Status Code
201
Body

Key

Type

Value

id

int

Template ID. null in case of default (unassigned)

name

String

Name of the Template

moduleId

Array

List of Module IDs for registered Template configs

sa

Array

Assigned service adaptor list

lastModified

String

Date and time of last modification

Sample

Request

URL
POST https://*.sacm.jp/public-api/v1/user/tsa99990001/template
Header
Content-Type: application/json
Body
{
  "name": "Template1"
}

Response

Header
Content-Type: application/json
Body
{
  "id": 1,
  "name": "Template1",
  "moduleId": [],
  "sa": [],
  "lastModified": "2012/06/25 13:06:40"
}

Description

  • Up to 20 Templates can be added

GET /user/:user_code/template/:id

Read Template details

Detail

Request

No Parameters

Response

Body

Key

Type

Value

id

int

Template ID. null in case of default (unassigned)

name

String

Name of the Template

moduleId

Array

List of Module IDs for registered Template configs

sa

Array

Assigned service adaptor list

lastModified

String

Date and time of last modification

Sample

Request

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

Response

Header
Content-Type: application/json
Body
{
  "id": 1,
  "name": "Template1",
  "moduleId": [
    0,
    1
  ],
  "sa": [
    {
      "code": "tss99990001",
      "name": "SEIL/B1 001",
      "description": "MEMO",
      "distributionId": "0001-0000-0101-0000-0000-0000-1234-5678",
      "up": true,
      "configState": "pushready",
      "group": {
        "id": 1,
        "name": "Folder1"
      },
      "template": {
        "id": 1,
        "name": "Template1"
      },
      "monitor": {
        "id": 1,
        "name": "Monitor1"
      },
      "date": {
        "lastPushReady": "2012/06/05 16:00:09",
        "lastHeartbeatReport": "2012/05/11 17:10:02",
        "lastPulled": "2012/05/11 17:06:22",
        "firstPulled": "2012/04/11 17:07:00"
      },
      "type": 0,
      "mode": null
    }
  ],
  "lastModified":"2012/06/25 13:28:50"
}

PUT /user/:user_code/template/:id

Update Template details

Detail

Request

Header
Content-Type: application/json
Body

Key

Type

Value

name

String

Template name (1-40 characters) (required)

sa

Array

List of assigned service adaptors (option)

code: String

SA code

Response

Body

Key

Type

Value

id

int

Template ID. null in case of default (unassigned)

name

String

Name of the Template

moduleId

Array

List of Module IDs for registered Template configs

sa

Array

Assigned service adaptor list

lastModified

String

Date and time of last modification

Sample

Request

URL
PUT https://*.sacm.jp/public-api/v1/user/tsa99990001/template/1
Header
Content-Type: application/json
Body
{
  "name": "Template2",
  "sa": [
    {
      "code": "tss99990001"
    },
    {
      "code": "tss99990002"
    }
  ]
}

Response

Header
Content-Type: application/json
Body
{
  "id": 1,
  "name": "Template2",
  "moduleId": [
    0,
    1
  ],
  "sa": [
    {
      "code": "tss99990001",
      "name": "SEIL/B1 001",
      "description": "MEMO",
      "distributionId": "0001-0000-0101-0000-0000-0000-1234-5678",
      "up": true,
      "configState": "pushready",
      "group": {
        "id": 1,
        "name": "Folder1"
      },
      "template": {
        "id": 1,
        "name": "Template2"
      },
      "monitor": {
        "id": 1,
        "name": "Monitor1"
      },
      "date": {
        "lastPushReady": "2012/06/05 16:00:09",
        "lastHeartbeatReport": "2012/05/11 17:10:02",
        "lastPulled": "2012/05/11 17:06:22",
        "firstPulled": "2012/04/11 17:07:00"
      },
      "type": 0,
      "mode": null
    },
    {
      "code": "tss99990002",
      "name": "SEIL/B1 002",
      "description": "MEMO",
      "distributionId": "0001-0000-0101-0000-0000-0000-5678-1234",
      "up": true,
      "configState": "pushready",
      "group": {
        "id": 1,
        "name": "Folder1"
      },
      "template": {
        "id": 1,
        "name": "Template2"
      },
      "monitor": {
        "id": 1,
        "name": "Monitor1"
      },
      "date": {
        "lastPushReady": "2012/06/05 16:00:09",
        "lastHeartbeatReport": "2012/05/11 17:10:02",
        "lastPulled": "2012/05/11 17:06:22",
        "firstPulled": "2012/04/11 17:07:00"
      },
      "type": 0,
      "mode": null
    }
  ],
  "lastModified":"2012/06/25 13:28:50"
}

DELETE /user/:user_code/template/:id

Delete Template

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

Response

Header
Content-Type: text/plain
Body

No Body

Reference according to Template structure type