Scaleway Rules API

A rule (also known as an IAM rule) is the part of a [policy](https://www.scaleway.com/en/docs/iam/concepts/#policy) that defines the permissions of the policy's [principal](https://www.scaleway.com/en/docs/iam/concepts/#principal), and the scope of these permissions. A policy can have one or many rules. Each rule consists of: - A **scope**, which defines where the permission sets should apply. At Scaleway, a scope can be at [Project](https://www.scaleway.com/en/docs/iam/concepts/#project) or [Organization](https://www.scaleway.com/en/docs/iam/concepts/#organization) level. * **Projects** group your Scaleway resources (eg. Instances, Object Storage buckets, Managed Databases etc.) together. An Organization may have many Projects, or just one default Project. If you choose to define scope at Project level, you can select one, many, or all Projects. When you then define the [permission sets](https://www.scaleway.com/en/docs/iam/concepts/#permission-set) for this scope, you can give access to different resources within the Project(s). * An **Organization** is made of one or several Projects. Billing, IAM, Project management and support are all managed at Organization level, so choose the Organization scope to give access to these features. - One or more [**permission sets**](https://www.scaleway.com/en/docs/iam/reference-content/permission-sets/#permission-set) (eg. "list all Instances"). A permission set consists of one or multiple [permissions](https://www.scaleway.com/en/docs/iam/concepts/#permission) to perform actions on resources or features. Each permission set has a clear description, e.g. `InstancesFullAccess`, `InstancesReadOnly`, `RelationalDatabasesFullAccess`, `BillingReadOnly`.

Business capability
Identity & Access Management BC-620.20

Operations 2

GET /iam/v1alpha1/rules List rules of a given policy #
PUT /iam/v1alpha1/rules Set rules of a given policy #

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/scaleway-rules-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 form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

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

OpenAPI Specification

scaleway-rules-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: IAM Rules API
  description: Identity and Access Management (IAM) allows you to share access to the management of your Scaleway resources and Organization settings, in a controlled and secure manner.
  version: v1alpha1
servers:
- url: https://api.scaleway.com
tags:
- name: Rules
  description: A rule (also known as an IAM rule) is the part of a policy that defines the permissions of the policy's principal, and the scope of these permissions.
paths:
  /iam/v1alpha1/rules:
    get:
      tags:
      - Rules
      operationId: ListRules
      summary: List rules of a given policy
      description: List the rules of a given policy. By default, the rules listed are ordered by creation date in ascending order. This can be modified via the `order_by` field. You must define the `policy_id` in the query path of your request.
      parameters:
      - in: query
        name: policy_id
        description: Id of policy to search.
        schema:
          type: string
      - in: query
        name: page_size
        description: Number of results per page. Value must be between 1 and 100.
        schema:
          type: integer
          format: uint32
      - in: query
        name: page
        description: Page number. Value must be greater than 1.
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iam.v1alpha1.ListRulesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: "curl -X GET \\\n  -H \"X-Auth-Token: $SCW_SECRET_KEY\" \\\n  \"https://api.scaleway.com/iam/v1alpha1/rules?policy_id=string\""
      - lang: HTTPie
        source: "http GET \"https://api.scaleway.com/iam/v1alpha1/rules\" \\\n  X-Auth-Token:$SCW_SECRET_KEY \\\n  policy_id==string"
    put:
      tags:
      - Rules
      operationId: SetRules
      summary: Set rules of a given policy
      description: Overwrite the rules of a given policy. Any information that you add using this command will overwrite the previous configuration. If you include some of the rules you already had in your previous configuration in your new one, but you change their order, the new order of display will apply. While policy rules are ordered, they have no impact on the access logic of IAM because rules are allow-only.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iam.v1alpha1.SetRulesResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                policy_id:
                  type: string
                  description: Id of policy to update.
                rules:
                  type: array
                  description: Rules of the policy to set.
                  items:
                    $ref: '#/components/schemas/scaleway.iam.v1alpha1.RuleSpecs'
              required:
              - policy_id
              - rules
              x-properties-order:
              - policy_id
              - rules
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: "curl -X PUT \\\n  -H \"X-Auth-Token: $SCW_SECRET_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"policy_id\":\"string\",\"rules\":[\"\"]}' \\\n  \"https://api.scaleway.com/iam/v1alpha1/rules\""
      - lang: HTTPie
        source: "http PUT \"https://api.scaleway.com/iam/v1alpha1/rules\" \\\n  X-Auth-Token:$SCW_SECRET_KEY \\\n  policy_id=\"string\" \\\n  rules:='[\"\"]'"
components:
  schemas:
    scaleway.iam.v1alpha1.Rule:
      type: object
      properties:
        id:
          type: string
          description: Id of rule.
        permission_set_names:
          type: array
          description: Names of permission sets bound to the rule.
          nullable: true
          items:
            type: string
        permission_sets_scope_type:
          type: string
          description: Permission_set_names have the same scope_type.
          enum:
          - unknown_scope_type
          - projects
          - organization
          - account_root_user
          x-enum-descriptions:
            values:
              unknown_scope_type: Unknown scope type
              projects: Projects
              organization: Organization
              account_root_user: Account root user
          default: unknown_scope_type
        condition:
          type: string
          description: Condition expression to evaluate.
        project_ids:
          type: array
          description: List of Project IDs the rule is scoped to.
          nullable: true
          x-one-of: scope
          items:
            type: string
        organization_id:
          type: string
          description: ID of Organization the rule is scoped to.
          nullable: true
          x-one-of: scope
        account_root_user_id:
          type: string
          description: ID of account root user the rule is scoped to.
          nullable: true
          x-one-of: scope
      x-properties-order:
      - id
      - permission_set_names
      - permission_sets_scope_type
      - condition
      - project_ids
      - organization_id
      - account_root_user_id
    scaleway.iam.v1alpha1.RuleSpecs:
      type: object
      properties:
        permission_set_names:
          type: array
          description: Names of permission sets bound to the rule.
          nullable: true
          items:
            type: string
        condition:
          type: string
          description: Condition expression to evaluate.
        project_ids:
          type: array
          description: List of Project IDs the rule is scoped to.
          nullable: true
          x-one-of: scope
          items:
            type: string
        organization_id:
          type: string
          description: ID of Organization the rule is scoped to.
          nullable: true
          x-one-of: scope
      x-properties-order:
      - permission_set_names
      - condition
      - project_ids
      - organization_id
    scaleway.iam.v1alpha1.ListRulesResponse:
      type: object
      properties:
        rules:
          type: array
          description: Rules of the policy.
          items:
            $ref: '#/components/schemas/scaleway.iam.v1alpha1.Rule'
        total_count:
          type: integer
          description: Total count of rules.
          format: uint32
      x-properties-order:
      - rules
      - total_count
    scaleway.iam.v1alpha1.SetRulesResponse:
      type: object
      properties:
        rules:
          type: array
          description: Rules of the policy.
          items:
            $ref: '#/components/schemas/scaleway.iam.v1alpha1.Rule'
      x-properties-order:
      - rules
  securitySchemes:
    scaleway:
      in: header
      name: X-Auth-Token
      type: apiKey