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.
Le modèle API Key Custom Role
Propriétés
-
- Nom
_id- Type
- Object ID
- Description
-
ID of this object
-
Création : ProjectOwner ou ProjectAdmin ou EditProjectApiKeyPermissionsLecture : ProjectOwner ou ProjectAdmin ou ReadProjectApiKeyMise à jour : ProjectOwner ou ProjectAdmin ou EditProjectApiKeyPermissions
-
- Nom
createdAt- Type
- Date
- Description
-
Date and Time when the object was created.
-
Création : ProjectOwner ou ProjectAdmin ou EditProjectApiKeyPermissionsLecture : ProjectOwner ou ProjectAdmin ou ReadProjectApiKeyMise à jour : ProjectOwner ou ProjectAdmin ou EditProjectApiKeyPermissions
-
- Nom
updatedAt- Type
- Date
- Description
-
Date and Time when the object was updated.
-
Création : ProjectOwner ou ProjectAdmin ou EditProjectApiKeyPermissionsLecture : ProjectOwner ou ProjectAdmin ou ReadProjectApiKeyMise à jour : ProjectOwner ou ProjectAdmin ou EditProjectApiKeyPermissions
-
- Nom
project- Type
- Project
- Description
-
Relation to Project Resource in which this object belongs
-
Création : ProjectOwner ou ProjectAdmin ou EditProjectApiKeyPermissionsLecture : ProjectOwner ou ProjectAdmin ou ReadProjectApiKeyMise à jour : Mise à jour impossible
-
- Nom
projectId- Type
- Object ID Obligatoire
- Description
-
ID of your OneUptime Project in which this object belongs
-
Création : ProjectOwner ou ProjectAdmin ou EditProjectApiKeyPermissionsLecture : ProjectOwner ou ProjectAdmin ou ReadProjectApiKeyMise à jour : Mise à jour impossible
-
- Nom
apiKey- Type
- API Key
- Description
-
The API key given the role.
-
Création : ProjectOwner ou ProjectAdmin ou EditProjectApiKeyPermissionsLecture : ProjectOwner ou ProjectAdmin ou ReadProjectApiKeyMise à jour : Mise à jour impossible
-
- Nom
apiKeyId- Type
- Object ID Obligatoire
- Description
-
ID of the API key given the role.
-
Création : ProjectOwner ou ProjectAdmin ou EditProjectApiKeyPermissionsLecture : ProjectOwner ou ProjectAdmin ou ReadProjectApiKeyMise à jour : Mise à jour impossible
-
- Nom
customRole- Type
- Custom Role
- Description
-
The custom role given to the API key.
-
Création : ProjectOwner ou ProjectAdmin ou EditProjectApiKeyPermissionsLecture : ProjectOwner ou ProjectAdmin ou ReadProjectApiKeyMise à jour : Mise à jour impossible
-
- Nom
customRoleId- Type
- Object ID Obligatoire
- Description
-
ID of the custom role given to the API key.
-
Création : ProjectOwner ou ProjectAdmin ou EditProjectApiKeyPermissionsLecture : ProjectOwner ou ProjectAdmin ou ReadProjectApiKeyMise à jour : Mise à jour impossible
-
- Nom
createdByUser- Type
- User
- Description
-
Relation to User who created this object (if this object was created by a User)
-
Création : Généré automatiquementLecture : ProjectOwner ou ProjectAdmin ou ReadProjectApiKeyMise à jour : Mise à jour impossible
-
- Nom
createdByUserId- Type
- Object ID
- Description
-
User ID who created this object (if this object was created by a User)
-
Création : Généré automatiquementLecture : ProjectOwner ou ProjectAdmin ou ReadProjectApiKeyMise à jour : Mise à jour impossible
/api/api-key-custom-role/get-list
Liste
Ce point de terminaison vous permet de récupérer une liste paginée de tous vos API Key Custom Role. Par défaut, un maximum de dix API Key Custom Role sont affichés par page.
Paramètres de requête facultatifs
-
- Limit
limit- Type
- number
- Description
- Nombre d'objets à récupérer. Par défaut 10, vous pouvez augmenter ce nombre jusqu'à 100
-
- Skip
skip- Type
- number
- Description
- Nombre d'objets à ignorer. Cela peut être utile dans le cadre de la pagination
Corps de requête facultatif
-
- Query
query- Type
- query
- Description
- Si vous souhaitez filtrer sur API Key Custom Role. Vous pouvez préciser une requête ici. Pour plus d'informations, veuillez consulter la rédaction des requêtes ici.
-
- Select
select- Type
- select
- Description
- Par défaut, vous ne récupérerez que l'ID des objets ; pour récupérer davantage de champs, vous devez les sélectionner. Pour plus d'informations, veuillez consulter ici comment effectuer une sélection.
-
- Sort
sort- Type
- sort
- Description
- Les objets seront triés par défaut en fonction de leur date de création. Vous pouvez modifier l'ordre de tri en passant veuillez consulter ici comment effectuer une sélection.
Requête 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
}
}
Réponse
{
"count": 10,
"limit": 10,
"skip": 0,
"data": [
{
"_id": "b0397794-7af6-4332-8078-931c2acdfab5",
"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": "171f4aa2-21f1-4cfb-8057-fe76a90ebc08",
"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": "613c1b45-71fb-4ff8-a758-82f475d11a2e",
"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
Obtenir un élément par ID
Ce point de terminaison vous permet de récupérer API Key Custom Role par ID.
Paramètres de requête obligatoires
-
- ID
id- Type
- text
- Description
- ID de l'objet
Corps de requête facultatif
-
- Select
select- Type
- select
- Description
- Par défaut, vous ne récupérerez que l'ID des objets ; pour récupérer davantage de champs, vous devez les sélectionner. Pour plus d'informations, veuillez consulter ici comment effectuer une sélection.
Requête 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
}
}
Réponse
{
"_id": "b0397794-7af6-4332-8078-931c2acdfab5",
"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
Comptage
Ce point de terminaison vous permet de récupérer le nombre total de tous vos API Key Custom Role.
Corps de requête facultatif
-
- Query
query- Type
- query
- Description
- Si vous souhaitez filtrer sur API Key Custom Role. Vous pouvez préciser une requête ici. Pour plus d'informations, veuillez consulter la rédaction des requêtes ici.
Requête Count
POST/api/api-key-custom-role/count
Content-Type: application/json ApiKey: YOUR_API_KEY
{
"query": {}
}
Réponse
{
"count": 107
}
/api/api-key-custom-role
Créer API Key Custom Role
Ce point de terminaison vous permet de créer un nouvel objet.
Corps de la requête
-
- Data
data- Type
- JSON
- Description
- Objet à créer au format JSON
Requête 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"
}
}
Réponse
{
"_id": "b0397794-7af6-4332-8078-931c2acdfab5",
"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
Mettre à jour par ID
Ce point de terminaison vous permet de mettre à jour un objet par son ID.
Corps de la requête
-
- Data
data- Type
- JSON
- Description
- Objet à mettre à jour au format JSON
Méthodes alternatives
Pour les clients qui ne prennent pas en charge les requêtes PUT, vous pouvez utiliser POST ou GET avec les mêmes en-têtes de requête et le même corps :
/api/api-key-custom-role/:id/update-item
Requête Update
PUT/api/api-key-custom-role/:id
Content-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {}
}
Réponse
{}
/api/api-key-custom-role/:id
Supprimer par ID
Ce point de terminaison vous permet de supprimer un objet par son ID.
Méthodes alternatives
Pour les clients qui ne prennent pas en charge les requêtes DELETE, vous pouvez utiliser POST ou GET avec les mêmes en-têtes de requête et le même corps :
/api/api-key-custom-role/:id/delete-item
Requête Delete
DELETE/api/api-key-custom-role/:id
Content-Type: application/json ApiKey: YOUR_API_KEY
Réponse
{}
Autorisations
Votre jeton API a besoin d'autorisations pour créer, mettre à jour, lire ou supprimer cette ressource. Si vous ne disposez pas des autorisations nécessaires pour effectuer une requête, un statut 4xx sera renvoyé en réponse.
Autorisations de lecture
Requises pour lire 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.
Autorisations de création
Requises pour créer 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.
Autorisations de mise à jour
Requises pour mettre à jour 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.
Autorisations de suppression
Requises pour supprimer 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.