Python
from openlayer import Openlayer
client = Openlayer()
stats = client.governance.frameworks.list_project_rule_stats(
"5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
sort_column="overallCompletion",
)
print(stats.items)import Openlayer from 'openlayer';
const client = new Openlayer();
const stats = await client.governance.frameworks.listProjectRuleStats('5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b', {
sortColumn: 'overallCompletion',
asc: true,
});
console.log(stats.items);
package main
import (
"context"
"fmt"
"github.com/openlayer-ai/openlayer-go"
)
client := openlayer.NewClient()
stats, err := client.Governance.Frameworks.ListProjectRuleStats(
context.TODO(),
"5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
openlayer.GovernanceFrameworkListProjectRuleStatsParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", stats.Items)
import com.openlayer.api.client.OpenlayerClient;
import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
import com.openlayer.api.models.governance.frameworks.FrameworkListProjectRuleStatsParams;
import com.openlayer.api.models.governance.frameworks.FrameworkListProjectRuleStatsResponse;
OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();
FrameworkListProjectRuleStatsParams params = FrameworkListProjectRuleStatsParams.builder()
.frameworkId("5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b")
.sortColumn(FrameworkListProjectRuleStatsParams.SortColumn.OVERALL_COMPLETION)
.asc(false)
.build();
FrameworkListProjectRuleStatsResponse stats = client.governance().frameworks().listProjectRuleStats(params);
require "openlayer"
openlayer = Openlayer::Client.new(api_key: ENV["OPENLAYER_API_KEY"])
rule_stats = openlayer.governance.frameworks.list_project_rule_stats("5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b")
puts(rule_stats)
curl --request GET \
--url 'https://api.openlayer.com/v1/frameworks/9f1b3c2d-4e5a-4f60-8a71-2b3c4d5e6f70/project-rule-stats?sortColumn=totalFailing&asc=false' \
--header 'Authorization: Bearer <token>'
{
"items": [
{
"total": 1,
"totalPassing": 1,
"totalFailing": 1,
"totalSkipped": 1,
"totalRunning": 1,
"totalError": 1,
"totalPending": 1,
"totalDueSoon": 1,
"projectId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"projectName": "Customer chatbot",
"taskType": "llm-base",
"byRuleType": {
"platform": {
"total": 1,
"totalPassing": 1,
"totalFailing": 1,
"totalSkipped": 1,
"totalRunning": 1,
"totalError": 1,
"totalPending": 1,
"totalDueSoon": 1
},
"evidence": {
"total": 1,
"totalPassing": 1,
"totalFailing": 1,
"totalSkipped": 1,
"totalRunning": 1,
"totalError": 1,
"totalPending": 1,
"totalDueSoon": 1
}
}
}
]
}{
"code": 123,
"error": "<string>"
}Governance
List a framework's per-project compliance
List a framework’s compliance stats per project.
Python
from openlayer import Openlayer
client = Openlayer()
stats = client.governance.frameworks.list_project_rule_stats(
"5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
sort_column="overallCompletion",
)
print(stats.items)import Openlayer from 'openlayer';
const client = new Openlayer();
const stats = await client.governance.frameworks.listProjectRuleStats('5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b', {
sortColumn: 'overallCompletion',
asc: true,
});
console.log(stats.items);
package main
import (
"context"
"fmt"
"github.com/openlayer-ai/openlayer-go"
)
client := openlayer.NewClient()
stats, err := client.Governance.Frameworks.ListProjectRuleStats(
context.TODO(),
"5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
openlayer.GovernanceFrameworkListProjectRuleStatsParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", stats.Items)
import com.openlayer.api.client.OpenlayerClient;
import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
import com.openlayer.api.models.governance.frameworks.FrameworkListProjectRuleStatsParams;
import com.openlayer.api.models.governance.frameworks.FrameworkListProjectRuleStatsResponse;
OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();
FrameworkListProjectRuleStatsParams params = FrameworkListProjectRuleStatsParams.builder()
.frameworkId("5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b")
.sortColumn(FrameworkListProjectRuleStatsParams.SortColumn.OVERALL_COMPLETION)
.asc(false)
.build();
FrameworkListProjectRuleStatsResponse stats = client.governance().frameworks().listProjectRuleStats(params);
require "openlayer"
openlayer = Openlayer::Client.new(api_key: ENV["OPENLAYER_API_KEY"])
rule_stats = openlayer.governance.frameworks.list_project_rule_stats("5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b")
puts(rule_stats)
curl --request GET \
--url 'https://api.openlayer.com/v1/frameworks/9f1b3c2d-4e5a-4f60-8a71-2b3c4d5e6f70/project-rule-stats?sortColumn=totalFailing&asc=false' \
--header 'Authorization: Bearer <token>'
{
"items": [
{
"total": 1,
"totalPassing": 1,
"totalFailing": 1,
"totalSkipped": 1,
"totalRunning": 1,
"totalError": 1,
"totalPending": 1,
"totalDueSoon": 1,
"projectId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"projectName": "Customer chatbot",
"taskType": "llm-base",
"byRuleType": {
"platform": {
"total": 1,
"totalPassing": 1,
"totalFailing": 1,
"totalSkipped": 1,
"totalRunning": 1,
"totalError": 1,
"totalPending": 1,
"totalDueSoon": 1
},
"evidence": {
"total": 1,
"totalPassing": 1,
"totalFailing": 1,
"totalSkipped": 1,
"totalRunning": 1,
"totalError": 1,
"totalPending": 1,
"totalDueSoon": 1
}
}
}
]
}{
"code": 123,
"error": "<string>"
}Authorizations
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
The framework id.
Query Parameters
The page to return in a paginated query.
Required range:
x >= 1Maximum number of items to return per page.
Required range:
1 <= x <= 100Whether to sort in ascending order.
The column to sort on.
Available options:
projectName, total, overallCompletion, totalPassing, totalFailing, totalSkipped, totalRunning, totalError, totalPending, totalDueSoon Response
Status OK.
Show child attributes
Show child attributes
Was this page helpful?