조직
설치 단계와 이 플러그인의 전체 마크다운 가이드를 포함한 설정 지시를 복사합니다.
Organizations are the top-level entities in Capgo. They allow you to group apps, team members, and resources under a single umbrella. Each organization can have multiple members with different roles and permissions.
__CAPGO_KEEP_0__은 최상위 엔터티입니다. 여러 앱, 팀원 및 리소스를 하나의 단위로 그룹화할 수 있습니다. 각 __CAPGO_KEEP_0__은 여러 멤버가 다른 역할과 권한을 가질 수 있습니다.
__CAPGO_KEEP_3__- __CAPGO_KEEP_4__
- __CAPGO_KEEP_5__
- __CAPGO_KEEP_6__
- __CAPGO_KEEP_7__
__CAPGO_KEEP_8__
__CAPGO_KEEP_9____CAPGO_KEEP_10__
GEThttps://api.capgo.app/organization/
조직 정보를 가져옵니다. 파라미터에 orgId 가 제공되면 단일 조직을 반환합니다. 그렇지 않으면 접근 가능한 모든 조직을 반환합니다.
Query Parameters
Query ParametersorgId(선택): 특정 조직을 가져올 때 사용하는 ID
Response Type
Response Typeinterface Organization { id: string created_by: string created_at: string updated_at: string logo: string | null name: string management_email: string customer_id: string | null}예제 요청
Example Request# Get all organizationscurl -H "x-api-key: YOUR_API_KEY" https://api.capgo.app/organization/
# Get specific organizationcurl -H "x-api-key: YOUR_API_KEY" https://api.capgo.app/organization/?orgId=org_123예시 응답
예시 응답 섹션{ "data": { "id": "org_123", "name": "My Company", "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z", "logo": "https://example.com/logo.png", "management_email": "admin@example.com", "customer_id": "cus_123" }}POST
POST 섹션https://api.capgo.app/organization/
새로운 조직 만들기.
API 키를 사용할 때, 키는 글로벌 org.create 권한과 현재 조직 범위의 org_admin 또는 org_super_admin 바인딩이 있어야 합니다. 이 요구 사항은 대상 조직이 아직 존재하지 않기 때문에 일반 조직 범위의 RBAC를 대상 조직에 대해 확인할 수 없기 때문입니다.
요청이 성공하면 Capgo은 자동으로 API 키와 동일한 키를 assign합니다. org_super_admin __CAPGO_KEEP_0__에 대한 새로운 조직에 대해.
__CAPGO_KEEP_0__에 대한 요청 본문
복사interface OrganizationCreate { name: string email?: string estimatedMau?: number website?: string}__CAPGO_KEEP_0__에 대한 예시 요청입니다.
__CAPGO_KEEP_0__에 대한 예시 요청입니다.curl -X POST \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "New Organization", "email": "admin@example.com", "website": "https://example.com" }' \ https://api.capgo.app/organization/예시 응답
예시 응답 섹션{ "id": "org_456"}권한 오류
권한 오류 섹션API 키가 없으면 org.createAPI은 다음을 반환합니다.
{ "error": "permission_denied"}PUT
PUT 섹션https://api.capgo.app/organization/
__CAPGO_KEEP_0__을 업데이트합니다. __CAPGO_KEEP_0__에 대한 관리자 역할이 필요합니다.
interface OrganizationUpdate { orgId: string logo?: string name?: string management_email?: string}curl -X PUT \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "orgId": "org_123", "name": "New Company Name", "management_email": "newemail@example.com" }' \ https://api.capgo.app/organization/{ "status": "Organization updated", "data": { "id": "org_123", "name": "New Company Name", "management_email": "newemail@example.com" }}DELETE
DELETEhttps://api.capgo.app/organization/
기존 조직을 삭제합니다. 대상 조직에 대한 삭제 권한이 필요하며, 일반적으로 org_super_admin 권한을 통해 얻을 수 있습니다. 이 작업은 irreversible 하며 모든 관련 앱, 버전, 및 리소스를 삭제합니다.
전역 org.create 권한은 조직을 삭제할 수 없습니다.
Query Parameters
: 삭제할 조직의 IDorgIdExample Request
터미널 창
클립보드에 복사curl -X DELETE \ -H "x-api-key: YOUR_API_KEY" \ https://api.capgo.app/organization/?orgId=org_123예시 응답
예시 응답 섹션{ "status": "ok"}오류 처리
오류 처리 섹션일반 오류 상황 및 응답:
// Invalid API key{ "error": "Invalid API key", "status": "KO"}
// Missing required field{ "error": "Name is required", "status": "KO"}
// Insufficient permissions{ "error": "Admin role required", "status": "KO"}최선의 관행
최선의 관행 섹션- 이름 지정: 명확하고 설명적인 이름을 사용하여 조직
- 역할: 팀원에게 적절한 역할을 할당하세요
- 이메일: 관리 이메일을 개인 이메일 변경 문제를 피하기 위해 그룹 이메일을 사용하세요
- 로고: 로고를 신뢰할 수 있는 CDN에 호스팅하고 HTTPS URL을 사용하세요
조직에서 계속
제목이 '조직에서 계속'인 섹션Capgo를 사용하는 경우 조직 계획 및 API 운영을 위해 조직을 사용하고 있다면 API Overview와 연결하세요 API Overview API Overview의 구현 세부 정보를 위해 API Overview를 참조하세요 __CAPGO_KEEP_0__ 소개 __CAPGO_KEEP_0__ 소개의 구현 세부 정보에 대해 API 키 API 키의 구현 세부 정보에 대해 장치 장치의 구현 세부 정보에 대해 __CAPGO_KEEP_0__ __CAPGO_KEEP_0__의 구현 세부 정보에 대해