# REST Resource: projects.notes

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

## Resource: Note

A type of analysis that can be done for a resource.

| JSON representation |
|---|
| ``` { "name": string, "shortDescription": string, "longDescription": string, "kind": enum (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/NoteKind`), "relatedUrl": [ { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/RelatedUrl`) } ], "expirationTime": string, "createTime": string, "updateTime": string, "relatedNoteNames": [ string ], // Union field `type` can be only one of the following: "vulnerability": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.VulnerabilityNote`) }, "build": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.BuildNote`) }, "image": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.ImageNote`) }, "package": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.PackageNote`) }, "deployment": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.DeploymentNote`) }, "discovery": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.DiscoveryNote`) }, "attestation": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.AttestationNote`) }, "upgrade": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.UpgradeNote`) }, "compliance": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.ComplianceNote`) }, "dsseAttestation": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.DSSEAttestationNote`) }, "vulnerabilityAssessment": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.VulnerabilityAssessmentNote`) }, "sbomReference": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.SBOMReferenceNote`) }, "secret": { object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.SecretNote`) } // End of list of possible types for union field `type`. } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. |
| `shortDescription` | `string` A one sentence description of this note. |
| `longDescription` | `string` A detailed description of this note. |
| `kind` | ``enum (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/NoteKind`)`` Output only. The type of analysis. This field can be used as a filter in list requests. |
| `relatedUrl[]` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/RelatedUrl`)`` URLs associated with this note. |
| `expirationTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Time of expiration for this note. Empty if note does not expire. 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"`. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time this note was created. This field can be used as a filter in list requests. 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 note was last updated. This field can be used as a filter in list requests. 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"`. |
| `relatedNoteNames[]` | `string` Other notes related to this note. |
| Union field `type`. Required. Immutable. The type of analysis this note represents. `type` can be only one of the following: ||
| `vulnerability` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.VulnerabilityNote`)`` A note describing a package vulnerability. |
| `build` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.BuildNote`)`` A note describing build provenance for a verifiable build. |
| `image` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.ImageNote`)`` A note describing a base image. |
| `package` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.PackageNote`)`` A note describing a package hosted by various package managers. |
| `deployment` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.DeploymentNote`)`` A note describing something that can be deployed. |
| `discovery` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.DiscoveryNote`)`` A note describing the initial analysis of a resource. |
| `attestation` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.AttestationNote`)`` A note describing an attestation role. |
| `upgrade` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.UpgradeNote`)`` A note describing available package upgrades. |
| `compliance` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.ComplianceNote`)`` A note describing a compliance check. |
| `dsseAttestation` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.DSSEAttestationNote`)`` A note describing a dsse attestation note. |
| `vulnerabilityAssessment` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.VulnerabilityAssessmentNote`)`` A note describing a vulnerability assessment. |
| `sbomReference` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.SBOMReferenceNote`)`` A note describing an SBOM reference. |
| `secret` | ``object (`https://docs.cloud.google.com/artifact-analysis/docs/reference/rest/v1/projects.locations.notes#Note.SecretNote`)`` A note describing a secret. |

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