Skedulo Rule Management API

The Rule Management API from Skedulo — 3 operation(s) for rule management.

OpenAPI Specification

skedulo-rule-management-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Authentication Admin Rule Management API
  description: Skedulo Authentication API
  version: 1.0.0
servers:
- url: https://api.skedulo.com/auth
- url: https://api.uk.skedulo.com/auth
- url: https://api.ca.skedulo.com/auth
- url: https://api.au.skedulo.com/auth
tags:
- name: Rule Management
paths:
  /policies/rules/{id}:
    get:
      tags:
      - Rule Management
      summary: Get a rule by ID.
      operationId: getRuleById
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResultRuleResult'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      security:
      - ApiKeyAuth: []
    put:
      tags:
      - Rule Management
      summary: Update an existing rule.
      operationId: updateRule
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RuleInput'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResultRuleResult'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      security:
      - ApiKeyAuth: []
    delete:
      tags:
      - Rule Management
      summary: Delete a rule.
      operationId: deleteRule
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResultUnit'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      security:
      - ApiKeyAuth: []
  /policies/rules:
    get:
      tags:
      - Rule Management
      summary: Get multiple rules.
      operationId: getRules
      parameters:
      - name: enabled
        in: query
        description: Set to true to return only rules for enabled policies or false to return only rules for disabled policies.
        required: false
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResultListRuleResult'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      security:
      - ApiKeyAuth: []
    post:
      tags:
      - Rule Management
      summary: Create a new rule.
      operationId: createRule
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RuleInput'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResultRuleResult'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      security:
      - ApiKeyAuth: []
  /policies/rules/resolved:
    get:
      tags:
      - Rule Management
      summary: Get the resolved rules for the current user.
      operationId: getRulesForCurrentUser
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResultUserRulesResult'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      security:
      - ApiKeyAuth: []
components:
  schemas:
    ErrorDetails:
      type: object
      properties:
        errorType:
          type: string
        message:
          type: string
        extraFields:
          type: object
          additionalProperties:
            type: object
    Unit:
      type: object
    UserRulesResult:
      required:
      - rules
      type: object
      properties:
        rules:
          type: array
          description: The fully resolved set of rules for a user.
          items:
            $ref: '#/components/schemas/ResolvedRuleResult'
      description: The record access rules for a user.
    ApiResultUserRulesResult:
      required:
      - result
      type: object
      properties:
        result:
          $ref: '#/components/schemas/UserRulesResult'
    ApiResultUnit:
      required:
      - result
      type: object
      properties:
        result:
          $ref: '#/components/schemas/Unit'
    ApiResultListRuleResult:
      required:
      - result
      type: object
      properties:
        result:
          type: array
          items:
            $ref: '#/components/schemas/RuleResult'
    ResolvedRuleResult:
      required:
      - accessType
      - filter
      - objectType
      type: object
      properties:
        objectType:
          type: string
          description: The Skedulo data model object type (schema) that the rule applies to.
        filter:
          type: string
          description: A valid, fully resolved EQL filter that can be applied to the object Type.
        accessType:
          type: string
          description: Specifies whether the filter allows or denies access.
          enum:
          - deny
          - allow
      description: A record access rule that is enabled for the current user and has had placeholders resolved.
    RuleInput:
      required:
      - accessType
      - description
      - filter
      - objectType
      - permissionsExcluded
      - policyId
      - rolesExcluded
      type: object
      properties:
        policyId:
          type: string
          description: ID of the parent policy.
          format: uuid
        description:
          maxLength: 250
          minLength: 0
          type: string
          description: Describes the purpose of the rule.
        objectType:
          type: string
          description: The object type (schema) that the rule applies to. This may be a custom object.
        filter:
          type: string
          description: A filter expressed in the Skedulo Elastic Query Language (EQL), possibly with placeholders. This filter must be valid with respect to the object type and the custom data model.
        accessType:
          type: string
          description: Specifies whether the filter allows or denies access. All Deny rules will be applied with the AND operator and then all Allow filters will be applied with the OR operator.
          enum:
          - deny
          - allow
        permissionsExcluded:
          type: array
          description: An optional set of permission keys for which this rule should be ignored. If the user has any of these permissions, the rule will not be applied.
          items:
            type: string
            description: An optional set of permission keys for which this rule should be ignored. If the user has any of these permissions, the rule will not be applied.
        rolesExcluded:
          type: array
          description: An optional set of role ids for which this rule should be ignored. If the user has any of these roles, the rule will not be applied.
          items:
            type: string
            description: An optional set of role ids for which this rule should be ignored. If the user has any of these roles, the rule will not be applied.
            format: uuid
    ApiResultRuleResult:
      required:
      - result
      type: object
      properties:
        result:
          $ref: '#/components/schemas/RuleResult'
    RuleResult:
      required:
      - accessType
      - description
      - filter
      - id
      - objectType
      - permissionsExcluded
      - policyId
      - rolesExcluded
      type: object
      properties:
        id:
          type: string
          description: Uniquely identifies the rule. This ID can be used for updating or deleting the rule.
          format: uuid
        policyId:
          type: string
          description: ID of the parent policy.
          format: uuid
        description:
          maxLength: 250
          minLength: 0
          type: string
          description: Describes the purpose of the rule.
        objectType:
          type: string
          description: The object type (schema) that the rule applies to. This may be a custom object.
        filter:
          type: string
          description: A filter expressed in the Skedulo Elastic Query Language (EQL), possibly with placeholders. This filter must be valid with respect to the object type and the custom data model.
        accessType:
          type: string
          description: Specifies whether the filter allows or denies access. All Deny rules will be applied with the AND operator and then all Allow filters will be applied with the OR operator.
          enum:
          - deny
          - allow
        permissionsExcluded:
          type: array
          description: An optional set of permission keys for which this rule should be ignored. If the user has any of these permissions, the rule will not be applied.
          items:
            type: string
            description: An optional set of permission keys for which this rule should be ignored. If the user has any of these permissions, the rule will not be applied.
        rolesExcluded:
          type: array
          description: An optional set of role ids for which this rule should be ignored. If the user has any of these roles, the rule will not be applied.
          items:
            type: string
            description: An optional set of role ids for which this rule should be ignored. If the user has any of these roles, the rule will not be applied.
            format: uuid
      description: A record access rule that controls access to data.
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      bearerFormat: JWT