GET /api/tenants/{FedMemberID}/{environment}/promotion/context

Returns information about the dependencies that exist in the specified environment, such as APIs, services, policies, scripts, processes, resources, and businesses.

In a scenario where information cannot be transferred electronically between tenants—for example, for security reasons—a user would need to invoke this operation to retrieve a document, which is then passed to Lifecycle Coordinator. You would perform these two steps:

  1. Call GET /api/tenants/{FedMemberID}/{environment}/promotion/context (this operation) which returns an EnvironmentContext object.
  2. Pass the response EnvironmentContext object to the Topology API to update the environment context (PUT /{topology-name}/environments/{environment-name}/context). Go to the generated REST API documentation for your version (see REST API Documentation) and review the Topology API generated documentation.

For more information, see Support for Decoupled Environments in a Topology (Lifecycle Coordinator Promotion Guide).

Authorization Roles/Permissions: Must have Modify permission for the tenant; Site Admin

This topic includes the following sections:

HTTP Method

GET

URL

https://{hostname}/api/tenants/{TenantFedMemberID}/{environment}/promotion/context

Sample Request

The example below shows a request for information about the resources and dependencies for tenant3 in the production environment.

Sample Request URL

https://{hostname}/api/tenants/tenant3/production/promotion/context?includeServiceInfo=true&includeAPIInfo=true

Sample request headers

Accept: application/json
X-Csrf-Token_acmepaymentscorp: TokenID%3D8ed70a13-8469-11e8-b37a-b155e4eabeb8%2CexpirationTime%3D153...

Sample request body

Not applicable.

Request Headers

For general information on request header values, refer to HTTP Request Headers.

HeaderDescription
Acceptapplication/json,application/xml
CookieAtmoAuthToken_{fedmemberid}={cookie value, which usually starts with TokenID}—The platform cookie. This is the Akana API Platform authorization token, and must be sent with every API request that requires login. For more information and an example, see Session cookies.
X-Csrf-Token_{fedmemberID}The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform. By default, the CSRF header is not required for GET operations and is required for all others, with a few exceptions relating to user login.

Request Parameters

ParameterParm TypeData TypeRequiredDescription
FedmemberIDPathStringRequired Unique ID for a specific tenant. Same as TenantID.
EnvironmentPathStringRequiredThe environment, within the lifecycle topology, for which information is requested; for example, Dev, Test, Production.
includeServiceInfoQueryBooleanOptionalIndicates whether services should be included in the response. Default: false.
includeAPIInfoQueryBooleanOptionalIndicates whether APIs should be included in the response. Default: false.

Response

If successful, this operation returns HTTP status code 200, with information about the resources and dependencies in the specified environment.

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers: application/json

Status Code: 200 OK
Content-Type: application/json

Sample response body: application/json

