from openlayer import Openlayer

client = Openlayer()
api_key = client.workspaces.api_keys.create(
  workspace_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  name="My API Key"
)
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "Secret Key",
  "dateCreated": "2023-11-07T05:31:56Z",
  "dateUpdated": "2023-11-07T05:31:56Z",
  "dateLastUsed": "2023-11-07T05:31:56Z",
  "secureKey": "sk-ol-*************************5PW0"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your workspace API key. See Find your API key for more information.

Path Parameters

workspaceId
string
required

The workspace id.

Body

application/json

Response

201 - application/json

Status Created.

The response is of type object.