# REST Resource: projects.occurrences

- [Resource: Occurrence](https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.occurrences#Occurrence)
  - [JSON representation](https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.occurrences#Occurrence.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.occurrences#METHODS_SUMMARY)

## Resource: Occurrence

An instance of an analysis type that has been found on a resource.

| JSON representation |
|---|
| ``` { "name": string, "resource": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.Resource`) }, "noteName": string, "kind": enum (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/NoteKind`), "remediation": string, "createTime": string, "updateTime": string, "envelope": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.Envelope`) }, // Union field `details` can be only one of the following: "vulnerability": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.Details`) }, "build": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.Details_1`) }, "derivedImage": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.Details_2`) }, "installation": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.Details_3`) }, "deployment": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.Details_4`) }, "discovered": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.Details_5`) }, "attestation": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.Details_6`) }, "intoto": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.Details_7`) }, "sbom": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.DocumentOccurrence`) }, "spdxPackage": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.PackageInfoOccurrence`) }, "spdxFile": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.FileOccurrence`) }, "spdxRelationship": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.RelationshipOccurrence`) }, "sbomReference": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.SBOMReferenceOccurrence`) }, "secret": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.SecretOccurrence`) } // End of list of possible types for union field `details`. } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. |
| `resource` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.Resource`)`` Required. Immutable. The resource for which the occurrence applies. |
| `noteName` | `string` Required. Immutable. The analysis note associated with this occurrence, in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be used as a filter in list requests. |
| `kind` | ``enum (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/NoteKind`)`` Output only. This explicitly denotes which of the occurrence details are specified. This field can be used as a filter in list requests. |
| `remediation` | `string` A description of actions that can be taken to remedy the note. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time this occurrence was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time this occurrence was last updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `envelope` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.Envelope`)`` <https://github.com/secure-systems-lab/dsse> |
| Union field `details`. Required. Immutable. Describes the details of the note kind found on this resource. `details` can be only one of the following: ||
| `vulnerability` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.Details`)`` Describes a security vulnerability. |
| `build` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.Details_1`)`` Describes a verifiable build. |
| `derivedImage` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.Details_2`)`` Describes how this resource derives from the basis in the associated note. |
| `installation` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.Details_3`)`` Describes the installation of a package on the linked resource. |
| `deployment` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.Details_4`)`` Describes the deployment of an artifact on a runtime. |
| `discovered` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.Details_5`)`` Describes when a resource was discovered. |
| `attestation` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.Details_6`)`` Describes an attestation of an artifact. |
| `intoto` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.Details_7`)`` Describes a specific in-toto link. |
| `sbom` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.DocumentOccurrence`)`` Describes a specific software bill of materials document. |
| `spdxPackage` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.PackageInfoOccurrence`)`` Describes a specific SPDX Package. |
| `spdxFile` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.FileOccurrence`)`` Describes a specific SPDX File. |
| `spdxRelationship` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.RelationshipOccurrence`)`` Describes a specific SPDX Relationship. |
| `sbomReference` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.SBOMReferenceOccurrence`)`` Describes a specific SBOM reference occurrences. |
| `secret` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.locations.occurrences#Occurrence.SecretOccurrence`)`` Describes a secret. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.occurrences/batchCreate` | Creates new occurrences in batch. |
| ### `https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.occurrences/create` | Creates a new occurrence. |
| ### `https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.occurrences/delete` | Deletes the specified occurrence. |
| ### `https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.occurrences/get` | Gets the specified occurrence. |
| ### `https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.occurrences/getIamPolicy` | Gets the access control policy for a note or an occurrence resource. |
| ### `https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.occurrences/getNotes` | Gets the note attached to the specified occurrence. |
| ### `https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.occurrences/getVulnerabilitySummary` | Gets a summary of the number and severity of occurrences. |
| ### `https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.occurrences/list` | Lists occurrences for the specified project. |
| ### `https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.occurrences/patch` | Updates the specified occurrence. |
| ### `https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.occurrences/setIamPolicy` | Sets the access control policy on the specified note or occurrence. |
| ### `https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1beta1/projects.occurrences/testIamPermissions` | Returns the permissions that a caller has on the specified note or occurrence. |