Applications API
Applications
ดู applications ทั้งหมด
GET /applications?limit=20
Authorization: Bearer <token>Permission ที่ต้องการ: console.apps.read
ดู application
GET /applications/:slug
Authorization: Bearer <token>สร้าง application
POST /applications
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "string",
"slug": "string",
"description": "string"
}Permission ที่ต้องการ: console.apps.write
แก้ไข application
PATCH /applications/:slug
Authorization: Bearer <token>
Content-Type: application/json
{ "name": "string", "description": "string" }ลบ application
DELETE /applications/:slug
Authorization: Bearer <token>OAuth Client
เชื่อม OAuth client
POST /applications/:slug/oauth-client
Authorization: Bearer <token>
Content-Type: application/json
{
"grantTypes": ["client_credentials"],
"redirectUris": ["https://your-app.com/callback"],
"scopes": ["openid", "profile"]
}Response (client secret แสดงครั้งเดียว):
{
"clientId": "client_xxxx",
"clientSecret": "secret_xxxx"
}ดูข้อมูล OAuth client
GET /applications/:slug/oauth-client
Authorization: Bearer <token>API Keys
ดู API keys ทั้งหมด
GET /applications/:id/api-keys
Authorization: Bearer <token>สร้าง API key
POST /applications/:id/api-keys
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "string",
"scopes": ["pip:read"],
"expiresAt": "2027-01-01T00:00:00.000Z"
}Response (token แสดงครั้งเดียว):
{
"id": "key_xxxx",
"name": "string",
"token": "pip_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"scopes": ["pip:read"],
"expiresAt": "2027-01-01T00:00:00.000Z"
}ยกเลิก API key
DELETE /applications/:id/api-keys/:keyId
Authorization: Bearer <token>