{
  "properties":[
  ],
  "policies":[
    {
      "policyId":"Tenant3-AtmosphereApplicationSecurityPolicy",
      "policyName":"AtmosphereApplicationSecurityPolicy",
      "organizationId":"uddi:soa.com:atmosphere:tenant:tenant3",
      "policyType":"Operational Policy",
      "policySubType":"policy.apisec"
    },
    {
      "policyId":"Tenant3-BasicAuditing",
      "policyName":"BasicAuditing",
      "organizationId":"uddi:soa.com:atmosphere:tenant:tenant3",
      "policyType":"Operational Policy",
      "policySubType":"policy.auditservice"
    },
    {
      "policyId":"urn:uuid:4a8bdd24-c104-11e8-9fdf-f6bb767bad96",
      "policyName":"CommonAuditing",
      "organizationId":"uddi:soa.com:atmosphere:tenant:tenant3",
      "policyType":"Operational Policy",
      "policySubType":"policy.auditxmlmessage"
    },
    {
      "policyId":"Tenant3-CORSAllowAll",
      "policyName":"CORSAllowAll",
      "organizationId":"uddi:soa.com:atmosphere:tenant:tenant3",
      "policyType":"Operational Policy",
      "policySubType":"policy.cors"
    },
    {
      "policyId":"Tenant3-DetailedAuditing",
      "policyName":"DetailedAuditing",
      "organizationId":"uddi:soa.com:atmosphere:tenant:tenant3",
      "policyType":"Operational Policy",
      "policySubType":"policy.auditservice"
    },
    {
      "policyId":"Tenant3-OAuthSecurity",
      "policyName":"OAuthSecurity",
      "organizationId":"uddi:soa.com:atmosphere:tenant:tenant3",
      "policyType":"Operational Policy",
      "policySubType":"policy.oauth"
    }
  ],
  "resources":[
  ],
  "services":[
    {
      "serviceId":"uddi:dfd219f3-c038-11e8-a2a4-8705fbac063e",
      "serviceName":"Local_Design",
      "serviceQname":"{Local_0.0.0}Local",
      "organizationId":"uddi:dfbbd2d2-c038-11e8-a2a4-8705fbac063e",
      "virtual":false,
      "lastUpdated":1537821119000
    },
    {
      "serviceId":"uddi:e06188c8-c038-11e8-a2a4-8705fbac063e",
      "serviceName":"Local_v1_Live",
      "serviceQname":"{Local_0.0.0}svc_8f78770b-886a-4de6-b0f6-131b4967ad57.tenant3.live",
      "organizationId":"uddi:dfbbd2d2-c038-11e8-a2a4-8705fbac063e",
      "virtual":true,
      "lastUpdated":1537821119000
    },
    {
      "serviceId":"uddi:e04240ed-c038-11e8-a2a4-8705fbac063e",
      "serviceName":"Local_v1_Live_Target",
      "serviceQname":"{Local_0.0.0}svc_8f78770b-886a-4de6-b0f6-131b4967ad57.tenant3.live.target",
      "organizationId":"uddi:dfbbd2d2-c038-11e8-a2a4-8705fbac063e",
      "virtual":false,
      "lastUpdated":1537821119000
    },
    {
      "serviceId":"uddi:bd425d60-c5ac-11e8-8c5d-b89f19d7a05f",
      "serviceName":"Swagger_Petstore_Design",
      "serviceQname":"{Swagger_Petstore_1.0.0}Swagger_Petstore",
      "organizationId":"uddi:bd15f62f-c5ac-11e8-8c5d-b89f19d7a05f",
      "virtual":false,
      "lastUpdated":1538421231000
    },
    {
      "serviceId":"uddi:be5e2dfa-c5ac-11e8-8c5d-b89f19d7a05f",
      "serviceName":"Swagger_Petstore_v1_Live",
      "serviceQname":"{Swagger_Petstore_1.0.0}svc_9aa5ec0b-75bc-4619-a7c8-18d22adc25e3.tenant1.live",
      "organizationId":"uddi:bd15f62f-c5ac-11e8-8c5d-b89f19d7a05f",
      "virtual":true,
      "lastUpdated":1538421223000
    },
    {
      "serviceId":"uddi:bddd176c-c5ac-11e8-8c5d-b89f19d7a05f",
      "serviceName":"Swagger_Petstore_v1_Live_Target",
      "serviceQname":"{Swagger_Petstore_1.0.0}svc_9aa5ec0b-75bc-4619-a7c8-18d22adc25e3.tenant1.live.target",
      "organizationId":"uddi:bd15f62f-c5ac-11e8-8c5d-b89f19d7a05f",
      "virtual":false,
      "lastUpdated":1538421228000
    },
    {
      "serviceId":"uddi:69cea433-c104-11e8-b402-bca640698897",
      "serviceName":"TestDecoupled9_Design",
      "serviceQname":"{TestDecoupled9_0.0.0}TestDecoupled9",
      "organizationId":"uddi:69b21b82-c104-11e8-b402-bca640698897",
      "virtual":false,
      "lastUpdated":1537908774000
    },
    {
      "serviceId":"uddi:6a7bd438-c104-11e8-b402-bca640698897",
      "serviceName":"TestDecoupled9_v1_Live",
      "serviceQname":"{TestDecoupled9_0.0.0}svc_ffc4ba19-c5cb-4e9d-ae39-78ab6e0efc84.tenant1.live",
      "organizationId":"uddi:69b21b82-c104-11e8-b402-bca640698897",
      "virtual":true,
      "lastUpdated":1537908774000
    },
    {
      "serviceId":"uddi:6a5bc90d-c104-11e8-b402-bca640698897",
      "serviceName":"TestDecoupled9_v1_Live_Target",
      "serviceQname":"{TestDecoupled9_0.0.0}svc_ffc4ba19-c5cb-4e9d-ae39-78ab6e0efc84.tenant1.live.target",
      "organizationId":"uddi:69b21b82-c104-11e8-b402-bca640698897",
      "virtual":false,
      "lastUpdated":1537908774000
    },
    {
      "serviceId":"uddi:f4c380d2-c587-11e8-b40d-f49544e3b9e8",
      "serviceName":"Another2_Design",
      "serviceQname":"{Another2_0.0.0}Another2",
      "organizationId":"uddi:f498ee61-c587-11e8-b40d-f49544e3b9e8",
      "virtual":false,
      "lastUpdated":1538405090000
    },
    {
      "serviceId":"uddi:f59e0268-c587-11e8-b40d-f49544e3b9e8",
      "serviceName":"Another2_v1_Live",
      "serviceQname":"{Another2_0.0.0}svc_92cd8fc6-b49a-4071-a027-ddf12f4be03e.tenant1.live",
      "organizationId":"uddi:f498ee61-c587-11e8-b40d-f49544e3b9e8",
      "virtual":true,
      "lastUpdated":1538405091000
    },
    {
      "serviceId":"uddi:f55f99cd-c587-11e8-b40d-f49544e3b9e8",
      "serviceName":"Another2_v1_Live_Target",
      "serviceQname":"{Another2_0.0.0}svc_92cd8fc6-b49a-4071-a027-ddf12f4be03e.tenant1.live.target",
      "organizationId":"uddi:f498ee61-c587-11e8-b40d-f49544e3b9e8",
      "virtual":false,
      "lastUpdated":1538405091000
    }
  ],
  "apiVersions":[
    {
      "apiVersionId":"8f78770b-886a-4de6-b0f6-131b4967ad57.tenant3",
      "apiId":"8dd07cc8-5a98-4f6d-a798-a2559262f602.tenant3",
      "apiName":"Local",
      "apiVersion":"v1",
      "businessId":"tenantbusiness.tenant3",
      "organizationId":"uddi:dfbbd2d2-c038-11e8-a2a4-8705fbac063e",
      "lastUpdated":1537821115000
    },
    {
      "apiVersionId":"ffc4ba19-c5cb-4e9d-ae39-78ab6e0efc84.tenant3",
      "apiId":"3a5b365b-0970-4bc2-9e4e-1f342db39477.tenant3",
      "apiName":"TestDecoupled9",
      "apiVersion":"v1",
      "businessId":"tenantbusiness.tenant3",
      "organizationId":"uddi:69b21b82-c104-11e8-b402-bca640698897",
      "lastUpdated":1537908774000
    },
    {
      "apiVersionId":"92cd8fc6-b49a-4071-a027-ddf12f4be03e.tenant3",
      "apiId":"671e8f3e-5439-417c-bf1c-472afa99cfde.tenant3",
      "apiName":"Another2",
      "apiVersion":"v1",
      "businessId":"tenantbusiness.tenant3",
      "organizationId":"uddi:f498ee61-c587-11e8-b40d-f49544e3b9e8",
      "lastUpdated":1538405090000
    },
    {
      "apiVersionId":"9aa5ec0b-75bc-4619-a7c8-18d22adc25e3.tenant3",
      "apiId":"04232f09-b2be-46e0-b666-2667e6f6eada.tenant3",
      "apiName":"Swagger_Petstore",
      "apiVersion":"v1",
      "businessId":"tenantbusiness.tenant3",
      "organizationId":"uddi:bd15f62f-c5ac-11e8-8c5d-b89f19d7a05f",
      "lastUpdated":1538421219000
    }
  ],
  "businesses":[
    {
      "name":"Tenant - Tenant3",
      "id":"tenantbusiness.tenant3",
      "organizationId":"uddi:soa.com:atmosphere:tenant:tenant3"
    }
  ],
  "scripts":[
  ],
  "processes":[
  ],
  "links":[
  ]
}

Response Headers

For general information on response header values, refer to HTTP Response Headers.

HeaderDescription
Content-Typeapplication/json,application/xml

Response Body

NameTypeDescription
EnvironmentContextEnvironmentContext

Contains information about the dependencies that exist in the specified environment:

  • properties
  • policies
  • resources
  • services
  • apiVersions
  • businesses
  • scripts
  • processes
  • links

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

ItemValue
401Unauthorized. For example, you would get this response if you didn't include the custom X-Csrf-Token_{fedmemberID} header in the request, when it was required by the platform settings; or if you included an invalid or expired value for this header. You would also get this response for any operation that requires login (almost all) if the login cookie was missing.
500An error occurred processing the call.

More information about Akana API Platform API error messages.