Create
projects.api_keys.create(strproject_id, APIKeyCreateParams**kwargs) -> APIKeyCreateResponse
POST/projects/{projectId}/api-keys
Create an API key for a particular project
Create
import os
from scenario_sdk import Scenario
client = Scenario(
api_key=os.environ.get("SCENARIO_SDK_API_KEY"), # This is the default and can be omitted
api_secret=os.environ.get("SCENARIO_SDK_API_SECRET"), # This is the default and can be omitted
)
api_key = client.projects.api_keys.create(
project_id="projectId",
)
print(api_key.id){
"id": "id",
"authorId": "authorId",
"createdAt": "createdAt",
"ownerType": "project",
"secret": "secret",
"userId": "userId",
"ownerId": "ownerId",
"teamId": "teamId"
}Returns Examples
{
"id": "id",
"authorId": "authorId",
"createdAt": "createdAt",
"ownerType": "project",
"secret": "secret",
"userId": "userId",
"ownerId": "ownerId",
"teamId": "teamId"
}