M6
기본모델
1. Project 프로젝트
2. 프로젝트 생성

REST API

Project

const axios = require('axios');
let data = JSON.stringify({
  "name": "SHOPPING",
  "adminUsername": <USERNAME>,
  "adminPassword": <PASSWORD>
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: '<M6 SERVER URL>/v3/projects',
  headers: { 
    'Content-Type': 'application/json',
    'X-M6-APIKEY': <X-M6-APIKEY>, 
    'Authorization': <ACCESSKEY>
  },
  data : data
};

async function makeRequest() {
  try {
    const response = await axios.request(config);
    console.log(JSON.stringify(response.data));
  }
  catch (error) {
    console.log(error);
  }
}

makeRequest();

Response

{
    "code": 200,
    "project": {
        "id": <ID GENERATED>,
        "apiKey": <M6-API-KEY GENERATED>,
        "adminKey": <M6-API-KEY For Admin GENERATED>,
        "name": "SHOPPING",
        "userData": null,
        "systemData": null,
        "linkSocials": false,
        "created": "2023-12-03T13:49:21.101Z",
        "updated": "2023-12-03T13:49:21.110Z"
    }
}