curl --request POST \
--url https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/security/apikeys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"rules": [
{
"role": [
"<string>"
],
"inverted": true,
"reason": "<string>",
"conditions": {},
"fields": [
"<string>"
],
"priority": 123
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
rules: [
{
role: ['<string>'],
inverted: true,
reason: '<string>',
conditions: {},
fields: ['<string>'],
priority: 123
}
]
})
};
fetch('https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/security/apikeys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/security/apikeys"
payload = {
"name": "<string>",
"rules": [
{
"role": ["<string>"],
"inverted": True,
"reason": "<string>",
"conditions": {},
"fields": ["<string>"],
"priority": 123
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"apiKey": "<string>",
"subjectType": "<string>",
"subjectId": "<string>",
"rules": [
{
"role": [
"<string>"
],
"inverted": true,
"reason": "<string>",
"conditions": {},
"fields": [
"<string>"
],
"priority": 123
}
],
"name": "<string>",
"disabled": true
}{
"error": "BadParameters",
"message": "<string>",
"details": "<unknown>"
}{
"error": "AuthenticationError",
"message": "Unauthenticated"
}{
"error": "ForbiddenError",
"message": "Forbidden"
}{
"error": "ObjectNotFound",
"message": "<string>"
}Create API Key
Create an api key
curl --request POST \
--url https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/security/apikeys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"rules": [
{
"role": [
"<string>"
],
"inverted": true,
"reason": "<string>",
"conditions": {},
"fields": [
"<string>"
],
"priority": 123
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
rules: [
{
role: ['<string>'],
inverted: true,
reason: '<string>',
conditions: {},
fields: ['<string>'],
priority: 123
}
]
})
};
fetch('https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/security/apikeys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/security/apikeys"
payload = {
"name": "<string>",
"rules": [
{
"role": ["<string>"],
"inverted": True,
"reason": "<string>",
"conditions": {},
"fields": ["<string>"],
"priority": 123
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"apiKey": "<string>",
"subjectType": "<string>",
"subjectId": "<string>",
"rules": [
{
"role": [
"<string>"
],
"inverted": true,
"reason": "<string>",
"conditions": {},
"fields": [
"<string>"
],
"priority": 123
}
],
"name": "<string>",
"disabled": true
}{
"error": "BadParameters",
"message": "<string>",
"details": "<unknown>"
}{
"error": "AuthenticationError",
"message": "Unauthenticated"
}{
"error": "ForbiddenError",
"message": "Forbidden"
}{
"error": "ObjectNotFound",
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Workspace id
Body
Hide child attributes
Hide child attributes
The actions that we want to allow/deny
manage, create, read, update, delete, manage_permissions, manage_security, manage_repositories, read_app_dsul, get_usage, aggregate_search, execute, test apps, pages, files, events, workspaces, automations, secrets, secure_secrets, workspace_keyrings, roles, orgs, orgs:members, orgs:groups, orgs:groups:members, orgs:invites, orgs:subscriptions, orgs:roles, orgs:apikeys, orgs:sso, orgs:service-accounts, users, all The roles to which this rule is restricted
If true, will forbid instead of allow
Matching conditions written using a subset of MongoDB queries. This rule will take effect only if conditions match (or are empty). See https://casl.js.org/v5/en/guide/conditions-in-depth
Field-level permissions. When specified, the rule only applies to these fields of the subject.
Response
Success Response
Hide child attributes
Hide child attributes
The actions that we want to allow/deny
manage, create, read, update, delete, manage_permissions, manage_security, manage_repositories, read_app_dsul, get_usage, aggregate_search, execute, test apps, pages, files, events, workspaces, automations, secrets, secure_secrets, workspace_keyrings, roles, orgs, orgs:members, orgs:groups, orgs:groups:members, orgs:invites, orgs:subscriptions, orgs:roles, orgs:apikeys, orgs:sso, orgs:service-accounts, users, all The roles to which this rule is restricted
If true, will forbid instead of allow
Matching conditions written using a subset of MongoDB queries. This rule will take effect only if conditions match (or are empty). See https://casl.js.org/v5/en/guide/conditions-in-depth
Field-level permissions. When specified, the rule only applies to these fields of the subject.
Was this page helpful?