API Key Custom Role
The custom roles an API key is given. The key holds every permission of the role except those with the Owned scope: a key owns nothing.
API Key Custom Roleモデル
プロパティ
-
- 名前
_id- タイプ
- Object ID
- 説明
-
ID of this object
-
作成: ProjectOwner または ProjectAdmin または EditProjectApiKeyPermissions読み取り: ProjectOwner または ProjectAdmin または ReadProjectApiKey更新: ProjectOwner または ProjectAdmin または EditProjectApiKeyPermissions
-
- 名前
createdAt- タイプ
- Date
- 説明
-
Date and Time when the object was created.
-
作成: ProjectOwner または ProjectAdmin または EditProjectApiKeyPermissions読み取り: ProjectOwner または ProjectAdmin または ReadProjectApiKey更新: ProjectOwner または ProjectAdmin または EditProjectApiKeyPermissions
-
- 名前
updatedAt- タイプ
- Date
- 説明
-
Date and Time when the object was updated.
-
作成: ProjectOwner または ProjectAdmin または EditProjectApiKeyPermissions読み取り: ProjectOwner または ProjectAdmin または ReadProjectApiKey更新: ProjectOwner または ProjectAdmin または EditProjectApiKeyPermissions
-
- 名前
project- タイプ
- Project
- 説明
-
Relation to Project Resource in which this object belongs
-
作成: ProjectOwner または ProjectAdmin または EditProjectApiKeyPermissions読み取り: ProjectOwner または ProjectAdmin または ReadProjectApiKey更新: 更新できません
-
- 名前
projectId- タイプ
- Object ID 必須
- 説明
-
ID of your OneUptime Project in which this object belongs
-
作成: ProjectOwner または ProjectAdmin または EditProjectApiKeyPermissions読み取り: ProjectOwner または ProjectAdmin または ReadProjectApiKey更新: 更新できません
-
- 名前
apiKey- タイプ
- API Key
- 説明
-
The API key given the role.
-
作成: ProjectOwner または ProjectAdmin または EditProjectApiKeyPermissions読み取り: ProjectOwner または ProjectAdmin または ReadProjectApiKey更新: 更新できません
-
- 名前
apiKeyId- タイプ
- Object ID 必須
- 説明
-
ID of the API key given the role.
-
作成: ProjectOwner または ProjectAdmin または EditProjectApiKeyPermissions読み取り: ProjectOwner または ProjectAdmin または ReadProjectApiKey更新: 更新できません
-
- 名前
customRole- タイプ
- Custom Role
- 説明
-
The custom role given to the API key.
-
作成: ProjectOwner または ProjectAdmin または EditProjectApiKeyPermissions読み取り: ProjectOwner または ProjectAdmin または ReadProjectApiKey更新: 更新できません
-
- 名前
customRoleId- タイプ
- Object ID 必須
- 説明
-
ID of the custom role given to the API key.
-
作成: ProjectOwner または ProjectAdmin または EditProjectApiKeyPermissions読み取り: ProjectOwner または ProjectAdmin または ReadProjectApiKey更新: 更新できません
-
- 名前
createdByUser- タイプ
- User
- 説明
-
Relation to User who created this object (if this object was created by a User)
-
作成: 自動生成読み取り: ProjectOwner または ProjectAdmin または ReadProjectApiKey更新: 更新できません
-
- 名前
createdByUserId- タイプ
- Object ID
- 説明
-
User ID who created this object (if this object was created by a User)
-
作成: 自動生成読み取り: ProjectOwner または ProjectAdmin または ReadProjectApiKey更新: 更新できません
/api/api-key-custom-role/get-list
一覧
このエンドポイントを使用すると、すべてのAPI Key Custom Roleのページ分割されたリストを取得できます。デフォルトでは、ページごとに最大10件のAPI Key Custom Roleが表示されます。
オプションのクエリパラメータ
-
- Limit
limit- タイプ
- number
- 説明
- 取得するオブジェクトの数。デフォルトは10で、この数を最大100まで増やすことができます
-
- Skip
skip- タイプ
- number
- 説明
- スキップするオブジェクトの数。これはページネーションで便利です
オプションのリクエストボディ
-
- Query
query- タイプ
- query
- 説明
- API Key Custom Roleでフィルタリングしたい場合。ここでクエリを指定できます。詳細については、 こちらでクエリの記述方法をご確認ください。
-
- Select
select- タイプ
- select
- 説明
- デフォルトでは、オブジェクトのIDのみが取得されます。より多くのフィールドを取得するには、それらを選択する必要があります。詳細については、 こちらでselectの方法をご確認ください。
-
- Sort
sort- タイプ
- sort
- 説明
- オブジェクトはデフォルトで作成日に基づいてソートされます。次のように渡すことでソート順を変更できます こちらでselectの方法をご確認ください。
Listリクエスト
POST/api/api-key-custom-role/get-list?skip=0&limit=10
Content-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"apiKeyId": true,
"customRoleId": true,
"projectId": true,
"apiKey": true,
"createdByUser": true
},
"query": {},
"sort": {
"createdAt": -1
}
}
レスポンス
{
"count": 10,
"limit": 10,
"skip": 0,
"data": [
{
"_id": "75130bac-fb6b-4de8-b527-e3a9ec725db5",
"apiKeyId": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
"customRoleId": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"projectId": "a3f9c8e2-d4b6-4a7c-9e5f-1a2b3c4d5e6f",
"apiKey": "Production API Key",
"createdByUser": "admin@company.com"
},
{
"_id": "345bd076-63f7-4f44-9fc7-1a8964b74862",
"apiKeyId": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
"customRoleId": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"projectId": "a3f9c8e2-d4b6-4a7c-9e5f-1a2b3c4d5e6f",
"apiKey": "Production API Key",
"createdByUser": "admin@company.com"
},
{
"_id": "b5c52970-6138-47c2-8108-f6d3d28b6218",
"apiKeyId": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
"customRoleId": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"projectId": "a3f9c8e2-d4b6-4a7c-9e5f-1a2b3c4d5e6f",
"apiKey": "Production API Key",
"createdByUser": "admin@company.com"
}
]
}
/api/api-key-custom-role/:id/get-item
IDで項目を取得
このエンドポイントを使用すると、IDでAPI Key Custom Roleを取得できます。
必須のクエリパラメータ
-
- ID
id- タイプ
- text
- 説明
- オブジェクトのID
オプションのリクエストボディ
-
- Select
select- タイプ
- select
- 説明
- デフォルトでは、オブジェクトのIDのみが取得されます。より多くのフィールドを取得するには、それらを選択する必要があります。詳細については、 こちらでselectの方法をご確認ください。
Get Itemリクエスト
POST/api/api-key-custom-role/:id/get-item
Content-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"apiKeyId": true,
"customRoleId": true,
"projectId": true,
"apiKey": true,
"createdByUser": true
}
}
レスポンス
{
"_id": "75130bac-fb6b-4de8-b527-e3a9ec725db5",
"apiKeyId": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
"customRoleId": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"projectId": "a3f9c8e2-d4b6-4a7c-9e5f-1a2b3c4d5e6f",
"apiKey": "Production API Key",
"createdByUser": "admin@company.com"
}
/api/api-key-custom-role/count
カウント
このエンドポイントを使用すると、すべてのAPI Key Custom Roleのカウントを取得できます。
オプションのリクエストボディ
-
- Query
query- タイプ
- query
- 説明
- API Key Custom Roleでフィルタリングしたい場合。ここでクエリを指定できます。詳細については、 こちらでクエリの記述方法をご確認ください。
Countリクエスト
POST/api/api-key-custom-role/count
Content-Type: application/json ApiKey: YOUR_API_KEY
{
"query": {}
}
レスポンス
{
"count": 107
}
/api/api-key-custom-role
API Key Custom Roleを作成
このエンドポイントを使用すると、新しいオブジェクトを作成できます。
リクエストボディ
-
- Data
data- タイプ
- JSON
- 説明
- JSONとして作成するオブジェクト
Createリクエスト
POST/api/api-key-custom-role
Content-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {
"apiKeyId": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
"customRoleId": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"projectId": "a3f9c8e2-d4b6-4a7c-9e5f-1a2b3c4d5e6f",
"apiKey": "Production API Key",
"customRole": "Incident Responder"
}
}
レスポンス
{
"_id": "75130bac-fb6b-4de8-b527-e3a9ec725db5",
"apiKeyId": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
"customRoleId": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"projectId": "a3f9c8e2-d4b6-4a7c-9e5f-1a2b3c4d5e6f",
"apiKey": "Production API Key",
"createdByUser": "admin@company.com"
}
/api/api-key-custom-role/:id
IDで更新
このエンドポイントを使用すると、IDでオブジェクトを更新できます。
リクエストボディ
-
- Data
data- タイプ
- JSON
- 説明
- JSONとして更新するオブジェクト
代替メソッド
PUTリクエストをサポートしないクライアントの場合、同じリクエストヘッダーとボディでPOSTまたはGETを使用できます:
/api/api-key-custom-role/:id/update-item
Updateリクエスト
PUT/api/api-key-custom-role/:id
Content-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {}
}
レスポンス
{}
/api/api-key-custom-role/:id
IDで削除
このエンドポイントを使用すると、IDでオブジェクトを削除できます。
代替メソッド
DELETEリクエストをサポートしないクライアントの場合、同じリクエストヘッダーとボディでPOSTまたはGETを使用できます:
/api/api-key-custom-role/:id/delete-item
Deleteリクエスト
DELETE/api/api-key-custom-role/:id
Content-Type: application/json ApiKey: YOUR_API_KEY
レスポンス
{}
権限
API Tokenでこのリソースを作成、更新、読み取り、または削除するには権限が必要です。リクエストを行う権限がない場合、レスポンスとして4xxステータスが送信されます。
読み取り権限
API Key Custom Roleを読み取るために必要です
-
ProjectOwner- Project Owner
- Owner of this project. Does everything Project Admin does, and also manages billing and payment methods, sets up SCIM, and can delete the project.
-
ProjectAdmin- Project Admin
- Admin of this project. Creates, changes and deletes everything in it, including team members and their permissions, API keys, labels, SSO, rules and custom fields, and reads the audit log. Cannot manage billing, set up SCIM or delete the project.
-
ReadProjectApiKey- Read API Key
- This permission can read api keys of this project.
作成権限
API Key Custom Roleを作成するために必要です
-
ProjectOwner- Project Owner
- Owner of this project. Does everything Project Admin does, and also manages billing and payment methods, sets up SCIM, and can delete the project.
-
ProjectAdmin- Project Admin
- Admin of this project. Creates, changes and deletes everything in it, including team members and their permissions, API keys, labels, SSO, rules and custom fields, and reads the audit log. Cannot manage billing, set up SCIM or delete the project.
-
EditProjectApiKeyPermissions- Edit API Key Permissions
- This permission can edit api key permissions of this project.
更新権限
API Key Custom Roleを更新するために必要です
-
ProjectOwner- Project Owner
- Owner of this project. Does everything Project Admin does, and also manages billing and payment methods, sets up SCIM, and can delete the project.
-
ProjectAdmin- Project Admin
- Admin of this project. Creates, changes and deletes everything in it, including team members and their permissions, API keys, labels, SSO, rules and custom fields, and reads the audit log. Cannot manage billing, set up SCIM or delete the project.
-
EditProjectApiKeyPermissions- Edit API Key Permissions
- This permission can edit api key permissions of this project.
削除権限
API Key Custom Roleを削除するために必要です
-
ProjectOwner- Project Owner
- Owner of this project. Does everything Project Admin does, and also manages billing and payment methods, sets up SCIM, and can delete the project.
-
ProjectAdmin- Project Admin
- Admin of this project. Creates, changes and deletes everything in it, including team members and their permissions, API keys, labels, SSO, rules and custom fields, and reads the audit log. Cannot manage billing, set up SCIM or delete the project.
-
DeleteProjectApiKey- Delete API Key
- This permission can delete api keys of this project.
-
EditProjectApiKeyPermissions- Edit API Key Permissions
- This permission can edit api key permissions of this project.