PromoteArtifactVersion
curl --request POST \
--url https://api.siftstack.com/api/v1/artifacts/{artifactId}/versions/{artifactVersionId}:promote \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.siftstack.com/api/v1/artifacts/{artifactId}/versions/{artifactVersionId}:promote"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.siftstack.com/api/v1/artifacts/{artifactId}/versions/{artifactVersionId}:promote"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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
}
]
}
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}ArtifactService
PromoteArtifactVersion
Write a new latest version of an artifact with the content of an older version.
POST
/
api
/
v1
/
artifacts
/
{artifactId}
/
versions
/
{artifactVersionId}
:promote
PromoteArtifactVersion
curl --request POST \
--url https://api.siftstack.com/api/v1/artifacts/{artifactId}/versions/{artifactVersionId}:promote \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.siftstack.com/api/v1/artifacts/{artifactId}/versions/{artifactVersionId}:promote"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.siftstack.com/api/v1/artifacts/{artifactId}/versions/{artifactVersionId}:promote"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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
}
]
}
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The version whose content becomes the new latest version.
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?