Update API
put
/mobile/tools/1.0/apis/{id}
Overwrites the API metadata.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
string
Required:true
The identifier of the API.
Header Parameters
- If-Match
-
Type:
string
The request completes successfully only if the ETag of the corresponding asset matches the value of this HTTP request header. To force overwrite, pass the value `*`.
Body Parameter
The API representation for PUT requests.
Root Schema : apiUpdate
Type:
object
The API representation for PUT requests.
-
Type:
object
assetUpdateAdditional Properties Allowed:The asset representation for PUT requests. -
Type:
object
apiUpdate-allOf[1]Additional Properties Allowed:
Nested Schema : assetUpdate
Type:
object
The asset representation for PUT requests.
- actionComment
-
Type:
string
- desc
-
Type:
string
Maximum Length:100
- max
-
Type:
boolean
Default Value:false
- name
-
Type:
string
Required:true
Maximum Length:100
Pattern:^[a-zA-Z][a-zA-Z0-9_]*$
- namespace
-
Type:
string
Applicable to APIs and implementations only. This value is null for all other asset types. - title
-
Type:
string
Maximum Length:255
- version
-
Type:
string
Maximum Length:100
Pattern:^[a-zA-Z0-9][\w.]*$
Asset version.
Nested Schema : apiUpdate-allOf[1]
- apiDefn
-
Type:
array
stringArrayAdditional Properties Allowed:Minimum Number of Items:0
An array of string values. - basePath
-
Type:
string
The API base path in the format `/mobile/custom/{apiName}`. This is required to define the API name. - businessObjectsDefn
-
Type:
string
- hasBusinessObjects
-
Type:
boolean
Default Value:false
Indicates whether the API is associated with API Express resources (business objects). - icon
-
Type:
object
iconAdditional Properties Allowed:Information about the icon that's associated with the API or connector. - security
-
Type:
object
apiSecurityAdditional Properties Allowed:The API security for POST and PUT requests.
Nested Schema : stringArray
Nested Schema : icon
Type:
object
Information about the icon that's associated with the API or connector.
- id
-
Type:
string
Required:true
- url
-
Type:
string
Required:true
Nested Schema : apiSecurity
Type:
object
The API security for POST and PUT requests.
- access
-
Type:
object
securityAccessAdditional Properties Allowed:Access details. - endpoints
-
Type:
array
endpointSecurityArrayAdditional Properties Allowed:Minimum Number of Items:0
An array of endpoint security elements. - loginType
-
Allowed Values:
[ "ENTERPRISE", "IDENTITYPROVIDER" ]
If the `required` attribute has a value of `true`, then the default is `ENTERPRISE`. - required
-
Type:
boolean
Required:true
When `true`, either security access or a social identity provider configuration is required.
Nested Schema : securityAccess
Type:
object
Access details.
- all
-
Type:
boolean
- roles
-
Type:
array
stringArrayAdditional Properties Allowed:Minimum Number of Items:0
An array of string values.
Nested Schema : endpointSecurityArray
Type:
array
Minimum Number of Items:
0
An array of endpoint security elements.
-
Type:
object
endpointSecurityAdditional Properties Allowed:The API security for POST and PUT requests.
Nested Schema : endpointSecurity
Type:
object
The API security for POST and PUT requests.
- access
-
Type:
object
securityAccessAdditional Properties Allowed:Access details. - method
-
Type:
string
Required:true
- resource
-
Type:
string
Required:true
Response
Supported Media Types
- application/json
200 Response
The API metadata was updated, and metadata for the new API was returned.
Headers
- ETag
-
Type:
string
The ETag corresponds to the state of the API (that is, the value increments by one on each change operation). You can use this ETag with the `If-Match` HTTP header on a request.
Body
Information about the API (short form) and the RAML-validation result. This information doesn't include the RAML descriptor.
Root Schema : apiCreatedWithRamlValidation
Type:
object
Information about the API (short form) and the RAML-validation result. This information doesn't include the RAML descriptor.
-
Type:
object
apiShortAdditional Properties Allowed:The short API definition representation. -
Type:
object
apiCreatedWithRamlValidation-allOf[1]Additional Properties Allowed:
Nested Schema : apiShort
Type:
object
The short API definition representation.
-
Type:
object
assetGetAdditional Properties Allowed:The asset representation for GET requests. -
Type:
object
apiShort-allOf[1]Additional Properties Allowed:
Nested Schema : apiCreatedWithRamlValidation-allOf[1]
- ramlValidationReport
-
Type:
object
ramlValidationReportAdditional Properties Allowed:The result of the RAML validation. - security
-
Type:
object
apiSecurityAdditional Properties Allowed:The API security for POST and PUT requests.
Nested Schema : assetGet
Type:
object
The asset representation for GET requests.
-
Type:
object
assetUpdateAdditional Properties Allowed:The asset representation for PUT requests. -
Type:
object
assetIdEtagAdditional Properties Allowed:The asset ID and entity tag (ETag) values. -
Type:
object
trashAdditional Properties Allowed:Indicator of whether the asset is in the trash. -
Type:
object
assetGet-allOf[3]Additional Properties Allowed:
Nested Schema : apiShort-allOf[1]
- basePath
-
Type:
string
The API base path in the format `/mobile/custom/{apiName}`. - hasBusinessObjects
-
Type:
boolean
Default Value:false
Indicates whether the API is associated with API Express resources (business objects). - icon
-
Type:
object
iconAdditional Properties Allowed:Information about the icon that's associated with the API or connector.
Nested Schema : assetUpdate
Type:
object
The asset representation for PUT requests.
- actionComment
-
Type:
string
- desc
-
Type:
string
Maximum Length:100
- max
-
Type:
boolean
Default Value:false
- name
-
Type:
string
Required:true
Maximum Length:100
Pattern:^[a-zA-Z][a-zA-Z0-9_]*$
- namespace
-
Type:
string
Applicable to APIs and implementations only. This value is null for all other asset types. - title
-
Type:
string
Maximum Length:255
- version
-
Type:
string
Maximum Length:100
Pattern:^[a-zA-Z0-9][\w.]*$
Asset version.
Nested Schema : assetIdEtag
Type:
object
The asset ID and entity tag (ETag) values.
- etag
-
Type:
string
The asset entity tag (ETag) value, which you can use to detect concurrent modification. - id
-
Type:
string
Required:true
Nested Schema : trash
Nested Schema : assetGet-allOf[3]
- createdOn
-
Type:
string
- deletedBy
-
Type:
string
- deletedOn
-
Type:
string
- links
-
Type:
array
entityLinksArrayAdditional Properties Allowed:Minimum Number of Items:0
An array of links for an entity's metadata. - modifiedBy
-
Type:
string
- modifiedOn
-
Type:
string
- published
-
Type:
boolean
An asset draft or published status representation.
Nested Schema : entityLinksArray
Nested Schema : items
Type:
object
Link to the entity's metadata.
- href
-
Type:
string
Required:true
Link value. - rel
-
Required:
true
Allowed Values:[ "self", "canonical" ]
Link type.
Nested Schema : icon
Type:
object
Information about the icon that's associated with the API or connector.
- id
-
Type:
string
Required:true
- url
-
Type:
string
Required:true
Nested Schema : ramlValidationReport
Type:
object
The result of the RAML validation.
- valid
-
Type:
boolean
Required:true
- validationResults
-
Type:
array
validationResultsAdditional Properties Allowed:Minimum Number of Items:0
Nested Schema : apiSecurity
Type:
object
The API security for POST and PUT requests.
- access
-
Type:
object
securityAccessAdditional Properties Allowed:Access details. - endpoints
-
Type:
array
endpointSecurityArrayAdditional Properties Allowed:Minimum Number of Items:0
An array of endpoint security elements. - loginType
-
Allowed Values:
[ "ENTERPRISE", "IDENTITYPROVIDER" ]
If the `required` attribute has a value of `true`, then the default is `ENTERPRISE`. - required
-
Type:
boolean
Required:true
When `true`, either security access or a social identity provider configuration is required.
Nested Schema : validationResults
Nested Schema : securityAccess
Type:
object
Access details.
- all
-
Type:
boolean
- roles
-
Type:
array
stringArrayAdditional Properties Allowed:Minimum Number of Items:0
An array of string values.
Nested Schema : endpointSecurityArray
Type:
array
Minimum Number of Items:
0
An array of endpoint security elements.
-
Type:
object
endpointSecurityAdditional Properties Allowed:The API security for POST and PUT requests.
Nested Schema : stringArray
Nested Schema : endpointSecurity
Type:
object
The API security for POST and PUT requests.
- access
-
Type:
object
securityAccessAdditional Properties Allowed:Access details. - method
-
Type:
string
Required:true
- resource
-
Type:
string
Required:true
400 Response
Missing API specification.
Body
Root Schema : error
Type:
object
- detail
-
Type:
string
Required:true
Message that provides the error details. - o:ecid
-
Type:
string
Required:true
Execution context ID, which is a unique identifier to correlate events or requests that are associated with the same transaction across several components. - o:errorCode
-
Type:
string
Required:true
The service's error code. - o:errorDetails
-
Type:
object
errorDetailsAdditional Properties Allowed: - o:errorPath
-
Type:
string
Required:true
The relative point in the API path where the error occurred. - status
-
Type:
integer
(int64
)Required:true
HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details. - title
-
Type:
string
Required:true
Summary of the problem. - type
-
Type:
string
Required:true
The URI to the link that provides details about the HTTP status code.
Nested Schema : errorDetails
Type:
object
- detail
-
Type:
string
Required:true
- o:errorDetails
-
Type:
object
errorDetailsAdditional Properties Allowed: - title
-
Type:
string
Required:true
Summary of the problem. - type
-
Type:
string
Required:true
The URI to the link that provides details about the HTTP status code.
409 Response
The update modified either the name or the version, and an API with the same name and version as the updated API already exists.
Body
Root Schema : error
Type:
object
- detail
-
Type:
string
Required:true
Message that provides the error details. - o:ecid
-
Type:
string
Required:true
Execution context ID, which is a unique identifier to correlate events or requests that are associated with the same transaction across several components. - o:errorCode
-
Type:
string
Required:true
The service's error code. - o:errorDetails
-
Type:
object
errorDetailsAdditional Properties Allowed: - o:errorPath
-
Type:
string
Required:true
The relative point in the API path where the error occurred. - status
-
Type:
integer
(int64
)Required:true
HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details. - title
-
Type:
string
Required:true
Summary of the problem. - type
-
Type:
string
Required:true
The URI to the link that provides details about the HTTP status code.
Nested Schema : errorDetails
Type:
object
- detail
-
Type:
string
Required:true
- o:errorDetails
-
Type:
object
errorDetailsAdditional Properties Allowed: - title
-
Type:
string
Required:true
Summary of the problem. - type
-
Type:
string
Required:true
The URI to the link that provides details about the HTTP status code.
412 Response
The operation failed based on the `If-Match` condition. Typically, this is the result of concurrent modification detection. It also can be the result of improper values specified in the request headers.
Body
Root Schema : error
Type:
object
- detail
-
Type:
string
Required:true
Message that provides the error details. - o:ecid
-
Type:
string
Required:true
Execution context ID, which is a unique identifier to correlate events or requests that are associated with the same transaction across several components. - o:errorCode
-
Type:
string
Required:true
The service's error code. - o:errorDetails
-
Type:
object
errorDetailsAdditional Properties Allowed: - o:errorPath
-
Type:
string
Required:true
The relative point in the API path where the error occurred. - status
-
Type:
integer
(int64
)Required:true
HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details. - title
-
Type:
string
Required:true
Summary of the problem. - type
-
Type:
string
Required:true
The URI to the link that provides details about the HTTP status code.
Nested Schema : errorDetails
Type:
object
- detail
-
Type:
string
Required:true
- o:errorDetails
-
Type:
object
errorDetailsAdditional Properties Allowed: - title
-
Type:
string
Required:true
Summary of the problem. - type
-
Type:
string
Required:true
The URI to the link that provides details about the HTTP status code.