Create a rule
Create a rule in a namespace.
Path Parameters
- Type: stringnamespacerequired
Body
required
application/json
- Type: stringdocumentrequired
- Type: stringslugrequired
- Type: stringtitlerequired
- Type: stringdescription
- Type: booleanis
Private
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
Request Example for post/v1/rulesets/{namespace}
import Scalar from '@scalar/sdk';
const client = new Scalar({
bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var
});
const createRuleset = await client.rules.createRuleset('namespace', {
title: '',
slug: '',
document: '',
});
console.log(createRuleset);
{
"uid": "string"
}