Docs Menu
Docs Home
/
MongoDB Cloud Manager
/ / / /

1๋ช…์˜ ์‚ฌ์šฉ์ž์— ๋Œ€ํ•ด ํ”„๋กœ์ ํŠธ ์—ญํ•  ์—…๋ฐ์ดํŠธ

์ด ํŽ˜์ด์ง€์˜ ๋‚ด์šฉ

  • Resource
  • ์š”์ฒญ ๋งค๊ฐœ๋ณ€์ˆ˜
  • ์š”์ฒญ ๊ฒฝ๋กœ ๋งค๊ฐœ๋ณ€์ˆ˜
  • ์š”์ฒญ ์ฟผ๋ฆฌ ๋งค๊ฐœ๋ณ€์ˆ˜
  • ์š”์ฒญ ๋ณธ๋ฌธ ๋งค๊ฐœ๋ณ€์ˆ˜
  • ์‘๋‹ต
  • ์š”์ฒญ ์˜ˆ์‹œ
  • ์‘๋‹ต ์˜ˆ์‹œ
  • ์‘๋‹ต ํ—ค๋”
  • ์‘๋‹ต ๋ณธ๋ฌธ

์ง€์ •๋œ ํ”„๋กœ์ ํŠธ ์—์„œ ํ•œ ์‚ฌ์šฉ์ž์˜ ์—ญํ• ์„ ์—…๋ฐ์ดํŠธํ•ฉ๋‹ˆ๋‹ค. ์—…๋ฐ์ดํŠธ ํ•  ์‚ฌ์šฉ์ž๋ฅผ ์ง€์ •ํ•˜๋ ค๋ฉด 24 string ์ง€์ •๋œ ํ”„๋กœ์ ํŠธ ์—์„œ ์‚ฌ์šฉ์ž๋ฅผ ์‹๋ณ„ํ•˜๋Š” ๊ณ ์œ ํ•œ -16์ง„์ˆ˜ ๋ฌธ์ž์—ด์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์ด ๋ฆฌ์†Œ์Šค ๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด ์š”์ฒญํ•˜๋Š” API ํ‚ค์— ์—ญํ•  ์ด ์žˆ์–ด์•ผ Project User Admin ํ•ฉ๋‹ˆ๋‹ค.

๊ธฐ๋ณธ URL: https://cloud.mongodb.com/api/public/v1.0

PUT /groups/{PROJECT-ID}/users/{USER-ID}/roles
์ด๋ฆ„
์œ ํ˜•
์„ค๋ช…
ํ”„๋กœ์ ํŠธ ID
๋ฌธ์ž์—ด
(ํ•„์ˆ˜ ์‚ฌํ•ญ) ํ”„๋กœ์ ํŠธ ๋ฅผ ์‹๋ณ„ํ•˜๋Š” ๊ณ ์œ ํ•œ 24-16์ง„์ˆ˜ string ์ž…๋‹ˆ๋‹ค.
USER-ID
๋ฌธ์ž์—ด
(ํ•„์ˆ˜ ์‚ฌํ•ญ) ์ˆ˜์ •ํ•  ์‚ฌ์šฉ์ž๋ฅผ ์‹๋ณ„ํ•˜๋Š” ๊ณ ์œ ํ•œ 24-16์ง„์ˆ˜ string ์ž…๋‹ˆ๋‹ค.

๋‹ค์Œ ์ฟผ๋ฆฌ ๋งค๊ฐœ๋ณ€์ˆ˜๋Š” ์„ ํƒ ์‚ฌํ•ญ์ž…๋‹ˆ๋‹ค.

์ด๋ฆ„
์œ ํ˜•
ํ•„์š”์„ฑ
์„ค๋ช…
๊ธฐ๋ณธ๊ฐ’
pretty
๋ถ€์šธ
์˜ต์…˜
์‘๋‹ต ๋ณธ๋ฌธ์„ ํ”„๋ฆฌํ‹ฐํ”„๋ฆฐํŠธ ์— ํฌํ•จํ•ด์•ผ ํ•˜๋Š”์ง€ ์—ฌ๋ถ€๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” ํ”Œ๋ž˜๊ทธ์ž…๋‹ˆ๋‹ค. ํ˜•์‹.
false
envelope
๋ถ€์šธ
์˜ต์…˜

์‘๋‹ต์„ ์—”๋ฒจ๋กœํ”„์— ๋ž˜ํ•‘ํ• ์ง€ ์—ฌ๋ถ€๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” ํ”Œ๋ž˜๊ทธ์ž…๋‹ˆ๋‹ค.

์ผ๋ถ€ API ํด๋ผ์ด์–ธํŠธ๋Š” HTTP ์‘๋‹ต ํ—ค๋” ๋˜๋Š” ์ƒํƒœ ์ฝ”๋“œ์— ์•ก์„ธ์Šคํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๋ ค๋ฉด ์ฟผ๋ฆฌ์—์„œ envelope=true๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.

ํ•˜๋‚˜์˜ ๊ฒฐ๊ณผ๋ฅผ ๋ฐ˜ํ™˜ํ•˜๋Š” ์—”๋“œํฌ์ธํŠธ์˜ ๊ฒฝ์šฐ ์‘๋‹ต ๋ณธ๋ฌธ์—๋Š” ๋‹ค์Œ์ด ํฌํ•จ๋ฉ๋‹ˆ๋‹ค.

์ด๋ฆ„
์„ค๋ช…
status
HTTP ์‘๋‹ต ์ฝ”๋“œ
content
์˜ˆ์ƒ๋˜๋Š” ์‘๋‹ต ๋ณธ๋ฌธ
false
์ด๋ฆ„
์œ ํ˜•
์„ค๋ช…
groupRoles
๋ฐฐ์—ด
์‚ฌ์šฉ์ž์˜ ์—ญํ• ์„ ์„ค๋ช…ํ•˜๋Š” ๊ฐ์ฒด ๋ชฉ๋ก์ž…๋‹ˆ๋‹ค.
์ด๋ฆ„
์œ ํ˜•
์„ค๋ช…
groupRoles
๋ฐฐ์—ด
์‚ฌ์šฉ์ž์˜ ์—ญํ• ์„ ์„ค๋ช…ํ•˜๋Š” ๊ฐ์ฒด ๋ชฉ๋ก์ž…๋‹ˆ๋‹ค.
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
--header "Content-Type: application/json" \
--include \
--request PUT "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/users/{USER-ID}/roles" \
--data '
{
"groupRoles": ["GROUP_OWNER", "GROUP_USER_ADMIN", "GROUP_READ_ONLY"]
}'
HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=ISO-8859-1
Date: {dateInUnixFormat}
WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false
Content-Length: {requestLengthInBytes}
Connection: keep-alive
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}
X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}
{
"groupRoles": [
"GROUP_OWNER",
"GROUP_USER_ADMIN",
"GROUP_READ_ONLY"
]
}

๋Œ์•„๊ฐ€๊ธฐ

ํ•˜๋‚˜์˜ ํ”„๋กœ์ ํŠธ ์‚ญ์ œ