55 lines
1.7 KiB
Python
55 lines
1.7 KiB
Python
# Copyright (c) 2023-present Plane Software, Inc. and contributors
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
# See the LICENSE file for details.
|
|
|
|
from django.urls import path
|
|
|
|
from plane.app.views import (
|
|
CodexAgentDetailEndpoint,
|
|
CodexAgentGrantListEndpoint,
|
|
CodexAgentListEndpoint,
|
|
CodexAgentRevokeEndpoint,
|
|
CodexAgentSetupEndpoint,
|
|
CodexAgentTokenListEndpoint,
|
|
CodexAgentTokenRevokeEndpoint,
|
|
)
|
|
|
|
|
|
urlpatterns = [
|
|
path(
|
|
"workspaces/<str:slug>/codex-agent-api/agents/",
|
|
CodexAgentListEndpoint.as_view(),
|
|
name="codex-agent-api-agents",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/codex-agent-api/agents/<uuid:agent_id>/",
|
|
CodexAgentDetailEndpoint.as_view(),
|
|
name="codex-agent-api-agent-detail",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/codex-agent-api/agents/<uuid:agent_id>/revoke/",
|
|
CodexAgentRevokeEndpoint.as_view(),
|
|
name="codex-agent-api-agent-revoke",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/codex-agent-api/agents/<uuid:agent_id>/grants/",
|
|
CodexAgentGrantListEndpoint.as_view(),
|
|
name="codex-agent-api-agent-grants",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/codex-agent-api/agents/<uuid:agent_id>/tokens/",
|
|
CodexAgentTokenListEndpoint.as_view(),
|
|
name="codex-agent-api-agent-tokens",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/codex-agent-api/agents/<uuid:agent_id>/tokens/<uuid:token_id>/revoke/",
|
|
CodexAgentTokenRevokeEndpoint.as_view(),
|
|
name="codex-agent-api-agent-token-revoke",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/codex-agent-api/agents/<uuid:agent_id>/setup/",
|
|
CodexAgentSetupEndpoint.as_view(),
|
|
name="codex-agent-api-agent-setup",
|
|
),
|
|
]
|