---
title: "CreateArtifact creates a specified artifact."
method: POST
path: "/v1/projects/{project}/artifacts"
---

# CreateArtifact creates a specified artifact.

`POST /v1/projects/{project}/artifacts`

## Path parameters

- `project` string, required

## Query parameters

- `artifact_id` string

## Request body

- Artifact — Artifacts of resources. Artifacts are unique (single-value) per resource and are used to store metadata that is too large or numerous to be stored directly on the resource. Since artifacts are stored separately from parent resources, they should generally be used for metadata that is needed infrequently, i.e. not for display in primary views of the resource but perhaps displayed or downloaded upon request. The ListArtifacts method allows artifacts to be quickly enumerated and checked for presence without downloading their (potentially-large) contents.
  - `name` string — Resource name.
  - `create_time` string, RFC3339 — Creation timestamp.
  - `update_time` string, RFC3339 — Last update timestamp.
  - `mime_type` string — A content type specifier for the artifact. Content type specifiers are Media Types (https://en.wikipedia.org/wiki/Media_type) with a possible "schema" parameter that specifies a schema for the stored information.
  - `size_bytes` integer — The size of the artifact in bytes.
  - `hash` string — A SHA-256 hash of the artifact's contents
  - `contents` string, bytes — The contents of the artifact. Provided by API callers when artifacts are created or replaced. To access the contents of an artifact, use GetArtifactContents.

## Response `200`

OK

- Artifact — Artifacts of resources. Artifacts are unique (single-value) per resource and are used to store metadata that is too large or numerous to be stored directly on the resource. Since artifacts are stored separately from parent resources, they should generally be used for metadata that is needed infrequently, i.e. not for display in primary views of the resource but perhaps displayed or downloaded upon request. The ListArtifacts method allows artifacts to be quickly enumerated and checked for presence without downloading their (potentially-large) contents.
  - `name` string — Resource name.
  - `create_time` string, RFC3339 — Creation timestamp.
  - `update_time` string, RFC3339 — Last update timestamp.
  - `mime_type` string — A content type specifier for the artifact. Content type specifiers are Media Types (https://en.wikipedia.org/wiki/Media_type) with a possible "schema" parameter that specifies a schema for the stored information.
  - `size_bytes` integer — The size of the artifact in bytes.
  - `hash` string — A SHA-256 hash of the artifact's contents
  - `contents` string, bytes — The contents of the artifact. Provided by API callers when artifacts are created or replaced. To access the contents of an artifact, use GetArtifactContents.

## Changes

- **2021-04-20** `7428736a439b` — 2 breaking, 8 warning, 4 info
  - the `create_time` response's property type changed from no type to `string`, and format from no format to `RFC3339` for status `200`
  - the `update_time` response's property type changed from no type to `string`, and format from no format to `RFC3339` for status `200`
  - removed the request property `create_time/nanos`
  - removed the request property `create_time/seconds`
  - …10 more
- **2021-02-27** `f26001c22757` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/apigee/apis/registry-api/changes/v1/projects/:project/artifacts/post.md)

---

[API](https://skmtc.dev/apigee/apis/registry-api.md) · [All operations](https://skmtc.dev/apigee/apis/registry-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/apigee/registry-api/revisions/f4b05a05d224/schema)
