Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


MagicInfo Server에서는 콘텐츠 관리, 스케줄 관리, 장치 관리 등 각 기능을 REST API 호출을 통하여 구현할 수 있습니다. 

REST API를 사용하기 위해서는 먼저 인증 절차를 거쳐야 하며, 별도의 swagger 페이지를 통해 각 API를 테스트 하실 수 있습니다.

Authentication

모든 rest api REST API 호출 시 헤더에 api_token을 포함하여야 합니다. 하며, 그렇지 않은 경우 '401 Unauthorized.' 에러를 받게 됩니다. 

발급 받은 토큰은 정해진 일정 시간이 지나면 만료되어 사용이 중지되며, 그 경우 토큰을 새로 발급 받아야 합니다.

api_token은 아래 api 호출을 통해 얻을 수 있습니다.

...

매직인포 서버 REST API는 여러가지 기능을 제공하며 기능별 rest api는 구성은 아래와 같습니다. 각 api의 상세 정보는 아래 swagger api list에 자세히 설명되어 있습니다. 

Category

...

CategoryControllerDescription
Autheticationauthentication-controller인증 관련
Contentcontent-controller콘텐츠 관리
content-group-controller콘텐츠 그룹 관리
Playlistplaylist-controller플레이리스트 관리
playlist-group-controller플레이리스트 그룹 관리
Schedulecontent-schedule-controller콘텐츠 스케줄 관리
content-schedule-group-controller콘텐츠 스케줄 그룹 관리
message-schedule-controller메시지 스케줄 관리
message-schedule-group-controller메시지 스케줄 그룹 관리
Devicedevice-controller장치 관리
device-group-controller장치 그룹 관리
Useruser-controller사용자 관리
user-group-controller사용자 그룹 관리
Etcenvironment-controller환경 설정
  • controllter 별 API


...

Authentication

각 REST API를 호출하기 전, 인증을 위한 토큰을 발급 받아야 합니다. 각 토큰을 관리하는 서비스는 아래와 같습니다.

Service Name

API call

Call TypeDescription
authentication-controllerauthenticationRequest

POST /auth

POST 사용자 ID 및 비밀번호를 이용하여 인증을 위한 토큰 값을 가져옵니다.
authenticationRequest

GET /auth/refresh

GET 토큰을 새로 생성하여 만료시간을 연장합니다. content-controller재 로그인 없이 계속해서 REST API를 호출할 수 있습니다.


Content

업로드, 승인, 삭제, 리스트 관리 등 콘텐츠를 관리할 수 있습니다. 콘텐츠를 관리하는 서비스는 아래와 같습니다.

GET 
Service Name

API call

Call TypeDescription
listAllContent

GET /restapi/v1.0/cms/contents

GET모든 콘텐츠 목록을 가져옵니다.
listDashboardContentInfo

GET /restapi/v1.0/cms/contents/dashboard

GET대쉬보드에서 필요한 콘텐츠 관련 정보를 가져옵니다.
listContent

POST /restapi/v1.0/cms/contents/filter

POST여러 조건으로 필터링된 콘텐츠 리스트를 가져옵니다.
forceDeleteContent

DELETE /restapi/v1.0/cms/contents/force/{contentId}

DELETE콘텐츠의 사용여부에 상관없이 콘텐츠를 삭제합니다.
deleteContent

DELETE /restapi/v1.0/cms/contents/{contentId}

DELETE삭제 가능한 콘텐츠인지 확인 후 콘텐츠를 삭제합니다.
getActiveContentInfo

GET /restapi/v1.0/cms/contents/{contentId}

GET활성화된 버전의 콘텐츠 상세 정보를 가져옵니다.
approveContents

PUT /restapi/v1.0/cms/contents/{contentId}/approval

PUT미승인 상태의 콘텐츠를 승인/반려합니다.
uploadContent

POST /restapi/v1.0/cms/contents/{groupId}

POST새 콘텐츠를 업로드합니다.
content-group-controller

listDefaultGroup

GET /restapi/v1.0/cms/contents/groups

GET콘텐츠 기본 그룹 목록을 가져옵니다.
getGroup

