सामग्री पर जाएँ
साइन इन करें
API संदर्भ
संसाधन

API Key Permission

Permissions for your API Keys

API Key Permission मॉडल

गुण

  • नाम
    _id
    प्रकार
    Object ID
    विवरण

    ID of this object

  • नाम
    createdAt
    प्रकार
    Date
    विवरण

    Date and Time when the object was created.

  • नाम
    updatedAt
    प्रकार
    Date
    विवरण

    Date and Time when the object was updated.

  • नाम
    apiKey
    प्रकार
    API Key
    विवरण

    Relation to API Key resource in which this object belongs

  • नाम
    apiKeyId
    प्रकार
    Object ID आवश्यक
    विवरण

    ID of API Key resource in which this object belongs

  • नाम
    project
    प्रकार
    Project
    विवरण

    Relation to Project Resource in which this object belongs

  • नाम
    projectId
    प्रकार
    Object ID आवश्यक
    विवरण

    ID of your OneUptime Project in which this object belongs

  • नाम
    createdByUser
    प्रकार
    User
    विवरण

    Relation to User who created this object (if this object was created by a User)

  • नाम
    createdByUserId
    प्रकार
    Object ID
    विवरण

    User ID who created this object (if this object was created by a User)

  • नाम
    permission
    प्रकार
    Permission आवश्यक
    विवरण

    Permission. You can find list of permissions on the Permissions page.

  • नाम
    labels
    प्रकार
    Label
    विवरण

    Relation to Labels Array where this permission is scoped at.

  • नाम
    isBlockPermission
    प्रकार
    Boolean
    विवरण

  • नाम
    customRole
    प्रकार
    Custom Role
    विवरण

    The custom role this permission comes from. Empty when the permission was given to the API key directly. Change it on the role.

  • नाम
    customRoleId
    प्रकार
    Object ID
    विवरण

    ID of the custom role this permission comes from. Empty when the permission was given to the API key directly.

  • नाम
    apiKeyCustomRole
    प्रकार
    API Key Custom Role
    विवरण

    The custom role given to the API key that brought this permission. Empty when the permission was given to the API key directly.

  • नाम
    apiKeyCustomRoleId
    प्रकार
    Object ID
    विवरण

    ID of the custom role given to the API key that brought this permission. Empty when the permission was given to the API key directly.

  • नाम
    customRolePermission
    प्रकार
    Custom Role Permission
    विवरण

    The custom role's own permission this one copies. Empty when the permission was given to the API key directly.

  • नाम
    customRolePermissionId
    प्रकार
    Object ID
    विवरण

    ID of the custom role's own permission this one copies. Empty when the permission was given to the API key directly.

GET या POST
/api/api-key-permission/get-list

सूची

यह एंडपॉइंट आपको अपने सभी API Key Permission की एक पेजिनेटेड सूची प्राप्त करने की अनुमति देता है। डिफ़ॉल्ट रूप से, प्रति पृष्ठ अधिकतम दस API Key Permission दिखाए जाते हैं।

वैकल्पिक क्वेरी पैरामीटर

  • Limit
    limit
    प्रकार
    number
    विवरण
    लाने के लिए ऑब्जेक्ट्स की संख्या। डिफ़ॉल्ट रूप से 10, आप इस गणना को 100 तक बढ़ा सकते हैं
  • Skip
    skip
    प्रकार
    number
    विवरण
    छोड़ने के लिए ऑब्जेक्ट्स की संख्या। यह पेजिनेशन में उपयोगी हो सकता है

