Preview detaching an agency
What detaching the agency from your company would end, with the names of your own sites and environments. Nothing is changed. Any member of your company may read it.
Path parameters
The id of an agency your company is a client of, as GET /company/agencies lists it. Digits only. At least 1.
Returns
200 What the detach would end.
Fields of the 200 answer
At least 1.
What detaching a link ends. A client reads the names of its own sites and environments; an agency reads counts only.
Fields
Fields
Allowances the agency's people added that belong to the client. They stay; review them.
The agency's own firewall allowances that stop applying to the client's sites.
The client's sites the agency manages. They go back to the client.
Fields
Their names. Only for the client.
The client's environments that deploy through one of the agency's deployment connections. Each needs a new connection before its next deployment.
Fields
The environments, by name. Only for the client.
Fields of each item
At least 1.
Environments that are counted but not named. Only for the client.
Who is asking, the client or the agency.
clientagencySSH keys the agency's people added, which are removed.
Fields
The same effects as sentences.
Subscriptions of the agency's people to the client's tickets, which end.
Fields
If it is refused
| Status | Reason | What to do |
|---|---|---|
401 | none | Send a valid token as Authorization: Bearer <token>. |
403 | company_unavailable | Your company is unavailable. |
403 | forbidden | The person is not allowed to do this. |
403 | scope_required | Use a token with the scope named in scope. |
404 | none | Check the id. You see only what your account can reach. |
429 | rate_limited | Wait 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/company/agencies/1180/detach-preview \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json"use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->get('https://manage.corefinity.com/api/company/agencies/1180/detach-preview');
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/company/agencies/1180/detach-preview', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
},
});
// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);import os
import requests
res = requests.get(
"https://manage.corefinity.com/api/company/agencies/1180/detach-preview",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
)
data = res.json() if res.content else None{
"agency_id": 1180,
"effects": {
"firewall": {
"stay_for_review": 0,
"stop_applying": 0
},
"managed_sites": {
"count": 0,
"names": []
},
"repositories": {
"count": 1,
"environments": [
{
"id": 1311,
"name": "Production"
}
],
"other_environments": 0
},
"side": "client",
"ssh_keys": {
"count": 0
},
"summary": [
"The agency's people lose access to your sites, tickets and billing at once.",
"1 environment deploys through the agency's deployment connections. It will need a new deployment connection before its next deployment.",
"Linking the agency again later does not bring back removed keys, repositories or subscriptions."
],
"ticket_subscriptions": {
"count": 0
}
}
}{
"message": "Unauthenticated."
}{
"code": "company_unavailable",
"message": "Your company is unavailable.",
"reason": "company_unavailable"
}{
"message": "Not found."
}{
"code": "rate_limited",
"message": "Too many requests. Try again in 60 seconds.",
"reason": "rate_limited",
"retry_after_seconds": 60
}