GET /restapi/v1.0/cms/contents/groups/{groupId}

GET{groupId} 그룹의 상세 정보를 가져옵니다.
listChildGroup

GET /restapi/v1.0/cms/contents/groups/{groupId}/child

GET{groupId} 그룹의 하위 그룹 목록을 가져옵니다.playlist-controllerlistAllPlaylist


Playlist

콘텐츠를 이용하여 플레이리스트를 만들고, 수정 및 삭제 등 관리 할 수 있습니다. 플레이리스트를 관리하는 서비스는 아래와 같습니다.

GET 
Service Name

API call

Call TypeDescription
listAllPlaylist

GET /restapi/v1.0/cms/playlists

GET모든 플레이리스트 목록을 가져옵니다.
createPlaylist

POST POST /restapi/v1.0/cms/playlists

POST새 플레이리스트를 생성합니다.

getDashboardPlaylistInfo

GET GET /restapi/v1.0/cms/playlists/dashboard

GET대쉬보드에 필요한 플레이리스트 정보를 가져옵니다.

listPlaylist

POST POST /restapi/v1.0/cms/playlists/filter

POST여러 조건으로 필터링된 플레이리스트 목록을 가져옵니다.

deletePlaylist

DELETE DELETE /restapi/v1.0/cms/playlists/{playlistId}

DELETE선택된 플레이리스트를 삭제합니다.

getActivePlaylistInfo

GET GET /restapi/v1.0/cms/playlists/{playlistId}

GET활성화된 버전으로 플레이리스트의 상세 정보를 가져옵니다.

editPlaylist

PUT PUT /restapi/v1.0/cms/playlists/{playlistId}

PUT플레이리스트를 수정합니다.

copyPlaylist

PUT PUT /restapi/v1.0/cms/playlists/{playlistId}/copy

PUT플레이리스트를 복사합니다.
playlist-group-controllerlistDefaultGroup

GET GET /restapi/v1.0/cms/playlists/groups

GET플레이리스트 기본 그룹 목록을 가져옵니다.

getGroup

GET GET /restapi/v1.0/cms/playlists/groups/{groupId}

GET{groupId} 그룹의 상세 정보를 가져옵니다.
listChildGroupGET GET /restapi/v1.0/cms/playlists/groups/{groupId}/childGET

{groupId} 그룹의 하위 그룹 목록을 가져옵니다.

content-schedule-controllerlistContentScheduleAll

Schedule

새 콘텐츠/메시지 스케줄을 만들고, 장치에 배포하여 재생 할 수 있습니다. 또한 스케줄을 수정하거나 삭제 하는 등 관리 할 수 있습니다.

스케줄을 관리하는 서비스는 아래와 같습니다.

GET 
Service Name

API call

Call TypeDescription
listContentScheduleAll

GET /restapi/v1.0/dms/schedule/contents

GET모든 콘텐츠 스케줄 목록을 가져옵니다.
createContentSchedule

POST POST /restapi/v1.0/dms/schedule/contents

POST새 콘텐츠 스케줄을 생성합니다.
listDashboardScheduleInfo

GET GET /restapi/v1.0/dms/schedule/contents/dashboard

GET대쉬보드에서 필요한 콘텐츠 스케줄 정보를 가져옵니다.
listContentScheduleByGroup

POST POST /restapi/v1.0/dms/schedule/contents/filter

POST여러 조건으로 필터링된 콘텐츠 스케줄 목록을 가져옵니다.
deleteContentSchedule

DELETE DELETE /restapi/v1.0/dms/schedule/contents/{programId}

DELETE콘텐츠 스케줄을 삭제합니다.
getProgramInfo

GET GET /restapi/v1.0/dms/schedule/contents/{programId}

GET선택된 스케줄의 상세 정보를 가져옵니다.
editContentSchedule

PUT PUT /restapi/v1.0/dms/schedule/contents/{programId}

PUT콘텐츠 스케줄을 수정합니다.
copyContentSchedule

PUT PUT /restapi/v1.0/dms/schedule/contents/{programId}/copy

PUT콘텐츠 스케줄을 복사합니다.
deployContentSchedule

