Archive a code package

This call archives a code package.

Request

https://api.sbgenomics.com/v2/automation/automations/{automation-id}/packages/{package-id}/actions/archive
https://eu-api.sbgenomics.com/v2/automation/automations/{automation-id}/packages/{package-id}/actions/archive

Example request

POST v2/automation/automations/d5b148d1-448f-4c6e-b023-f61e9733c677/packages/f4148d1-448f-4c4e-b023-f61e9733b677
Host: api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259720f72
curl -X POST \
  https://api.sbgenomics.com/v2/automation/automations/d5b148d1-448f-4c6e-b023-f61e9733c677/packages \
  -H 'Content-Type: application/json' \
  -H 'X-SBG-Advance-Access: advance' \
  -H 'X-SBG-Auth-Token: b04aa2a2e98348a1a3a75ca677ea7fd7'
  "
    ]
}
'
from sevenbridges import Api

api = Api(url='https://api.sbgenomics.com/v2',
          token='3259c50e1ac5426ea8f1273259740f74',
          advance_access=True)

package = api.automation_packages.get(id='f4148d1-448f-4c4e-b023-f61e9733b677')

# send POST request to SB API
package.archive()

print(package.archived)

Header Fields

Name

Description

X-SBG-Auth-Token
required

Your Seven Bridges Platform authentication token.

Content-Type
required

application/json

X-SBG-Advance-Access
required

advance

Path parameters

Name

Description

automation-id
required

The ID of the automation the code package you are archiving belongs to.

package-id
required

The ID of the code package you are archiving.

Response

{
    "id": "ebf4e81b-5e8e-4a51-927e-360ed21f3084",
    "automation": "595e5a46-8b2b-4d7a-ae7d-f043e2d9b020",
    "version": "batica",
    "location": "5d70f551e4b0c0751feda545",
    "archived": true,
    "created_by": "rfranklin",
    "created_on": "2019-09-10T10:19:45.636Z"
}

See a list of Seven Bridges Platform-specific response codes that may be contained in the body of the response.