Automating the release process. (For policy reason need to use curl cmd, not permitted to use fastlane/etc for this step)
Reading the App Store Connect API, I am uncertain what to pass as the "http body" during the POST action. What is AppStoreVersionReleaseRequestCreateRequest
I would guess it goes in the "--data-raw" of curl cmd?
There doesn't seem to be example snippet.
Draft cmd:
curl --location --request POST "<appStoreVersionReleaseRequests-api>" --header "Authorization: Bearer ${JWT}" --header 'Content-Type: application/json' --data-raw '{ "key?": "value?" }'
There documentation is poor to put it mildly. After much trial and error here's what I determined is needed for the POST body:
{
"data":
{
"type": "appStoreVersionReleaseRequests",
"relationships":
{
"appStoreVersion":
{
"data":
{
"id": "${the_id_of_the_version_to_release}",
"type": "appStoreVersions"
}
}
}
}
}
Your curl command would look like this:
curl -v -g -X 'POST' -H 'Authorization: Bearer ${JWT}' -H 'Content-Type: application/json' 'https://api.appstoreconnect.apple.com/v1/appStoreVersionReleaseRequests' --data '{"data":{"type":"appStoreVersionReleaseRequests","relationships":{"appStoreVersion":{"data":{"id": "${the_id_of_the_version_to_release}","type": "appStoreVersions"}}}}}'