The value for keyone is a JSON payload, so a content_type override is needed. This override must be done every time a JSON value is set.
The version values for one and two mean they have been saved 10 and 20 times, respectively.
If version is not provided for an existing artifact, the entire request will be refused and a Bad Request response will be sent.
If version is provided for an artifact, it is only used for helping to prevent inadvertent data overwrites. It cannot be used to set the version of an artifact. The Looker server controls version.
We suggest encoding binary values as base64. Because the MIME content type for base64 is detected as plain text, also provide content_type to correctly indicate the value's type for retrieval and client-side processing.
Because artifacts are stored encrypted, the same value can be written multiple times (provided the correct version number is used). Looker does not examine any values stored in the artifact store, and only decrypts when sending artifacts back in an API response.
Note: The artifact storage API can only be used by Looker-built extensions.
Key of value to store. Namespace + Key must be unique.
value
string
Value to store.
content_type
string
MIME type of content. This can only be used to override content that is detected as text/plain. Needed to set application/json content types, which are analyzed as plain text.
version
lock
integer
Version number of the stored value. The version must be provided for any updates to an existing artifact.
query
HTTP Query
Expand HTTP Query definition...
fields
string
Comma-delimited names of fields to return in responses. Omit for all fields
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[],[],null,["# Create or update artifacts\n\nVersion 4.0.25.14 (latest)\n\n### Create or update one or more artifacts\n\nOnly `key` and `value` are required to *create* an artifact.\nTo *update* an artifact, its current `version` value must be provided.\n\nIn the following example `body` payload, `one` and `two` are existing artifacts, and `three` is new: \n\n [\n { \"key\": \"one\", \"value\": \"[ \\\"updating\\\", \\\"existing\\\", \\\"one\\\" ]\", \"version\": 10, \"content_type\": \"application/json\" },\n { \"key\": \"two\", \"value\": \"updating existing two\", \"version\": 20 },\n { \"key\": \"three\", \"value\": \"creating new three\" },\n ]\n\nNotes for this body:\n\n- The `value` for `key` **one** is a JSON payload, so a `content_type` override is needed. This override must be done **every** time a JSON value is set.\n- The `version` values for **one** and **two** mean they have been saved 10 and 20 times, respectively.\n- If `version` is **not** provided for an existing artifact, the entire request will be refused and a `Bad Request` response will be sent.\n- If `version` is provided for an artifact, it is only used for helping to prevent inadvertent data overwrites. It cannot be used to **set** the version of an artifact. The Looker server controls `version`.\n- We suggest encoding binary values as base64. Because the MIME content type for base64 is detected as plain text, also provide `content_type` to correctly indicate the value's type for retrieval and client-side processing.\n\nBecause artifacts are stored encrypted, the same value can be written multiple times (provided the correct `version` number is used). Looker does not examine any values stored in the artifact store, and only decrypts when sending artifacts back in an API response.\n\n**Note**: The artifact storage API can only be used by Looker-built extensions.\n\nRequest\n-------\n\nPUT /artifacts/{namespace} \nDatatype \nDescription \nRequest \nHTTP Request \npath \nHTTP Path \nExpand HTTP Path definition... \nnamespace \nstring \nArtifact storage namespace \nbody \nHTTP Body \nExpand HTTP Body definition... \nbody \n[UpdateArtifact](/looker/docs/reference/looker-api/latest/types/UpdateArtifact)\\[\\] \nExpand UpdateArtifact definition... \nkey \nstring \nKey of value to store. Namespace + Key must be unique. \nvalue \nstring \nValue to store. \ncontent_type \nstring \nMIME type of content. This can only be used to override content that is detected as text/plain. Needed to set application/json content types, which are analyzed as plain text. \nversion \n*lock* \ninteger \nVersion number of the stored value. The version must be provided for any updates to an existing artifact. \nquery \nHTTP Query \nExpand HTTP Query definition... \nfields \nstring \nComma-delimited names of fields to return in responses. Omit for all fields\n\nResponse\n--------\n\n### 200: Created or updated artifacts\n\nDatatype \nDescription \n(array) \n[Artifact](/looker/docs/reference/looker-api/latest/types/Artifact)\\[\\] \nkey \nstring \nKey of value to store. Namespace + Key must be unique. \nvalue \nstring \nValue to store. \ncontent_type \nstring \nMIME type of content. This can only be used to override content that is detected as text/plain. Needed to set application/json content types, which are analyzed as plain text. \nversion \n*lock* \ninteger \nVersion number of the stored value. The version must be provided for any updates to an existing artifact. \nnamespace \n*lock* \nstring \nArtifact storage namespace. \ncreated_at \n*lock* \nstring \nTimestamp when this artifact was created. \nupdated_at \n*lock* \nstring \nTimestamp when this artifact was updated. \nvalue_size \n*lock* \ninteger \nSize (in bytes) of the stored value. \ncreated_by_userid \n*lock* \nstring \nUser id of the artifact creator. \nupdated_by_userid \n*lock* \nstring \nUser id of the artifact updater.\n\n### 400: Bad Request\n\nDatatype \nDescription \n(object) \n[Error](/looker/docs/reference/looker-api/latest/types/Error) \nmessage \n*lock* \nstring \nError details \ndocumentation_url \n*lock* \nstring \nDocumentation link\n\n### 404: Not Found\n\nDatatype \nDescription \n(object) \n[Error](/looker/docs/reference/looker-api/latest/types/Error) \nmessage \n*lock* \nstring \nError details \ndocumentation_url \n*lock* \nstring \nDocumentation link\n\n### 422: Validation Error\n\nDatatype \nDescription \n(object) \n[ValidationError](/looker/docs/reference/looker-api/latest/types/ValidationError) \nmessage \n*lock* \nstring \nError details \nerrors \n[ValidationErrorDetail](/looker/docs/reference/looker-api/latest/types/ValidationErrorDetail)\\[\\] \nExpand ValidationErrorDetail definition... \nfield \n*lock* \nstring \nField with error \ncode \n*lock* \nstring \nError code \nmessage \n*lock* \nstring \nError info message \ndocumentation_url \n*lock* \nstring \nDocumentation link \ndocumentation_url \n*lock* \nstring \nDocumentation link\n\n### 429: Too Many Requests\n\nDatatype \nDescription \n(object) \n[Error](/looker/docs/reference/looker-api/latest/types/Error) \nmessage \n*lock* \nstring \nError details \ndocumentation_url \n*lock* \nstring \nDocumentation link"]]