---
title: "POST /v1/projects/{projectsId}/locations/{locationsId}/evaluations"
method: POST
path: "/v1/projects/{projectsId}/locations/{locationsId}/evaluations"
tags: ["projects"]
---

# POST /v1/projects/{projectsId}/locations/{locationsId}/evaluations

`POST /v1/projects/{projectsId}/locations/{locationsId}/evaluations`

## Request

- Base URL: `https://workloadmanager.googleapis.com`
- URL: `https://workloadmanager.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/evaluations`
- Auth: OAuth 2 and OAuth 2
  - Implicit: `https://accounts.google.com/o/oauth2/auth`
  - Scopes: `https://www.googleapis.com/auth/cloud-platform`
  - Authorization code: `https://accounts.google.com/o/oauth2/auth`
  - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`

Creates a new Evaluation in a given project and location.

## Path parameters

- `projectsId` string, required
- `locationsId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string
- `evaluationId` string
- `requestId` string

## Request body

- Evaluation: Represents a Workload Manager Evaluation configuration. An Evaluation defines a set of rules to be validated against a scope of Cloud resources.
  - `bigQueryDestination` BigQueryDestination: BigQuery destination for evaluation results.
    - `createNewResultsTable` boolean: Optional. Determines if a new results table will be created when an Execution is created.
    - `destinationDataset` string: Optional. Destination dataset to save evaluation results.
  - `createTime` string, google-datetime: Output only. [Output only] Create time stamp.
  - `customRulesBucket` string: The Cloud Storage bucket name for custom rules.
  - `description` string: Description of the Evaluation.
  - `evaluationType` 'EVALUATION_TYPE_UNSPECIFIED' | 'SAP' | 'SQL_SERVER' | 'OTHER': Evaluation type.
  - `kmsKey` string: Optional. Immutable. Customer-managed encryption key name, in the format projects/*/locations/*/keyRings/*/cryptoKeys/*. The key will be used for CMEK encryption of the evaluation resource.
  - `labels` object: Labels as key value pairs.
  - `name` string: Name of resource that has the form `projects/{project_id}/locations/{location_id}/evaluations/{evaluation_id}`.
  - `resourceFilter` ResourceFilter: Resource filter for an evaluation defining the scope of resources to be evaluated.
    - `gceInstanceFilter` GceInstanceFilter: A filter for matching Compute Engine instances.
      - `serviceAccounts` string[]: If non-empty, only Compute Engine instances associated with at least one of the provided service accounts will be included in the evaluation.
    - `inclusionLabels` object: Labels to filter resources by. Each key-value pair in the map must exist on the resource for it to be included (e.g. VM instance labels). For example, specifying `{ "env": "prod", "database": "nosql" }` will only include resources that have labels `env=prod` and `database=nosql`.
    - `resourceIdPatterns` string[]: The pattern to filter resources by their id For example, a pattern of ".*prod-cluster.*" will match all resources that contain "prod-cluster" in their ID.
    - `scopes` string[]: The scopes of evaluation resource. Format: * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`
  - `resourceStatus` ResourceStatus: The lifecycle status of an Evaluation resource.
    - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'ACTIVE' | 'DELETING': State of the Evaluation resource.
  - `ruleNames` string[]: The names of the rules used for this evaluation.
  - `schedule` string: Crontab format schedule for scheduled evaluation, currently only supports the following fixed schedules: * `0 */1 * * *` # Hourly * `0 */6 * * *` # Every 6 hours * `0 */12 * * *` # Every 12 hours * `0 0 */1 * *` # Daily * `0 0 */7 * *` # Weekly * `0 0 */14 * *` # Every 14 days * `0 0 1 */1 *` # Monthly
  - `updateTime` string, google-datetime: Output only. [Output only] Update time stamp.

## Response `200`

Successful response

- Operation: This resource represents a long-running operation that is the result of a network API call.
  - `done` boolean: If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  - `error` Status: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
    - `code` integer: The status code, which should be an enum value of google.rpc.Code.
    - `details` object[]: A list of messages that carry the error details. There is a common set of message types for APIs to use.
    - `message` string: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  - `metadata` object: Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
  - `name` string: The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  - `response` object: The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.

---

[API](https://skmtc.dev/google/apis/workloadmanager.md) - [All operations](https://skmtc.dev/google/apis/workloadmanager/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/workloadmanager/revisions/5d93d5206535?raw)