PUT PUT /restapi/v1.0/dms/schedule/contents/{programId}/deploy

PUT콘텐츠 스케줄을 원하는 장치 그룹에 배포합니다.
getPublishStatus

GET GET /restapi/v1.0/dms/schedule/contents/{programId}/publishStatus

GET장치에서 콘텐츠 스케줄을 다운로드 받는 상태를 실시간으로 가져옵니다.
content-schedule-group-controllergetRootGroups

GET GET /restapi/v1.0/dms/schedule/contents/groups

GET콘텐츠 스케줄의 루트 그룹 리스트를 가져옵니다.
listContentScheduleGroupInfoGET GET /restapi/v1.0/dms/schedule/contents/groups/{groupId}GET{groupId} 그룹에 대한 상세 정보를 가져옵니다.
message-schedule-controllerlistAllMessageSchedule

GET GET /restapi/v1.0/dms/schedule/messages

GET모든 메시지 스케줄 목록을 가져옵니다.
createMessageSchedule

POST POST /restapi/v1.0/dms/schedule/messages

POST새 메시지 스케줄을 생성합니다.
message-schedule-group-controllergetRootGroups

GET GET /restapi/v1.0/dms/schedule/messages/groups

GET콘텐츠 스케줄의 루트 그룹 리스트를 가져옵니다.
listMessageScheduleGroupInfo

GET GET /restapi/v1.0/dms/schedule/messages/groups/{groupId}

GET{groupId} 그룹에 대한 상세 정보를 가져옵니다.device-controllerlistAllDevice

Device

각 장치를 제어하고 관리 할 수있습니다. 장치를 관리하는 서비스는 아래와 같습니다.

POST 
Service Name

API call

Call TypeDescription
listAllDevice

GET /restapi/v1.0/rms/devices

GET모든 장치 목록을 가져옵니다.
getDashboardDeviceInfo

GET GET /restapi/v1.0/rms/devices/dashboard

GET대쉬보드에서 필요한 장치 정보를 가져옵니다.
device-group-controllerlistDeviceGroupOrgan

GET GET /restapi/v1.0/rms/devices/groups

GET소속의 리스트를 가져옵니다.
listDeviceGroupInfo

GET GET /restapi/v1.0/rms/devices/groups/{groupId}

GET{groupId} 그룹에 대한 상세 정보를 가져옵니다.user-controllercreateUser

User

새 사용자를 추가하고, 사용자의 정보를 관리할 수 있습니다. 사용자를 관리하는 서비스는 아래와 같습니다.

Service Name

API call

Call TypeDescription
createUser

POST /restapi/v1.0/ums/users

POST새 사용자를 추가합니다.
listDashboardUserInfo

GET GET /restapi/v1.0/ums/users/dashboard

GET대쉬보드에 필요한 사용자의 정보를 가져옵니다.
user-group-controllerlistUserGroupOrgan

GET GET /restapi/v1.0/ums/users/groups

GET소속 목록을 가져옵니다.
listUserGroupInfo

GET GET /restapi/v1.0/ums/users/groups/{groupId}

GET{groupId} 그룹에 대한 상세 정보를 가져옵니다.
environment-controllergetCategoryInfo

GET GET /restapi/v1.0/ems/category/{categoryId}

GET카테고리 목록을 가져옵니다.
deleteDashboard

DELETE DELETE /restapi/v1.0/ems/dashboard

DELETE특정 대쉬보드 정보를 삭제합니다.

Etc

주요 기능 이외에도 태그, 카테고리를 생성, 관리하고 대시보드를 수정하는 등 다양한 기능을 구현할 수 있습니다.

Service Name

API call

Call TypeDescription
getCategoryInfo

GET /restapi/v1.0/ems/category/{categoryId}

GET카테고리 목록을 가져옵니다.
deleteDashboard

DELETE /restapi/v1.0/ems/dashboard

DELETE특정 대쉬보드 정보를 삭제합니


REST API Details

Open API Documentation
operationsSortermethod
supportedSubmitMethodsnone
urlhttp://184.169.167.38:7001/MagicInfo/v2/api-docs/

...