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

Updates an API version by providing an update to the API description.

New in API Platform Version: 8.1

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

This topic includes the following sections:

HTTP Method

PUT

Back to top

URL

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

Back to top

Sample Request

The example below shows a request to modify the design for the specified API version.

Request URL

https://{hostname}/api/apis/versions/4635e7cf-7c19-48bc-aaa1-4afc8dccaeee.acmepaymentscorp/design

Sample request headers

PUT /api/apis/versions/4635e7cf-7c19-48bc-aaa1-4afc8dccaeee.acmepaymentscorp/design HTTP/1.1
Host: {hostname}
Accept: application/vnd.soa.v81+json, */*; q=0.01
Content-Type: application/vnd.soa.v81+json
X-Csrf-Token_{tenant}: {TokenID}

Sample request body

{"DLContent":"{\"tags\":[],\"swagger\":\"2.0\",\"info\":{\"title\":\"Crest\",\"version\":\"v1\"},\"host
\":\"api11192live.acmepaymentscorp.com\",\"basePath\":\"/\",\"schemes\":[\"http\",\"http\"
,\"http\"],\"paths\":{\"/{db}/{collection}\":{\"get\":{\"parameters\":[{\"required\":false,\"allowEmptyValue
\":\"false\",\"in\":\"query\",\"name\":\"filter\",\"description\":\"To query\",\"type\":\"string\"},
{\"required\":false,\"allowEmptyValue\":\"false\",\"in\":\"query\",\"name\":\"query\",\"description\"
:\"query collection\",\"type\":\"string\"},{\"required\":false,\"allowEmptyValue\":\"false\",\"in\":
\"query\",\"name\":\"limit\",\"description\":\"Adds limit on row results\",\"type\":\"integer\"},{\"required
\":false,\"allowEmptyValue\":\"false\",\"in\":\"query\",\"name\":\"skip\",\"description\":\"To Skip\"
,\"type\":\"integer\"},{\"required\":true,\"allowEmptyValue\":\"false\",\"in\":\"path\",\"name\":\"collection
\",\"type\":\"string\"},{\"required\":false,\"allowEmptyValue\":\"false\",\"in\":\"query\",\"name\":
\"filter_count\",\"description\":\"To count a collection\",\"type\":\"string\"}],\"produces\":[\"application
/xml\",\"application/json\"],\"tags\":[\"svc_4635e7cf-7c19-48bc-aaa1-4afc8dccaeee.acmepaymentscorp.live.virtual
\"],\"operationId\":\"GET collection\",\"responses\":{\"200\":{\"schema\":{},\"description\":\"\"}},
\"deprecated\":false,\"description\":\"Gets a collection\",\"summary\":\"Gets a collection\"},\"post
\":{\"parameters\":[{\"required\":true,\"allowEmptyValue\":\"false\",\"in\":\"path\",\"name\":\"collection
\",\"type\":\"string\"},{\"required\":false,\"allowEmptyValue\":\"false\",\"in\":\"body\",\"name\":\"body
\"}],\"consumes\":[\"application/json\"],\"tags\":[\"svc_4635e7cf-7c19-48bc-aaa1-4afc8dccaeee.acmepaymentscorp
.live.virtual\"],\"operationId\":\"POST_db_collection_\",\"responses\":{\"201\":{\"schema\":{},\"description
\":\"Succesfully created a new resource\"}},\"deprecated\":false}},\"/{db}/{collection}/{id}\":{\"get
\":{\"parameters\":[{\"required\":true,\"allowEmptyValue\":\"false\",\"in\":\"path\",\"name\":\"collection
\",\"type\":\"string\"},{\"required\":true,\"allowEmptyValue\":\"false\",\"in\":\"path\",\"name\":\"id
\",\"type\":\"string\"}],\"produces\":[\"application/json\"],\"tags\":[\"svc_4635e7cf-7c19-48bc-aaa1-4afc8dccaeee
.acmepaymentscorp.live.virtual\"],\"operationId\":\"GET_db_collection_id_\",\"responses\":{\"200\":{
\"schema\":{},\"description\":\"\"}},\"deprecated\":false},\"put\":{\"parameters\":[{\"required\":true
,\"allowEmptyValue\":\"false\",\"in\":\"path\",\"name\":\"collection\",\"type\":\"string\"},{\"required
\":true,\"allowEmptyValue\":\"false\",\"in\":\"path\",\"name\":\"id\",\"type\":\"string\"}],\"produces
\":[\"application/json\"],\"tags\":[\"svc_4635e7cf-7c19-48bc-aaa1-4afc8dccaeee.acmepaymentscorp.live.virtual
\"],\"operationId\":\"PUT_db_collection_id_\",\"responses\":{\"204\":{\"schema\":{},\"description
\":\"\"}},\"deprecated\":false},\"delete\":{\"parameters\":[{\"required\":true,\"allowEmptyValue\":\"false
\",\"in\":\"path\",\"name\":\"collection\",\"type\":\"string\"},{\"required\":true,\"allowEmptyValue
\":\"false\",\"in\":\"path\",\"name\":\"id\",\"type\":\"string\"}],\"produces\":[\"application/json\"
],\"tags\":[\"svc_4635e7cf-7c19-48bc-aaa1-4afc8dccaeee.acmepaymentscorp.live.virtual\"],\"operationId\":\"DELETE_db_collection_id_
\",\"responses\":{\"204\":{\"schema\":{},\"description\":\"\"}},\"deprecated\":false}}},\"definitions
\":{},\"securityDefinitions\":{}}"}

Back to top

Request Headers

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

Header Description
Accept application/json, application/vnd.soa.v81+json
Content-Type

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

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

Back to top

Request Parameters

Parameter Parm Type Data Type Required Description
APIVersionID Path String Required The unique ID for a specific API version.
DLDescriptor Body DLDescriptor Required

Contains information about the API description provided to define or update an API using an API description document such as a Swagger 2.0, RAML, WADL, or WSDL document.

The DLDescriptor can either be a Dropbox ID or the API definition content. If the uploaded file is a ZIP file, it could include FileName and/or Service Name in the ServiceDocumentReference parameter.

Back to top

Response

If successful, this operation returns HTTP status code 200, with information about the updated API including the API version.

Back to top

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers: application/vnd.soa.v81+json

HTTP/1.1 200 OK
Date: Fri, 04 Mar 2016 02:08:42 GMT
Content-Type: application/vnd.soa.v81+json

Sample response body #1: application/vnd.soa.v81+json

{
  "APIID" : "29967a71-0c1a-4433-bc03-87bf7a9b1696.acmepaymentscorp",
  "Name" : "Crest",
  "Visibility" : "Public",
  "LatestVersionID" : "4635e7cf-7c19-48bc-aaa1-4afc8dccaeee.acmepaymentscorp",
  "RatingSummary" : {
    "Five" : 0,
    "Four" : 0,
    "Three" : 0,
    "Two" : 0,
    "One" : 0
  },
  "APIVersion" : {
    "APIVersionID" : "4635e7cf-7c19-48bc-aaa1-4afc8dccaeee.acmepaymentscorp",
    "APIID" : "29967a71-0c1a-4433-bc03-87bf7a9b1696.acmepaymentscorp",
    "Name" : "v1",
    "Environment" : "default",
    "Visibility" : "Public",
    "Created" : "2016-03-04T02:00:51Z",
    "Updated" : "2016-03-04T02:00:51Z",
    "State" : "com.soa.api.state.open",
    "ProductionEndpointAccessAutoApproved" : false,
    "SandboxEndpointAccessAutoApproved" : true,
    "RatingSummary" : {
      "Five" : 0,
      "Four" : 0,
      "Three" : 0,
      "Two" : 0,
      "One" : 0
    },
    "SandboxAnonymousAccessAllowed" : false,
    "ProductionAnonymousAccessAllowed" : false,
    "ResourceLevelPermissionsSupported" : false,
    "APIOwnedImplementations" : true,
    "ProductionServiceKey" : "uddi:ec5adc1c-e1ac-11e5-b291-974f3487303d"
  },
  "AdminGroupID" : "apiadmin-29967a71-0c1a-4433-bc03-87bf7a9b1696.acmepaymentscorp",
  "Created" : "2016-03-04T02:00:51Z",
  "Updated" : "2016-03-04T02:00:51Z"
}

Sample response body #2: application/vnd.soa.v81+json

Updates the design by uploading an updated API description document to the Dropbox.

{
  "ServiceDescriptorReference":{
    "ServiceName":"Swagger_Petstore",
    "FileName":"swagger_petstore.json",
    "DropboxFileId":1023
  }
}

Back to top

Response Headers

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

Header Description
Content-Type application/json, application/vnd.soa.v81+json

Back to top

Response Body

Name Type Description
API API Includes information about an API.

Back to top

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

More information about Akana API Platform API error messages.

Back to top

Related Topics