PUT /api/apis/versions/{APIVersionID}/autosettings

Adds or updates the auto-connect settings for the specified API version.

Note: The auto-connect settings reference the licenses that you set up for your API when you do scope mapping. When setting up a new API, if your API is using the Licenses feature, assign scopes before defining the auto-connect settings. To assign scopes, use the PUT /api/apis/versions/{APIVersionID}/resources operation.

Authorization Roles/Permissions: Must be logged in. Must have permission to modify the API; an API Admin or Business Admin.

This topic includes the following sections:

HTTP Method

PUT

URL

https://{hostname}/api/apis/versions/{APIVersionID}/autosettings

Sample Request

The example below specifies the auto-connect settings for the specified API version, for both Sandbox and Live implementation includes licenses.

Sample Request URL

https://{hostname}/api/apis/versions/6077b049-58bd-46ab-871d-a99e7b5c26f9.acmepaymentscorp/autosettings

Sample request headers: application/json

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

Sample request body: application/json

{
  "APIVersionAutoConnectDetail":[
    {
      "AutoConnectEnabled":"true",
      "LicenseID":[
        "025de053-9439-4887-bad9-a00f1b001998.acmepaymentscorp",
        "19faa1de-489b-473d-af1a-afa72d7f7b05.acmepaymentscorp",
        "0088f6c6-76fe-46d4-b92b-c511d9314fd5.acmepaymentscorp"
      ],
      "APIVersionID":"261810e3-3fed-4d97-9e84-f924813310f7.acmepaymentscorp",
      "Environment":"Production",
      "Restricted":"true"
    },
    {
      "LicenseID":[
      ],
      "APIVersionID":"261810e3-3fed-4d97-9e84-f924813310f7.acmepaymentscorp",
      "Environment":"Sandbox",
      "Restricted":"true"
    }
  ]
}

Request Headers

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

Header Description
Accept application/json, application/xml, application/vnd.soa.v71+json, application/vnd.soa.v71+xml, application/vnd.soa.v72+json, application/vnd.soa.v72+xml, application/vnd.soa.v80+json, application/vnd.soa.v80+xml, application/vnd.soa.v81+json, application/vnd.soa.v81+xml
Content-Type

Any one of the following media types is valid for the request Content-Type:

application/json or application/xml

application/vnd.soa.v71+json or application/vnd.soa.v71+xml

application/vnd.soa.v72+json or application/vnd.soa.v72+xml

application/vnd.soa.v80+json or application/vnd.soa.v80+xml

application/vnd.soa.v81+json or application/vnd.soa.v81+xml

Cookie AtmoAuthToken_{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

Parameter Parm Type Data Type Required Description
APIVersionID Path String Required The unique ID for a specific API version.
APIVersionAutoConnectDetails Body APIVersionAutoConnectDetails Required Contains information about auto-connect details for one or more environments, for an API version.

Response

If successful, this operation returns HTTP status code 200, with information about the auto-connect settings for the API, including information about any applicable licenses.

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
Expires: Tue, 16 Sep 2014 14:23:34 GMT

Sample response body: application/json

{
  "APIVersionAutoConnectLicenseDetail" : [ {
    "APIVersionID" : "261810e3-3fed-4d97-9e84-f924813310f7.acmepaymentscorp",
    "Environment" : "Production",
    "AutoConnectEnabled" : true,
    "Restricted" : true,
    "License" : [ {
      "LicenseID" : "025de053-9439-4887-bad9-a00f1b001998.acmepaymentscorp",
      "Name" : "Bronze",
      "Description" : "Read-only access at no charge. Both environments, public, approval required.",
      "Visibility" : "Public",
      "SandboxAccessAutoApproved" : false,
      "ProductionAccessAutoApproved" : false,
      "LicenseParts" : {
        "LicensePart" : [ {
          "Name" : "6127f3b7-d274-46fa-abbf-b9a8222c801e",
          "ResourceID" : [ "9cad8c52-49dd-490f-b292-9ecdfdfcfd7e.acmepaymentscorp" ]
        } ]
      },
      "BusinessID" : "tenantbusiness.acmepaymentscorp",
      "Active" : true
    }, {
      "LicenseID" : "19faa1de-489b-473d-af1a-afa72d7f7b05.acmepaymentscorp",
      "Name" : "Beta",
      "Description" : "Access for beta testing, private.",
      "Visibility" : "Limited",
      "SandboxAccessAutoApproved" : false,
      "ProductionAccessAutoApproved" : false,
      "LicenseParts" : {
        "LicensePart" : [ {
          "Name" : "d7898c3d-8211-4235-a0a1-bcc30a58e805",
          "ResourceID" : [ "71501d6e-5eae-45d0-be6b-81876f296d59.acmepaymentscorp" ]
        } ]
      },
      "BusinessID" : "tenantbusiness.acmepaymentscorp",
      "Active" : true
    }, {
      "LicenseID" : "0088f6c6-76fe-46d4-b92b-c511d9314fd5.acmepaymentscorp",
      "Name" : "Gold",
      "Description" : "Full access, monthly fee.",
      "Visibility" : "Public",
      "SandboxAccessAutoApproved" : false,
      "ProductionAccessAutoApproved" : false,
      "LicenseParts" : {
        "LicensePart" : [ {
          "Name" : "b315b8bf-a261-4121-9e4f-c563c557df02",
          "ResourceID" : [ "830de777-d4ab-4042-9fb1-fed35466f24a.acmepaymentscorp" ]
        } ]
      },
      "BusinessID" : "tenantbusiness.acmepaymentscorp",
      "Active" : true
    } ]
  }, {
    "APIVersionID" : "261810e3-3fed-4d97-9e84-f924813310f7.acmepaymentscorp",
    "Environment" : "Sandbox",
    "AutoConnectEnabled" : false,
    "Restricted" : true,
    "License" : [ ]
  } ]
}

Response Headers

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

Header Description
Content-Type application/json, application/xml, application/vnd.soa.v71+json, application/vnd.soa.v71+xml, application/vnd.soa.v72+json, application/vnd.soa.v72+xml, application/vnd.soa.v80+json, application/vnd.soa.v80+xml, application/vnd.soa.v81+json, application/vnd.soa.v81+xml

Response Body

Name Type Description
APIVersionAutoConnectLicenseDetails APIVersionAutoConnectLicenseDetails Contains information about auto-connect details for one or more environments, for an API version.

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.

Item Value
401 Unauthorized. 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.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.