Back to top

DNA変換のAPIドキュメント

Resource Group

DNA変換

DNA変換
POST/dna-converter.php

DNA変換した値を返します。

Example URI

POST http://adventam10.php.xdomain.jp/dna/api/dna-converter.php
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "mode": 0,
  "text": "あいうえお"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "mode": {
      "type": "number",
      "description": "モード(0: DNAに変換、1: 文字列に変換)"
    },
    "text": {
      "type": "string",
      "description": "変換対象文字列"
    }
  },
  "required": [
    "mode",
    "text"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "resultCode": 0,
  "convertedText": "GCAGCAATCAACGCAGCAATCATAGCAGCAATCATCGCAGCAATCACAGCAGCAATCACC"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "resultCode": {
      "type": "number",
      "description": "処理結果(0: 成功、1: モードが空、2: モードが不正、3: テキストが空、4: テキストが不正)"
    },
    "convertedText": {
      "type": "string",
      "description": "変換後文字列"
    }
  },
  "required": [
    "resultCode"
  ]
}

Generated by aglio on 16 Feb 2020