CorefinityCorefinityDocs
Open the Control PanelControl Panel
Deployment templates · 1 of 15

List a company's registry secrets

Answers the credentials for private npm and Composer registries that the company's environments use in their builds, unless an environment has a credential of its own for the same registry. A token or a username is never part of any answer.

GET/api/corestack/companies/{company}/deploy-secrets

Path parameters

companyintegerRequired

The id of a company you belong to or manage. Digits only. At least 1.

Returns

200 The company's registry secrets.

Fields of the 200 answer
can_sharebooleanRequired
dataarray of objectsRequired
Fields of each item
auth_typestring or nullRequired
http-basicbearergithub-oauthgitlab-tokennull
idintegerRequired
kindstringRequired
npmcomposer
labelstringRequired
last4string or nullRequired

The last four characters of the token. Null for a token shorter than 12 characters.

last_used_atstring or nullRequired
registrystringRequired

An npm registry's HTTPS URL, with one trailing slash; a Composer registry's host. Both in lower case.

scopestringRequired

The npm scope the credential is for. An empty string for the default registry and for Composer.

shared_with_managedbooleanRequired
used_byobjectRequired
Fields
environmentsintegerRequired
overridden_onintegerRequired

Environments that have a credential of their own for this registry.

verified_atstring or nullRequired
verificationobject

What the registry answered. Present only when the request sent verify true.

Fields
idintegerRequired
messagestringRequired
verifiedbooleanRequired
verified_atstring or nullRequired

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
422invalidFix the field named in field; errors says why.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl https://manage.corefinity.com/api/corestack/companies/1204/deploy-secrets \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "can_share": true,
  "data": [
    {
      "auth_type": "bearer",
      "id": 318,
      "kind": "composer",
      "label": "Example packages",
      "last4": "oken",
      "last_used_at": null,
      "registry": "repo.example.com",
      "scope": "",
      "shared_with_managed": false,
      "used_by": {
        "environments": 1,
        "overridden_on": 0
      },
      "verified_at": null
    }
  ]
}
Try it
Held in this tab's memory only. Never stored or sent to us.

Use a token with only the read scope. How to make one

Was this helpful?
Open in ClaudeOpen in ChatGPT