Chef Software policies API

The policies API from Chef Software — 6 operation(s) for policies.

Operations 10

GET /apis/iam/v2/policies Lists all policies #
POST /apis/iam/v2/policies Creates a custom policy #
GET /apis/iam/v2/policies/{id} Gets a policy #
DELETE /apis/iam/v2/policies/{id} Deletes a custom policy #
PUT /apis/iam/v2/policies/{id} Updates a custom policy #
GET /apis/iam/v2/policies/{id}/members Lists policy members #
PUT /apis/iam/v2/policies/{id}/members Replaces policy members #
POST /apis/iam/v2/policies/{id}/members:add Adds policy members #
POST /apis/iam/v2/policies/{id}/members:remove Removes policy members #
GET /apis/iam/v2/policy_version Gets IAM version #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/chef-software-policies-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

chef-software-policies-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: external/applications/applications.proto ApplicationsService Policies API
  version: version not set
servers:
- url: https://automate.chef.io/api/v0
tags:
- name: policies
paths:
  /apis/iam/v2/policies:
    get:
      summary: Lists all policies
      description: 'Lists all policies.


        Authorization Action:

        ```

        iam:policies:list

        ```'
      operationId: Policies_ListPolicies
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/chef.automate.api.iam.v2.ListPoliciesResp'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      tags:
      - policies
    post:
      summary: Creates a custom policy
      description: 'Creates a custom IAM policy used to control permissions in Automate.

        A policy is composed of one or more statements that grant permissions to a set of members.

        Each statement contains a role as well as a list of projects.


        The role defines a set of actions that the statement is scoped to.

        The project list defines the set of resources that the statement is scoped to.

        Pass `"projects": ["*"]` to scope a statement to every project.


        A policy''s *top-level* projects list defines which projects the policy belongs to (for filtering policies by their projects),

        whereas the *statement-level* projects list defines which projects the statement applies to.


        The example creates a new policy not associated with any project (because the top-level `projects` property is empty) that grants the `viewer` role

        on a few projects for all LDAP teams and a custom role `qa` on a specific project.


        Authorization Action:

        ```

        iam:policies:create

        ```'
      operationId: Policies_CreatePolicy
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/chef.automate.api.iam.v2.CreatePolicyResp'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      tags:
      - policies
      x-code-samples:
      - lang: JSON
        source: '{"name": "My Viewer Policy","id": "custom-viewer-policy","members": ["team:ldap:*"], "statements": [{"role": "viewer","projects": ["project1", "project2"], "effect": "ALLOW"},{"role": "qa","projects": ["acceptanceProject"], "effect": "ALLOW"}],"projects": []}'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/chef.automate.api.iam.v2.CreatePolicyReq'
        required: true
  /apis/iam/v2/policies/{id}:
    get:
      summary: Gets a policy
      description: 'Returns the details for a policy.


        Authorization Action:

        ```

        iam:policies:get

        ```'
      operationId: Policies_GetPolicy
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/chef.automate.api.iam.v2.GetPolicyResp'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: id
        description: ID of the policy.
        in: path
        required: true
        schema:
          type: string
      tags:
      - policies
    delete:
      summary: Deletes a custom policy
      description: 'Deletes a specified custom policy. You cannot delete Chef-managed policies.


        Authorization Action:

        ```

        iam:policies:delete

        ```'
      operationId: Policies_DeletePolicy
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/chef.automate.api.iam.v2.DeletePolicyResp'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: id
        description: ID of the policy.
        in: path
        required: true
        schema:
          type: string
      tags:
      - policies
    put:
      summary: Updates a custom policy
      description: 'This operation overwrites all fields excepting ID,

        including those omitted from the request, so be sure to specify all properties.

        Properties that you do not include are reset to empty values.

        The only exception is the policy ID, which is immutable; it can only be set at creation time.


        While you can use this endpoint to update members on a policy, if that is the only

        property you wish to modify you might find it more convenient to use one of these endpoints instead:

        Add policy members, Remove policy members, or Replace policy members.


        Authorization Action:

        ```

        iam:policies:update

        ```'
      operationId: Policies_UpdatePolicy
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/chef.automate.api.iam.v2.UpdatePolicyResp'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: id
        description: Unique ID. Cannot be changed.
        in: path
        required: true
        schema:
          type: string
      tags:
      - policies
      x-code-samples:
      - lang: JSON
        source: '{"name": "My Updated Viewer Policy", "members": ["user:ldap:newuser", "team:ldap:newteam"], "statements": [{"role": "viewer","projects":["project1", "project2"], "effect": "ALLOW"},{"role": "qa","projects": ["acceptanceProject"], "effect": "ALLOW"}],"projects": []}'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/chef.automate.api.iam.v2.UpdatePolicyReq'
        required: true
  /apis/iam/v2/policies/{id}/members:
    get:
      summary: Lists policy members
      description: 'Lists all members of a specific policy.


        Authorization Action:

        ```

        iam:policyMembers:get

        ```'
      operationId: Policies_ListPolicyMembers
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/chef.automate.api.iam.v2.ListPolicyMembersResp'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: id
        description: ID of the policy.
        in: path
        required: true
        schema:
          type: string
      tags:
      - policies
    put:
      summary: Replaces policy members
      description: 'Replaces the entire member list of a specific policy with a new list.

        You may use this endpoint to update members of either Custom or Chef-managed policies.


        Ensure each element of the members array is in the correct

        [Member Expression](https://automate.chef.io/docs/iam-v2-guide/#member-expressions) format.


        Authorization Action:

        ```

        iam:policyMembers:update

        ```'
      operationId: Policies_ReplacePolicyMembers
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/chef.automate.api.iam.v2.ReplacePolicyMembersResp'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: id
        description: ID of the policy.
        in: path
        required: true
        schema:
          type: string
      tags:
      - policies
      x-code-samples:
      - lang: JSON
        source: '{"members": ["team:local:viewers", "user:local:test"]}'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/chef.automate.api.iam.v2.ReplacePolicyMembersReq'
        required: true
  /apis/iam/v2/policies/{id}/members:add:
    post:
      summary: Adds policy members
      description: 'Adds members to the member list of a specific policy.

        You may use this endpoint to update members of either Custom or Chef-managed policies.


        Ensure each element of the members array is in the correct

        [Member Expression](https://automate.chef.io/docs/iam-v2-guide/#member-expressions) format.


        Authorization Action:

        ```

        iam:policyMembers:create

        ```'
      operationId: Policies_AddPolicyMembers
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/chef.automate.api.iam.v2.AddPolicyMembersResp'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: id
        description: ID of the policy.
        in: path
        required: true
        schema:
          type: string
      tags:
      - policies
      x-code-samples:
      - lang: JSON
        source: '{"members": ["team:local:viewers", "user:local:test"]}'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/chef.automate.api.iam.v2.AddPolicyMembersReq'
        required: true
  /apis/iam/v2/policies/{id}/members:remove:
    post:
      summary: Removes policy members
      description: 'Removes members from the member list of a specific policy. Silently ignores

        members that are not already part of the member list.

        You may use this endpoint to update members of either Custom or Chef-managed policies.


        Ensure each element of the members array is in the correct

        [Member Expression](https://automate.chef.io/docs/iam-v2-guide/#member-expressions) format.


        The removed members will still exist within Chef Automate, but are no longer associated with this policy.


        Authorization Action:

        ```

        iam:policyMembers:delete

        ```'
      operationId: Policies_RemovePolicyMembers
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/chef.automate.api.iam.v2.RemovePolicyMembersResp'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
      - name: id
        description: ID of the policy.
        in: path
        required: true
        schema:
          type: string
      tags:
      - policies
      x-code-samples:
      - lang: JSON
        source: '{"members": ["team:local:viewers", "user:local:test"]}'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/chef.automate.api.iam.v2.RemovePolicyMembersReq'
        required: true
  /apis/iam/v2/policy_version:
    get:
      summary: Gets IAM version
      description: 'Returns the major and minor version of IAM that your automate installation is running.


        Authorization Action:

        ```

        iam:policies:get

        ```'
      operationId: Policies_GetPolicyVersion
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/chef.automate.api.iam.v2.GetPolicyVersionResp'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      tags:
      - policies
components:
  schemas:
    chef.automate.api.iam.v2.GetPolicyVersionResp:
      type: object
      example:
        version:
          major: V2
          minor: V1
      properties:
        version:
          $ref: '#/components/schemas/chef.automate.api.iam.v2.Version'
    chef.automate.api.iam.v2.ListPoliciesResp:
      type: object
      example:
        policies:
        - name: My Viewer Policy 1
          id: custom-viewer-policy-1
          members:
          - team:ldap:*
          statements:
          - role: viewer
            projects:
            - project1
            - project2
            effect: ALLOW
          - role: qa
            projects:
            - acceptanceProject
            effect: ALLOW
          projects: []
        - name: My Custom Policy 2
          id: custom-policy-2
          members:
          - team:local:test
          statements:
          - role: auditor
            projects:
            - project1
            effect: ALLOW
          projects: []
      properties:
        policies:
          type: array
          items:
            $ref: '#/components/schemas/chef.automate.api.iam.v2.Policy'
    chef.automate.api.iam.v2.RemovePolicyMembersReq:
      type: object
      example:
        members:
        - user:local:test
      properties:
        id:
          type: string
          description: ID of the policy.
        members:
          type: array
          items:
            type: string
          description: List of members to remove from the policy.
      required:
      - id
      - members
    chef.automate.api.iam.v2.DeletePolicyResp:
      type: object
      example:
        name: My Viewer Policy
        id: custom-viewer-policy
        members:
        - team:ldap:*
        statements:
        - role: viewer
          projects:
          - project1
          - project2
          effect: ALLOW
        - role: qa
          projects:
          - acceptanceProject
          effect: ALLOW
        projects: []
    chef.automate.api.iam.v2.Statement:
      type: object
      properties:
        effect:
          $ref: '#/components/schemas/chef.automate.api.iam.v2.Statement.Effect'
          description: This doc-comment is ignored for an enum.
        actions:
          type: array
          items:
            type: string
          description: 'Actions defined inline. May be empty.

            Best practices recommend that you use custom roles rather than inline actions where practical.'
        role:
          type: string
          description: The role defines a set of actions that the statement is scoped to.
        resources:
          type: array
          items:
            type: string
          description: 'DEPRECATED: Resources defined inline. Use projects instead.'
        projects:
          type: array
          items:
            type: string
          description: The project list defines the set of resources that the statement is scoped to. May be empty.
    chef.automate.api.iam.v2.UpdatePolicyResp:
      type: object
      example:
        name: My Updated Viewer Policy
        members:
        - user:ldap:newuser
        - team:ldap:newteam
        statements:
        - role: viewer
          projects:
          - project1
          - project2
          effect: ALLOW
        - role: qa
          projects:
          - acceptanceProject
          effect: ALLOW
        projects: []
      properties:
        policy:
          $ref: '#/components/schemas/chef.automate.api.iam.v2.Policy'
    grpc.gateway.runtime.Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/google.protobuf.Any'
    chef.automate.api.iam.v2.UpdatePolicyReq:
      type: object
      example:
        name: My Updated Viewer Policy
        members:
        - user:ldap:newuser
        - team:ldap:newteam
        statements:
        - role: viewer
          projects:
          - project1
          - project2
          effect: ALLOW
        - role: qa
          projects:
          - acceptanceProject
          effect: ALLOW
        projects: []
      properties:
        id:
          type: string
          description: Unique ID. Cannot be changed.
        members:
          type: array
          items:
            type: string
          description: Members affected by this policy.
        statements:
          type: array
          items:
            $ref: '#/components/schemas/chef.automate.api.iam.v2.Statement'
          description: Statements for the policy.
        name:
          type: string
          description: Name for this policy.
        projects:
          type: array
          items:
            type: string
          description: List of projects this policy belongs to.
      description: Does not contain type as the enduser can only create 'custom' policies.
      required:
      - id
      - name
      - statements
    chef.automate.api.iam.v2.Policy:
      type: object
      properties:
        name:
          type: string
          description: Name for the policy.
        id:
          type: string
          description: Unique ID. Cannot be changed.
        type:
          $ref: '#/components/schemas/chef.automate.api.iam.v2.Type'
          description: This doc-comment is ignored for an enum.
        members:
          type: array
          items:
            type: string
          description: Members affected by this policy. May be empty.
        statements:
          type: array
          items:
            $ref: '#/components/schemas/chef.automate.api.iam.v2.Statement'
          description: Statements for the policy. Will contain one or more.
        projects:
          type: array
          items:
            type: string
          description: List of projects this policy belongs to. May be empty.
    chef.automate.api.iam.v2.RemovePolicyMembersResp:
      type: object
      example:
        members:
        - user:local:test
      properties:
        members:
          type: array
          items:
            type: string
          description: Resulting list of policy members.
    chef.automate.api.iam.v2.Statement.Effect:
      type: string
      enum:
      - ALLOW
      - DENY
      default: ALLOW
    chef.automate.api.iam.v2.ReplacePolicyMembersReq:
      type: object
      example:
        members:
        - team:local:viewers
        - user:local:test
      properties:
        id:
          type: string
          description: ID of the policy.
        members:
          type: array
          items:
            type: string
          description: List of members that replaces previous policy member list.
      required:
      - id
    google.protobuf.Any:
      type: object
      properties:
        type_url:
          type: string
          description: "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
        value:
          type: string
          format: byte
          description: Must be a valid serialized protocol buffer of the above specified type.
      description: "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"
    chef.automate.api.iam.v2.AddPolicyMembersResp:
      type: object
      example:
        members:
        - team:local:viewers
        - user:local:test
      properties:
        members:
          type: array
          items:
            type: string
    chef.automate.api.iam.v2.CreatePolicyResp:
      type: object
      example:
        name: My Viewer Policy
        id: custom-viewer-policy
        members:
        - team:ldap:*
        statements:
        - role: viewer
          projects:
          - project1
          - project2
          effect: ALLOW
        - role: qa
          projects:
          - acceptanceProject
          effect: ALLOW
        projects: []
      properties:
        policy:
          $ref: '#/components/schemas/chef.automate.api.iam.v2.Policy'
    chef.automate.api.iam.v2.AddPolicyMembersReq:
      type: object
      example:
        members:
        - team:local:viewers
        - user:local:test
      properties:
        id:
          type: string
          description: ID of the policy.
        members:
          type: array
          items:
            type: string
          description: List of members to add to the policy.
      required:
      - id
      - members
    chef.automate.api.iam.v2.CreatePolicyReq:
      type: object
      example:
        name: My Viewer Policy
        id: custom-viewer-policy
        members:
        - team:ldap:*
        statements:
        - role: viewer
          projects:
          - project1
          - project2
          effect: ALLOW
        - role: qa
          projects:
          - acceptanceProject
          effect: ALLOW
        projects: []
      properties:
        id:
          type: string
          description: Unique ID. Cannot be changed.
        name:
          type: string
          description: Name for the policy.
        members:
          type: array
          items:
            type: string
          description: Members affected by this policy.
        statements:
          type: array
          items:
            $ref: '#/components/schemas/chef.automate.api.iam.v2.Statement'
          description: Statements for the policy.
        projects:
          type: array
          items:
            type: string
          description: List of projects this policy belongs to.
      description: Does not contain type as the enduser can only create 'custom' policies.
      required:
      - id
      - name
      - statements
    chef.automate.api.iam.v2.GetPolicyResp:
      type: object
      example:
        name: My Viewer Policy
        id: custom-viewer-policy
        members:
        - team:ldap:*
        statements:
        - role: viewer
          projects:
          - project1
          - project2
          effect: ALLOW
        - role: qa
          projects:
          - acceptanceProject
          effect: ALLOW
        projects: []
      properties:
        policy:
          $ref: '#/components/schemas/chef.automate.api.iam.v2.Policy'
    chef.automate.api.iam.v2.ReplacePolicyMembersResp:
      type: object
      example:
        members:
        - team:local:viewers
        - user:local:test
      properties:
        members:
          type: array
          items:
            type: string
          description: Resulting list of policy members.
    chef.automate.api.iam.v2.ListPolicyMembersResp:
      type: object
      example:
        members:
        - team:local:viewers
        - user:local:test
      properties:
        members:
          type: array
          items:
            type: string
          description: List of policy members.
    chef.automate.api.iam.v2.Type:
      type: string
      enum:
      - CHEF_MANAGED
      - CUSTOM
      default: CHEF_MANAGED
    chef.automate.api.iam.v2.Version:
      type: object
      properties:
        major:
          $ref: '#/components/schemas/chef.automate.api.iam.v2.Version.VersionNumber'
        minor:
          $ref: '#/components/schemas/chef.automate.api.iam.v2.Version.VersionNumber'
      title: the only values that may be returned by GetPolicyVersion
    chef.automate.api.iam.v2.Version.VersionNumber:
      type: string
      enum:
      - V0
      - V1
      - V2
      default: V0