{"id":35086,"date":"2025-09-12T11:08:08","date_gmt":"2025-09-12T04:08:08","guid":{"rendered":"http:\/\/jupitek.maudemo.vip\/index.php\/2025\/09\/12\/get-started\/"},"modified":"2025-09-12T11:08:08","modified_gmt":"2025-09-12T04:08:08","slug":"get-started","status":"publish","type":"post","link":"https:\/\/jupitek.maudemo.vip\/index.php\/2025\/09\/12\/get-started\/","title":{"rendered":"Get started"},"content":{"rendered":"<p><!DOCTYPE html><br \/>\n<html lang=\"vi\"><br \/>\n<head><br \/>\n<meta charset=\"utf-8\" \/><br \/>\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" \/><\/p>\n<style>\n  :root {\n    --bg:#ffffff; --fg:#0f172a; --muted:#475569; --line:#e5e7eb;\n    --accent:#0ea5e9; --note:#eef6ff; --tip:#ecfdf5; --warn:#fff7ed;\n  }\n  html,body{margin:0;padding:0;background:var(--bg);color:var(--fg);font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;line-height:1.6}\n  header{padding:24px 20px;border-bottom:1px solid var(--line);background:#fafafa}\n  header h1{margin:0;font-size:28px}\n  main{padding:32px;max-width:960px;margin:0 auto}\n  h2{margin-top:32px;font-size:22px}\n  h3{margin-top:24px;font-size:18px}\n  .callout{border:1px solid var(--line);border-left:4px solid var(--accent);padding:12px 16px;border-radius:8px;margin:16px 0;background:#f9fafb}\n  .note{border-left-color:#3b82f6;background:var(--note)}\n  .tip{border-left-color:#22c55e;background:var(--tip)}\n  .warn{border-left-color:#f59e0b;background:var(--warn)}\n  code,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}\n  pre{background:#ffffff;color:#000000;border:1px solid var(--line);border-radius:8px;padding:16px;overflow:auto}\n  table{border-collapse:collapse;width:100%;margin:16px 0}\n  th,td{border:1px solid var(--line);padding:8px;text-align:left;vertical-align:top}\n  .small{font-size:13px;color:var(--muted)}\n  a{color:#0369a1;text-decoration:none}\n  a:hover{text-decoration:underline}\n  .source{margin-top:20px;font-size:14px;color:var(--muted)}\n<\/style>\n<p><\/head><br \/>\n<body><br \/>\n<main><\/p>\n<h2>B\u1eaft \u0111\u1ea7u<\/h2>\n<h3>X\u00e1c th\u1ef1c<\/h3>\n<p>M\u1ed9t s\u1ed1 thao t\u00e1c c\u1ee7a API n\u00e0y c\u00f3 th\u1ec3 truy c\u1eadp c\u00f4ng khai v\u00e0 kh\u00f4ng y\u00eau c\u1ea7u x\u00e1c th\u1ef1c. Tuy nhi\u00ean, t\u1ea5t c\u1ea3 c\u00e1c thao t\u00e1c \u1ea3nh h\u01b0\u1edfng \u0111\u1ebfn t\u00e0i kho\u1ea3n c\u1ee7a b\u1ea1n \u0111\u1ec1u y\u00eau c\u1ea7u personal access token (PAT) ho\u1eb7c OAuth authentication khi s\u1eed d\u1ee5ng \u1ee9ng d\u1ee5ng b\u00ean th\u1ee9 ba.<\/p>\n<h2>Personal Access Tokens<\/h2>\n<p>C\u00e1ch d\u1ec5 nh\u1ea5t \u0111\u1ec3 truy c\u1eadp API l\u00e0 s\u1eed d\u1ee5ng personal access token (PAT) \u0111\u01b0\u1ee3c t\u1ea1o t\u1eeb c\u1ed5ng Cloud Manager c\u1ee7a Akamai. Token n\u00e0y ch\u1ec9 n\u00ean c\u00f3 quy\u1ec1n truy c\u1eadp c\u1ea7n thi\u1ebft cho \u1ee9ng d\u1ee5ng.<\/p>\n<h3>C\u00e1ch t\u1ea1o PAT<\/h3>\n<ol>\n<li>\u0110\u0103ng nh\u1eadp Cloud Manager.<\/li>\n<li>Nh\u1ea5n v\u00e0o t\u00ean h\u1ed3 s\u01a1 c\u1ee7a b\u1ea1n \u1edf g\u00f3c tr\u00ean b\u00ean ph\u1ea3i v\u00e0 ch\u1ecdn API Tokens.<\/li>\n<li>Nh\u1ea5p <em>Create a Personal Access Token. B\u1ea3ng t\u1ea1o PAT xu\u1ea5t hi\u1ec7n.<\/em>.<\/li>\n<li>\u0110i\u1ec1n Label, Expiry, Access.<\/li>\n<li>Nh\u1ea5p <em>Create Token<\/em>. Token ch\u1ec9 hi\u1ec3n th\u1ecb m\u1ed9t l\u1ea7n.<\/li>\n<\/ol>\n<div class=\"callout note\">\ud83d\udcd8 L\u01b0u token \u1edf n\u01a1i an to\u00e0n, kh\u00f4ng th\u1ec3 xem l\u1ea1i sau khi \u0111\u00f3ng.<\/div>\n<h3>PAT authentication<\/h3>\n<table>\n<tr>\n<td>Security Scheme Type<\/td>\n<td>HTTP<\/td>\n<\/tr>\n<tr>\n<td>Authorization Scheme<\/td>\n<td><code>Bearer<\/code><\/td>\n<\/tr>\n<\/table>\n<p class=\"small\">Scopes OAuth c\u0169ng \u00e1p d\u1ee5ng cho PAT.<\/p>\n<h3>Thu h\u1ed3i PAT<\/h3>\n<p>\u0110\u0103ng nh\u1eadp Cloud Manager &rarr; My Profile &rarr; API Tokens, ch\u1ecdn token &rarr; Revoke.<\/p>\n<h2>OAuth<\/h2>\n<p>N\u1ebfu \u1ee9ng d\u1ee5ng c\u1ea7n cho ng\u01b0\u1eddi d\u00f9ng b\u1ea5t k\u1ef3 \u0111\u0103ng nh\u1eadp, h\u00e3y d\u00f9ng OAuth 2.0.<\/p>\n<div class=\"callout tip\">\ud83d\udc4d N\u1ebfu ch\u1ec9 d\u00f9ng c\u00e1 nh\u00e2n, h\u00e3y d\u00f9ng PAT.<\/div>\n<h3>Tr\u01b0\u1edbc khi b\u1eaft \u0111\u1ea7u<\/h3>\n<ul>\n<li>T\u1ea1o OAuth client \u0111\u1ec3 l\u1ea5y <code>client_id<\/code>, <code>client_secret<\/code>.<\/li>\n<li>Private client d\u00f9ng cho app b\u1ea3o m\u1eadt, Public client d\u00f9ng cho app kh\u00f4ng th\u1ec3 gi\u1eef b\u00ed m\u1eadt.<\/li>\n<li><code>redirect_uri<\/code> l\u00e0 Callback URL.<\/li>\n<\/ul>\n<h3>Lu\u1ed3ng Private (Authorization Code)<\/h3>\n<ol>\n<li>User \u0111\u0103ng nh\u1eadp qua login.linode.com.<\/li>\n<li>Server tr\u1ea3 v\u1ec1 code qua redirect.<\/li>\n<li>App POST t\u1edbi <code>\/oauth\/token<\/code> v\u1edbi code, client_id, secret.<\/li>\n<li>Nh\u1eadn access_token (2h) v\u00e0 refresh_token.<\/li>\n<li>D\u00f9ng access_token cho API call.<\/li>\n<li>Khi h\u1ebft h\u1ea1n, d\u00f9ng refresh_token \u0111\u1ec3 l\u1ea5y token m\u1edbi.<\/li>\n<\/ol>\n<h3>Lu\u1ed3ng Public (Implicit)<\/h3>\n<p>User \u0111\u0103ng nh\u1eadp v\u00e0 nh\u1eadn <code>access_token<\/code> qua URL hash (2h). Kh\u00f4ng c\u00f3 refresh_token, c\u1ea7n login l\u1ea1i sau khi h\u1ebft h\u1ea1n.<\/p>\n<h2>OAuth reference<\/h2>\n<p>Authorization URL: <code>https:\/\/login.linode.com\/oauth\/authorize<\/code><br \/>\n     Token URL: <code>https:\/\/login.linode.com\/oauth\/token<\/code><\/p>\n<h3>Scopes<\/h3>\n<table>\n<thead>\n<tr>\n<th>Scope<\/th>\n<th>M\u00f4 t\u1ea3<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>account:read_only<\/code><\/td>\n<td>Xem th\u00f4ng tin t\u00e0i kho\u1ea3n<\/td>\n<\/tr>\n<tr>\n<td><code>account:read_write<\/code><\/td>\n<td>Qu\u1ea3n l\u00fd t\u00e0i kho\u1ea3n<\/td>\n<\/tr>\n<tr>\n<td><code>linodes:read_only<\/code><\/td>\n<td>Xem Linodes<\/td>\n<\/tr>\n<tr>\n<td><code>linodes:read_write<\/code><\/td>\n<td>Qu\u1ea3n l\u00fd Linodes<\/td>\n<\/tr>\n<tr>\n<td><code>domains:read_only<\/code><\/td>\n<td>Xem t\u00ean mi\u1ec1n<\/td>\n<\/tr>\n<tr>\n<td><code>domains:read_write<\/code><\/td>\n<td>Qu\u1ea3n l\u00fd t\u00ean mi\u1ec1n<\/td>\n<\/tr>\n<tr>\n<td><code>images:read_only<\/code><\/td>\n<td>Xem images<\/td>\n<\/tr>\n<tr>\n<td><code>images:read_write<\/code><\/td>\n<td>Qu\u1ea3n l\u00fd images<\/td>\n<\/tr>\n<tr>\n<td><code>firewall:read_only<\/code><\/td>\n<td>Xem firewalls<\/td>\n<\/tr>\n<tr>\n<td><code>firewall:read_write<\/code><\/td>\n<td>Qu\u1ea3n l\u00fd firewalls<\/td>\n<\/tr>\n<tr>\n<td><code>object_storage:read_only<\/code><\/td>\n<td>Xem Object Storage<\/td>\n<\/tr>\n<tr>\n<td><code>object_storage:read_write<\/code><\/td>\n<td>Qu\u1ea3n l\u00fd Object Storage<\/td>\n<\/tr>\n<tr>\n<td><code>vpc:read_write<\/code><\/td>\n<td>Qu\u1ea3n l\u00fd VPC v\u00e0 subnet<\/td>\n<\/tr>\n<p>      <!-- C\u00f3 th\u1ec3 th\u00eam \u0111\u1ea7y \u0111\u1ee7 scopes kh\u00e1c t\u01b0\u01a1ng t\u1ef1 --><br \/>\n    <\/tbody>\n<\/table>\n<h2>X\u00e1c th\u1ef1c Monitor API<\/h2>\n<ol>\n<li>G\u1ecdi List supported services &rarr; l\u1ea5y service_type.<\/li>\n<li>G\u1ecdi List cho service &rarr; l\u1ea5y id.<\/li>\n<li>G\u1ecdi Create a token v\u1edbi service_type v\u00e0 entity_id &rarr; l\u01b0u token.<\/li>\n<li>G\u1ecdi Get metrics v\u1edbi Bearer token.<\/li>\n<\/ol>\n<pre><code>curl --request POST \\\n     --url https:\/\/monitor-api.linode.com\/v1\/monitor\/services\/dbaas\/metrics \\\n     --header 'accept: application\/json' \\\n     --header 'authorization: Bearer abc123' \\\n     --header 'content-type: application\/json' \\\n     --data '{\"aggregate_function\":\"min\"}'\n<\/code><\/pre>\n<div class=\"source\">\n    Tr\u00edch d\u1eabn b\u00e0i vi\u1ebft g\u1ed1c:<br \/>\n    <a href=\"https:\/\/techdocs.akamai.com\/linode-api\/reference\/get-started#oauth-reference\" target=\"_blank\" rel=\"noopener\"><br \/>\n      Get started \u2013 Akamai TechDocs<br \/>\n    <\/a>\n  <\/div>\n<p><\/main><br \/>\n<\/body><br \/>\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Get started<\/p>\n","protected":false},"author":1,"featured_media":36540,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[98],"tags":[],"class_list":["post-35086","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-api-api"],"_links":{"self":[{"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/posts\/35086","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/comments?post=35086"}],"version-history":[{"count":0,"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/posts\/35086\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/media\/36540"}],"wp:attachment":[{"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/media?parent=35086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/categories?post=35086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/tags?post=35086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}