UpdateArtifact
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>",
"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>",
"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 \"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,
"fileSha256": "<string>"
}
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}ArtifactService
UpdateArtifact
Add a version to an artifact, changing only the fields named in update_mask.
PATCH
/
api
/
v1
/
artifacts
/
{artifactId}
UpdateArtifact
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>",
"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>",
"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 \"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,
"fileSha256": "<string>"
}
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Body
application/json
The fields to write. Available paths are artifact_version.title,
artifact_version.summary, 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.
Was this page helpful?