CodeArtifact
CodeArtifact is a fully managed artifact repository compatible with language-native package managers and build tools such as npm, Apache Maven, pip, and…
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
CodeArtifact is a fully managed artifact repository compatible with language-native
package managers and build tools such as npm, Apache Maven, pip, and dotnet. You can use CodeArtifact to
share packages with development teams and pull packages. Packages can be pulled from both
public and CodeArtifact repositories. You can also create an upstream relationship between a CodeArtifact
repository and another repository, which effectively merges their contents from the point of
view of a package manager client.
CodeArtifact concepts
Repository : A CodeArtifact repository contains a set of package
versions , each of which maps to a set of assets, or files. Repositories are
polyglot, so a single repository can contain packages of any supported type. Each
repository exposes endpoints for fetching and publishing packages using tools such as the
npm
CLI or the Maven CLI (
mvn
). For a list of supported package managers, see the
CodeArtifact User Guide .
Domain : Repositories are aggregated into a higher-level entity known as a
domain . All package assets and metadata are stored in the domain,
but are consumed through repositories. A given package asset, such as a Maven JAR file, is
stored once per domain, no matter how many repositories it's present in. All of the assets
and metadata in a domain are encrypted with the same customer master key (CMK) stored in
Key Management Service (KMS).
Each repository is a member of a single domain and can't be moved to a
different domain.
The domain allows organizational policy to be applied across multiple
repositories, such as which accounts can access repositories in the domain, and
which public repositories can be used as sources of packages.
Although an organization can have multiple domains, we recommend a single production
domain that contains all published artifacts so that teams can find and share packages
across their organization.
Package : A package is a bundle of software and the metadata required to
resolve dependencies and install the software. CodeArtifact supports npm, PyPI, Maven, NuGet, Swift, Ruby, Cargo, and generic package formats.
For more information about the supported package formats and how to use CodeArtifact with them, see the
CodeArtifact User Guide .
In CodeArtifact, a package consists of:
A name (for example, webpack is the name of a
popular npm package)
An optional namespace (for example, @types in @types/node )
A set of versions (for example, 1.0.0 , 1.0.1 ,
1.0.2 , etc.)
Package-level metadata (for example, npm tags)
Package group : A group of packages that match a specified definition. Package
groups can be used to apply configuration to multiple packages that match a defined pattern using
package format, package namespace, and package name. You can use package groups to more conveniently
configure package origin controls for multiple packages. Package origin controls are used to block or allow ingestion or publishing
of new package versions, which protects users from malicious actions known as dependency substitution attacks.
Package version : A version of a package, such as @types/node 12.6.9 . The version number
format and semantics vary for different package formats. For example, npm package versions
must conform to the Semantic Versioning
specification . In CodeArtifact, a package version consists of the version identifier,
metadata at the package version level, and a set of assets.
Upstream repository : One repository is upstream of another when the package versions in
it can be accessed from the repository endpoint of the downstream repository, effectively
merging the contents of the two repositories from the point of view of a client. CodeArtifact
allows creating an upstream relationship between two repositories.
Asset : An individual file stored in CodeArtifact associated with a package version, such as an npm
.tgz file or Maven POM and JAR files.
CodeArtifact supported API operations
AssociateExternalConnection : Adds an existing external
connection to a repository.
CopyPackageVersions : Copies package versions from one
repository to another repository in the same domain.
…
Endpoints 48
- POSTAssociate external connection
/v1/repository/external-connection?domain=string&domain-owner=string&repository=string&external-connection=stringAdds an existing external connection to a repository. One external connection is allowed per repository. A repository can have one or more upstream… - DELETEDisassociate external connection
/v1/repository/external-connection?domain=string&domain-owner=string&repository=string&external-connection=stringRemoves an existing external connection from a repository. - POSTCopy package versions
/v1/package/versions/copy?domain=string&domain-owner=string&source-repository=string&destination-repository=string&format=string&namespace=string&package=stringCopies package versions from one repository to another repository in the same domain. You must specify versions or versionRevisions . You cannot specify both. - GETDescribe domain
/v1/domain?domain=string&domain-owner=stringReturns a DomainDescription object that contains information about the requested domain. - POSTCreate domain
/v1/domain?domain=stringCreates a domain. CodeArtifact domains make it easier to manage multiple repositories across an organization. You can use a domain to apply permissions across… - DELETEDelete domain
/v1/domain?domain=string&domain-owner=stringDeletes a domain. You cannot delete a domain that contains repositories. If you want to delete a domain with repositories, first delete its repositories. - GETDescribe package group
/v1/package-group?domain=string&domain-owner=string&package-group=stringReturns a PackageGroupDescription object that contains information about the requested package group. - PUTUpdate package group
/v1/package-group?domain=string&domain-owner=stringUpdates a package group. This API cannot be used to update a package group's origin configuration or pattern. To update a package group's origin… - POSTCreate package group
/v1/package-group?domain=string&domain-owner=stringCreates a package group. For more information about creating package groups, including example CLI commands, see Create a package group in the CodeArtifact… - DELETEDelete package group
/v1/package-group?domain=string&domain-owner=string&package-group=stringDeletes a package group. Deleting a package group does not delete packages or package versions associated with the package group. When a package group is… - GETDescribe repository
/v1/repository?domain=string&domain-owner=string&repository=stringReturns a RepositoryDescription object that contains detailed information about the requested repository. - PUTUpdate repository
/v1/repository?domain=string&domain-owner=string&repository=stringUpdate the properties of a repository. - POSTCreate repository
/v1/repository?domain=string&domain-owner=string&repository=stringCreates a repository. - DELETEDelete repository
/v1/repository?domain=string&domain-owner=string&repository=stringDeletes a repository. - GETGet domain permissions policy
/v1/domain/permissions/policy?domain=string&domain-owner=stringReturns the resource policy attached to the specified domain. The policy is a resource-based policy, not an identity-based policy. For more information, see… - PUTPut domain permissions policy
/v1/domain/permissions/policySets a resource policy on a domain that specifies permissions to access it. When you call PutDomainPermissionsPolicy , the resource policy on the domain is… - DELETEDelete domain permissions policy
/v1/domain/permissions/policy?domain=string&domain-owner=string&policy-revision=stringDeletes the resource policy set on a domain. - GETDescribe package
/v1/package?domain=string&domain-owner=string&repository=string&format=string&namespace=string&package=stringReturns a PackageDescription object that contains information about the requested package. - POSTPut package origin configuration
/v1/package?domain=string&domain-owner=string&repository=string&format=string&namespace=string&package=stringSets the package origin configuration for a package. The package origin configuration determines how new versions of a package can be added to a repository.… - DELETEDelete package
/v1/package?domain=string&domain-owner=string&repository=string&format=string&namespace=string&package=stringDeletes a package and all associated package versions. A deleted package cannot be restored. To delete one or more package versions, use the… - POSTDelete package versions
/v1/package/versions/delete?domain=string&domain-owner=string&repository=string&format=string&namespace=string&package=stringDeletes one or more versions of a package. A deleted package version cannot be restored in your repository. If you want to remove a package version from your… - DELETEDelete repository permissions policy
/v1/repository/permissions/policies?domain=string&domain-owner=string&repository=string&policy-revision=stringDeletes the resource policy that is set on a repository. After a resource policy is deleted, the permissions allowed and denied by the deleted policy are… - GETDescribe package version
/v1/package/version?domain=string&domain-owner=string&repository=string&format=string&namespace=string&package=string&version=stringReturns a PackageVersionDescription object that contains information about the requested package version. - POSTDispose package versions
/v1/package/versions/dispose?domain=string&domain-owner=string&repository=string&format=string&namespace=string&package=stringDeletes the assets in package versions and sets the package versions' status to Disposed . A disposed package version cannot be restored in your repository… - GETGet associated package group
/v1/get-associated-package-group?domain=string&domain-owner=string&format=string&namespace=string&package=stringReturns the most closely associated package group to the specified package. This API does not require that the package exist in any repository in the domain.… - POSTGet authorization token
/v1/authorization-token?domain=string&domain-owner=string&duration=0Generates a temporary authorization token for accessing repositories in the domain. This API requires the codeartifact:GetAuthorizationToken and… - GETGet package version asset
/v1/package/version/asset?domain=string&domain-owner=string&repository=string&format=string&namespace=string&package=string&version=string&asset=string&revision=stringReturns an asset (or file) that is in a package. For example, for a Maven package version, use GetPackageVersionAsset to download a JAR file, a POM file, or… - GETGet package version readme
/v1/package/version/readme?domain=string&domain-owner=string&repository=string&format=string&namespace=string&package=string&version=stringGets the readme file or descriptive text for a package version. The returned text might contain formatting. For example, it might contain formatting for… - GETGet repository endpoint
/v1/repository/endpoint?domain=string&domain-owner=string&repository=string&format=string&endpointType=stringReturns the endpoint of a repository for a specific package format. A repository has one endpoint for each package format: cargo generic maven npm nuget pypi… - GETGet repository permissions policy
/v1/repository/permissions/policy?domain=string&domain-owner=string&repository=stringReturns the resource policy that is set on a repository. - PUTPut repository permissions policy
/v1/repository/permissions/policy?domain=string&domain-owner=string&repository=stringSets the resource policy on a repository that specifies permissions to access it. When you call PutRepositoryPermissionsPolicy , the resource policy on the… - GETList allowed repositories for group
/v1/package-group-allowed-repositories?domain=string&domain-owner=string&package-group=string&originRestrictionType=string&max-results=0&next-token=stringLists the repositories in the added repositories list of the specified restriction type for a package group. For more information about restriction types and… - GETList associated packages
/v1/list-associated-packages?domain=string&domain-owner=string&package-group=string&max-results=0&next-token=string&preview=trueReturns a list of packages associated with the requested package group. For information package group association and matching, see Package group definition… - POSTList domains
/v1/domainsReturns a list of DomainSummary objects for all domains owned by the Amazon Web Services account that makes this call. Each returned DomainSummary object… - POSTList package groups
/v1/package-groups?domain=string&domain-owner=string&max-results=0&next-token=string&prefix=stringReturns a list of package groups in the requested domain. - POSTList package version assets
/v1/package/version/assets?domain=string&domain-owner=string&repository=string&format=string&namespace=string&package=string&version=string&max-results=0&next-token=stringReturns a list of AssetSummary objects for assets in a package version. - POSTList package version dependencies
/v1/package/version/dependencies?domain=string&domain-owner=string&repository=string&format=string&namespace=string&package=string&version=string&next-token=stringReturns the direct dependencies for a package version. The dependencies are returned as PackageDependency objects. CodeArtifact extracts the dependencies for… - POSTList package versions
/v1/package/versions?domain=string&domain-owner=string&repository=string&format=string&namespace=string&package=string&status=string&sortBy=string&max-results=0&next-token=string&originType=stringReturns a list of PackageVersionSummary objects for package versions in a repository that match the request parameters. Package versions of all statuses will… - POSTList packages
/v1/packages?domain=string&domain-owner=string&repository=string&format=string&namespace=string&package-prefix=string&max-results=0&next-token=string&publish=string&upstream=stringReturns a list of PackageSummary objects for packages in a repository that match the request parameters. - POSTList repositories
/v1/repositories?repository-prefix=string&max-results=0&next-token=stringReturns a list of RepositorySummary objects. Each RepositorySummary contains information about a repository in the specified Amazon Web Services account and… - POSTList repositories in domain
/v1/domain/repositories?domain=string&domain-owner=string&administrator-account=string&repository-prefix=string&max-results=0&next-token=stringReturns a list of RepositorySummary objects. Each RepositorySummary contains information about a repository in the specified domain and that matches the input… - POSTList sub package groups
/v1/package-groups/sub-groups?domain=string&domain-owner=string&package-group=string&max-results=0&next-token=stringReturns a list of direct children of the specified package group. For information package group hierarchy, see Package group definition syntax and matching… - POSTList tags for resource
/v1/tags?resourceArn=stringGets information about Amazon Web Services tags for a specified Amazon Resource Name (ARN) in CodeArtifact. - POSTPublish package version
/v1/package/version/publish?domain=string&domain-owner=string&repository=string&format=string&namespace=string&package=string&version=stringCreates a new package version containing one or more assets (or files). The unfinished flag can be used to keep the package version in the Unfinished state… - POSTTag resource
/v1/tag?resourceArn=stringAdds or updates tags for a resource in CodeArtifact. - POSTUntag resource
/v1/untag?resourceArn=stringRemoves tags from a resource in CodeArtifact. - PUTUpdate package group origin configuration
/v1/package-group-origin-configuration?domain=string&domain-owner=string&package-group=stringUpdates the package origin configuration for a package group. The package origin configuration determines how new versions of a package can be added to a… - POSTUpdate package versions status
/v1/package/versions/update_status?domain=string&domain-owner=string&repository=string&format=string&namespace=string&package=stringUpdates the status of one or more versions of a package. Using UpdatePackageVersionsStatus , you can update the status of package versions to Archived ,…
API details
- Base URL
https://codeartifact.{region}.amazonaws.com- Authentication
- AWS Signature Version 4 (requests signed with your AWS access key)
- Operations
- 48 operations on 34 pathsPOST 23GET 13DELETE 7PUT 5
- Description format
- AWS Smithy model, API version
2018-09-22 - Links
- Documentation · OpenAPI document
- Listed from
- AWS Smithy API model (aws/api-models-aws) (Apache-2.0)
How to test the CodeArtifact in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the CodeArtifact collection, without the publisher's secrets.
- Add your credentialsThis API uses AWS Signature Version 4 (requests signed with your AWS access key). Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Associate external connection” (POST /v1/repository/external-connection?domain=string&domain-owner=string&repository=string&external-connection=string), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the CodeArtifact?
CodeArtifact is a fully managed artifact repository compatible with language-native package managers and build tools such as npm, Apache Maven, pip, and… It is listed under Developer tools and has 48 endpoints.
Who publishes the CodeArtifact?
It is listed from Amazon Web Services, Inc.'s public API description (an OpenAPI document), not published by Amazon Web Services, Inc. on Swastik Codes. Anyone who controls amazonaws.com can claim the profile by adding a DNS TXT record.
What is the base URL of the CodeArtifact?
Requests go to https://codeartifact.{region}.amazonaws.com. Endpoint paths are added to this base URL.
How do I authenticate with the CodeArtifact?
With AWS Signature Version 4 (requests signed with your AWS access key).
How many endpoints does the CodeArtifact have?
48 operations on 34 paths (23 POST, 13 GET, 7 DELETE, 5 PUT).
Is forking the CodeArtifact free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.