वैकल्पिक अनुरोध बॉडी

  • Query
    query
    प्रकार
    query
    विवरण
    यदि आप API Key Permission पर फ़िल्टर करना चाहते हैं। आप यहाँ एक क्वेरी निर्दिष्ट कर सकते हैं। अधिक जानकारी के लिए, कृपया यहाँ क्वेरी लिखने की जाँच करें।
  • Select
    select
    प्रकार
    select
    विवरण
    डिफ़ॉल्ट रूप से आप केवल ऑब्जेक्ट्स की ID पुनः प्राप्त करेंगे, अधिक फ़ील्ड पुनः प्राप्त करने के लिए आपको उन्हें चुनना होगा। अधिक जानकारी के लिए, कृपया देखें कि यहाँ कैसे चुनें।
  • Sort
    sort
    प्रकार
    sort
    विवरण
    ऑब्जेक्ट्स को डिफ़ॉल्ट रूप से बनाई गई तिथि के आधार पर क्रमबद्ध किया जाएगा। आप पास करके क्रमबद्धता का क्रम बदल सकते हैं कृपया देखें कि यहाँ कैसे चुनें।

सूची अनुरोध

POST
/api/api-key-permission/get-list?skip=0&limit=10
हेडर
Content-Type: application/json
ApiKey: YOUR_API_KEY
बॉडी
{
  "select": {
    "apiKeyId": true,
    "permission": true,
    "projectId": true,
    "apiKey": true,
    "apiKeyCustomRole": true
  },
  "query": {},
  "sort": {
    "createdAt": -1
  }
}

प्रतिक्रिया

{
    "count": 10,
    "limit": 10,
    "skip": 0,
    "data": [
        {
            "_id": "aafcbd2c-55c9-4377-b449-97ef424d2a27",
            "apiKeyId": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
            "permission": "ProjectOwner",
            "projectId": "a3f9c8e2-d4b6-4a7c-9e5f-1a2b3c4d5e6f",
            "apiKey": "Production API Key",
            "apiKeyCustomRole": "Incident Responder"
        },
        {
            "_id": "1d869a62-1cca-4eae-98bd-aa4de7d49e8a",
            "apiKeyId": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
            "permission": "ProjectOwner",
            "projectId": "a3f9c8e2-d4b6-4a7c-9e5f-1a2b3c4d5e6f",
            "apiKey": "Production API Key",
            "apiKeyCustomRole": "Incident Responder"
        },
        {
            "_id": "9d9a1699-1485-4cc8-9a51-2968e1256d60",
            "apiKeyId": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
            "permission": "ProjectOwner",
            "projectId": "a3f9c8e2-d4b6-4a7c-9e5f-1a2b3c4d5e6f",
            "apiKey": "Production API Key",
            "apiKeyCustomRole": "Incident Responder"
        }
    ]
}
GET या POST
/api/api-key-permission/:id/get-item

ID द्वारा आइटम प्राप्त करें

यह एंडपॉइंट आपको ID द्वारा API Key Permission पुनः प्राप्त करने की अनुमति देता है।

आवश्यक क्वेरी पैरामीटर

  • ID
    id
    प्रकार
    text
    विवरण
    ऑब्जेक्ट की ID

वैकल्पिक अनुरोध बॉडी

  • Select
    select
    प्रकार
    select
    विवरण
    डिफ़ॉल्ट रूप से आप केवल ऑब्जेक्ट्स की ID पुनः प्राप्त करेंगे, अधिक फ़ील्ड पुनः प्राप्त करने के लिए आपको उन्हें चुनना होगा। अधिक जानकारी के लिए, कृपया देखें कि यहाँ कैसे चुनें।

आइटम प्राप्त करें अनुरोध

POST
/api/api-key-permission/:id/get-item
हेडर
Content-Type: application/json
ApiKey: YOUR_API_KEY
बॉडी
{
  "select": {
    "apiKeyId": true,
    "permission": true,
    "projectId": true,
    "apiKey": true,
    "apiKeyCustomRole": true
  }
}

प्रतिक्रिया

{
    "_id": "aafcbd2c-55c9-4377-b449-97ef424d2a27",
    "apiKeyId": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
    "permission": "ProjectOwner",
    "projectId": "a3f9c8e2-d4b6-4a7c-9e5f-1a2b3c4d5e6f",
    "apiKey": "Production API Key",
    "apiKeyCustomRole": "Incident Responder"
}
POST
/api/api-key-permission/count

गणना

