---
title: "POST /v1/projects/{project}/locations/{location}/artifacts"
method: POST
path: "/v1/projects/{project}/locations/{location}/artifacts"
tags: ["Registry"]
---

# POST /v1/projects/{project}/locations/{location}/artifacts

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

CreateArtifact creates a specified artifact.

## Path parameters

- `project` string, required
- `location` string, required

## Query parameters

- `artifactId` 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.
  - `createTime` string, date-time — Output only. Creation timestamp.
  - `updateTime` string, date-time — Output only. Last update timestamp.
  - `mimeType` 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. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip").
  - `sizeBytes` integer — Output only. The size of the artifact in bytes. If the artifact is gzipped, this is the size of the uncompressed artifact.
  - `hash` string — Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped, this is the hash of the uncompressed artifact.
  - `contents` string, bytes — Input only. 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.
  - `createTime` string, date-time — Output only. Creation timestamp.
  - `updateTime` string, date-time — Output only. Last update timestamp.
  - `mimeType` 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. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip").
  - `sizeBytes` integer — Output only. The size of the artifact in bytes. If the artifact is gzipped, this is the size of the uncompressed artifact.
  - `hash` string — Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped, this is the hash of the uncompressed artifact.
  - `contents` string, bytes — Input only. The contents of the artifact. Provided by API callers when artifacts are created or replaced. To access the contents of an artifact, use GetArtifactContents.

## Other responses

- `default` — Default error response

## Changes

- **2022-04-20** `60e792df4088` — 4 breaking, 2 info
  - the request's body type/format changed from ``/`` to `object`/``
  - the response's body type/format changed from ``/`` to `object`/`` for status `200`
  - the `createTime` response's property type/format changed from `string`/`RFC3339` to `string`/`date-time` for status `200`
  - the `updateTime` response's property type/format changed from `string`/`RFC3339` to `string`/`date-time` for status `200`
  - …2 more
- **2021-12-22** `ce92b3e601d4` — 6 warning, 7 info
  - deleted the `query` request parameter `artifact_id`
  - removed the request property `mime_type`
  - removed the optional property `create_time` from the response with the `200` status
  - removed the optional property `mime_type` from the response with the `200` status
  - …9 more
- **2021-09-11** `2699b7373a24` — 1 info
  - endpoint added
- **2020-10-24** `9c2571d516e8` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/apigee/apis/registry-api/changes/v1/projects/:project/locations/:location/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/382ff6551970/schema)
