curl --request PATCH \
--url https://api.siftstack.com/api/v1/artifacts/{artifactId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"updateMask": "<string>",
"artifact": {
"artifact": {
"storageClass": "ARTIFACT_STORAGE_CLASS_UNSPECIFIED",
"createdVia": "ARTIFACT_CREATED_VIA_UNSPECIFIED"
},
"artifactVersion": {
"title": "<string>",
"summary": "<string>",
"remoteFileId": "<string>",
"payload": {},
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": true
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": true
}
]
}
},
"links": [
{
"relation": "ARTIFACT_LINK_RELATION_UNSPECIFIED",
"entityType": "ARTIFACT_ENTITY_TYPE_UNSPECIFIED",
"entityId": "<string>"
}
]
}
'import requests
url = "https://api.siftstack.com/api/v1/artifacts/{artifactId}"
payload = {
"updateMask": "<string>",
"artifact": {
"artifact": {
"storageClass": "ARTIFACT_STORAGE_CLASS_UNSPECIFIED",
"createdVia": "ARTIFACT_CREATED_VIA_UNSPECIFIED"
},
"artifactVersion": {
"title": "<string>",
"summary": "<string>",
"remoteFileId": "<string>",
"payload": {},
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": True
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": True,
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": True
}
]
}
},
"links": [
{
"relation": "ARTIFACT_LINK_RELATION_UNSPECIFIED",
"entityType": "ARTIFACT_ENTITY_TYPE_UNSPECIFIED",
"entityId": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.siftstack.com/api/v1/artifacts/{artifactId}"
payload := strings.NewReader("{\n \"updateMask\": \"<string>\",\n \"artifact\": {\n \"artifact\": {\n \"storageClass\": \"ARTIFACT_STORAGE_CLASS_UNSPECIFIED\",\n \"createdVia\": \"ARTIFACT_CREATED_VIA_UNSPECIFIED\"\n },\n \"artifactVersion\": {\n \"title\": \"<string>\",\n \"summary\": \"<string>\",\n \"remoteFileId\": \"<string>\",\n \"payload\": {},\n \"metadata\": [\n {\n \"key\": {\n \"name\": \"<string>\",\n \"type\": \"METADATA_KEY_TYPE_UNSPECIFIED\",\n \"archivedDate\": \"2023-11-07T05:31:56Z\",\n \"isArchived\": true\n },\n \"stringValue\": \"<string>\",\n \"numberValue\": 123,\n \"booleanValue\": true,\n \"archivedDate\": \"2023-11-07T05:31:56Z\",\n \"isArchived\": true\n }\n ]\n }\n },\n \"links\": [\n {\n \"relation\": \"ARTIFACT_LINK_RELATION_UNSPECIFIED\",\n \"entityType\": \"ARTIFACT_ENTITY_TYPE_UNSPECIFIED\",\n \"entityId\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"artifact": {
"artifact": {
"artifactId": "<string>",
"organizationId": "<string>",
"createdByUserId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"archivedDate": "2023-11-07T05:31:56Z",
"storageClass": "ARTIFACT_STORAGE_CLASS_UNSPECIFIED",
"createdVia": "ARTIFACT_CREATED_VIA_UNSPECIFIED",
"currentVersionId": "<string>"
},
"artifactVersion": {
"artifactVersionId": "<string>",
"artifactId": "<string>",
"version": 123,
"title": "<string>",
"summary": "<string>",
"authoringMessageId": "<string>",
"sourceToolUseIds": [
"<string>"
],
"remoteFileId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"fileName": "<string>",
"fileMimeType": "<string>",
"payload": {},
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": true
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"relationValue": {
"resourceType": "<string>",
"resourceId": "<string>"
},
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": true
}
],
"fileSize": "<string>",
"isCurrent": true
}
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}UpdateArtifact
Add a version to an artifact, changing only the fields named in update_mask.
curl --request PATCH \
--url https://api.siftstack.com/api/v1/artifacts/{artifactId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"updateMask": "<string>",
"artifact": {
"artifact": {
"storageClass": "ARTIFACT_STORAGE_CLASS_UNSPECIFIED",
"createdVia": "ARTIFACT_CREATED_VIA_UNSPECIFIED"
},
"artifactVersion": {
"title": "<string>",
"summary": "<string>",
"remoteFileId": "<string>",
"payload": {},
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": true
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": true
}
]
}
},
"links": [
{
"relation": "ARTIFACT_LINK_RELATION_UNSPECIFIED",
"entityType": "ARTIFACT_ENTITY_TYPE_UNSPECIFIED",
"entityId": "<string>"
}
]
}
'import requests
url = "https://api.siftstack.com/api/v1/artifacts/{artifactId}"
payload = {
"updateMask": "<string>",
"artifact": {
"artifact": {
"storageClass": "ARTIFACT_STORAGE_CLASS_UNSPECIFIED",
"createdVia": "ARTIFACT_CREATED_VIA_UNSPECIFIED"
},
"artifactVersion": {
"title": "<string>",
"summary": "<string>",
"remoteFileId": "<string>",
"payload": {},
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": True
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": True,
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": True
}
]
}
},
"links": [
{
"relation": "ARTIFACT_LINK_RELATION_UNSPECIFIED",
"entityType": "ARTIFACT_ENTITY_TYPE_UNSPECIFIED",
"entityId": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.siftstack.com/api/v1/artifacts/{artifactId}"
payload := strings.NewReader("{\n \"updateMask\": \"<string>\",\n \"artifact\": {\n \"artifact\": {\n \"storageClass\": \"ARTIFACT_STORAGE_CLASS_UNSPECIFIED\",\n \"createdVia\": \"ARTIFACT_CREATED_VIA_UNSPECIFIED\"\n },\n \"artifactVersion\": {\n \"title\": \"<string>\",\n \"summary\": \"<string>\",\n \"remoteFileId\": \"<string>\",\n \"payload\": {},\n \"metadata\": [\n {\n \"key\": {\n \"name\": \"<string>\",\n \"type\": \"METADATA_KEY_TYPE_UNSPECIFIED\",\n \"archivedDate\": \"2023-11-07T05:31:56Z\",\n \"isArchived\": true\n },\n \"stringValue\": \"<string>\",\n \"numberValue\": 123,\n \"booleanValue\": true,\n \"archivedDate\": \"2023-11-07T05:31:56Z\",\n \"isArchived\": true\n }\n ]\n }\n },\n \"links\": [\n {\n \"relation\": \"ARTIFACT_LINK_RELATION_UNSPECIFIED\",\n \"entityType\": \"ARTIFACT_ENTITY_TYPE_UNSPECIFIED\",\n \"entityId\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"artifact": {
"artifact": {
"artifactId": "<string>",
"organizationId": "<string>",
"createdByUserId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"archivedDate": "2023-11-07T05:31:56Z",
"storageClass": "ARTIFACT_STORAGE_CLASS_UNSPECIFIED",
"createdVia": "ARTIFACT_CREATED_VIA_UNSPECIFIED",
"currentVersionId": "<string>"
},
"artifactVersion": {
"artifactVersionId": "<string>",
"artifactId": "<string>",
"version": 123,
"title": "<string>",
"summary": "<string>",
"authoringMessageId": "<string>",
"sourceToolUseIds": [
"<string>"
],
"remoteFileId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"fileName": "<string>",
"fileMimeType": "<string>",
"payload": {},
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": true
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"relationValue": {
"resourceType": "<string>",
"resourceId": "<string>"
},
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": true
}
],
"fileSize": "<string>",
"isCurrent": true
}
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
The fields to write. Available paths are artifact_version.title,
artifact_version.summary, artifact_version.payload,
artifact_version.metadata, artifact_version.remote_file_id, and
links. A path the service does not know is rejected.
artifact_version.remote_file_id is a declaration, not a value: it says
the caller is about to upload new bytes for the returned version, so the
previous version's remote_files rows and its SOURCE and DERIVED_FROM links
are not carried forward. The current version stays unchanged until the
upload commits. The request value is ignored. Leave the path out to keep
the existing bytes.
An artifact and one of its versions: the one artifact_version_id pinned, or the latest.
Show child attributes
Show child attributes
Links written at the new version, when update_mask names links. They are
added to the links that carry forward (see ArtifactService). With
artifact_version.remote_file_id, these are the new bytes' only
provenance.
Show child attributes
Show child attributes
Response
A successful response.
An artifact and one of its versions: the one artifact_version_id pinned, or the latest.
Show child attributes
Show child attributes
Was this page helpful?