यह एंडपॉइंट आपको अपने सभी API Key Permission की गणना पुनः प्राप्त करने की अनुमति देता है।

वैकल्पिक अनुरोध बॉडी

गणना अनुरोध

POST
/api/api-key-permission/count
हेडर
Content-Type: application/json
ApiKey: YOUR_API_KEY
बॉडी
{
  "query": {}
}

प्रतिक्रिया

{
    "count": 107
}
POST
/api/api-key-permission

API Key Permission बनाएँ

यह एंडपॉइंट आपको एक नया ऑब्जेक्ट बनाने की अनुमति देता है।

अनुरोध बॉडी

  • Data
    data
    प्रकार
    JSON
    विवरण
    JSON के रूप में बनाने के लिए ऑब्जेक्ट

बनाएँ अनुरोध

POST
/api/api-key-permission
हेडर
Content-Type: application/json
ApiKey: YOUR_API_KEY
बॉडी
{
  "data": {
    "apiKeyId": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
    "permission": "ProjectOwner",
    "projectId": "a3f9c8e2-d4b6-4a7c-9e5f-1a2b3c4d5e6f",
    "apiKey": "Production API Key",
    "isBlockPermission": false
  }
}

प्रतिक्रिया

{
    "_id": "aafcbd2c-55c9-4377-b449-97ef424d2a27",
    "apiKeyId": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
    "permission": "ProjectOwner",
    "projectId": "a3f9c8e2-d4b6-4a7c-9e5f-1a2b3c4d5e6f",
    "apiKey": "Production API Key",
    "apiKeyCustomRole": "Incident Responder"
}
PUT
/api/api-key-permission/:id

ID द्वारा अपडेट करें

यह एंडपॉइंट आपको इसकी ID द्वारा ऑब्जेक्ट अपडेट करने की अनुमति देता है।

अनुरोध बॉडी

  • Data
    data
    प्रकार
    JSON
    विवरण
    JSON के रूप में अपडेट करने के लिए ऑब्जेक्ट

वैकल्पिक विधियाँ

उन क्लाइंट्स के लिए जो PUT अनुरोधों का समर्थन नहीं करते हैं, आप समान अनुरोध हेडर और बॉडी के साथ POST या GET का उपयोग कर सकते हैं:

POST /api/api-key-permission/:id/update-item

अपडेट अनुरोध

PUT
/api/api-key-permission/:id
हेडर
Content-Type: application/json
ApiKey: YOUR_API_KEY
बॉडी
{
  "data": {
    "permission": "ProjectOwner",
    "isBlockPermission": false,
    "labels": [
      {
        "name": "Production"
      },
      {
        "name": "Critical"
      }
    ]
  }
}

प्रतिक्रिया

{}
DELETE
/api/api-key-permission/:id

ID द्वारा हटाएँ

यह एंडपॉइंट आपको इसकी ID द्वारा ऑब्जेक्ट हटाने की अनुमति देता है।

वैकल्पिक विधियाँ

उन क्लाइंट्स के लिए जो DELETE अनुरोधों का समर्थन नहीं करते हैं, आप समान अनुरोध हेडर और बॉडी के साथ POST या GET का उपयोग कर सकते हैं:

POST /api/api-key-permission/:id/delete-item

हटाएँ अनुरोध

DELETE
/api/api-key-permission/:id
हेडर
Content-Type: application/json
ApiKey: YOUR_API_KEY

प्रतिक्रिया

{}

अनुमतियाँ

इस संसाधन को बनाने, अपडेट करने, पढ़ने या हटाने के लिए आपके API Token को अनुमतियों की आवश्यकता है। यदि आपके पास अनुरोध करने की अनुमति नहीं है तो प्रतिक्रिया के रूप में 4xx स्थिति भेजी जाएगी।

पढ़ने की अनुमतियाँ

API Key Permission पढ़ने के लिए आवश्यक

  • 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 Permission बनाने के लिए आवश्यक

  • 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 Permission अपडेट करने के लिए आवश्यक

  • 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 Permission हटाने के लिए आवश्यक

  • 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.