Associate Backend with API
put
                    /mobile/tools/1.0/mobilebackends/{id}/apis/{apiId}
Associates an API with a backend.
                Request
Supported Media Types
                                - application/json
Path Parameters
                                - apiId
- 
                                            
Type:stringRequired:trueThe identifier of the API.
- id
- 
                                            
Type:stringRequired:trueThe identifier of the backend.
Header Parameters
                                - If-Match
- 
                                            
Type:stringThe 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 `*`.
Response
Supported Media Types
                                - application/json
204 Response 
                                
                                    The association was updated. No content was returned in this response.
                                
                                
                                
                                
                            404 Response 
                                
                                    The API or backend doesn't exist.
                                
                                
                                
                                
                                Body
                                    Root Schema : error
Type: 
object- detail
- 
            
            
Type:stringRequired:trueMessage that provides the error details.
- o:ecid
- 
            
            
Type:stringRequired:trueExecution 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:stringRequired:trueThe service's error code.
- o:errorDetails
- 
            
            Type:objecterrorDetailsAdditional Properties Allowed:
- o:errorPath
- 
            
            
Type:stringRequired:trueThe relative point in the API path where the error occurred.
- status
- 
            
            
Type:integer(int64)Required:trueHTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details.
- title
- 
            
            
Type:stringRequired:trueSummary of the problem.
- type
- 
            
            
Type:stringRequired:trueThe URI to the link that provides details about the HTTP status code.
Nested Schema : errorDetails
Type: 
object- detail
- 
            
            
Type:stringRequired:true
- o:errorDetails
- 
            
            Type:objecterrorDetailsAdditional Properties Allowed:
- title
- 
            
            
Type:stringRequired:trueSummary of the problem.
- type
- 
            
            
Type:stringRequired:trueThe 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:stringRequired:trueMessage that provides the error details.
- o:ecid
- 
            
            
Type:stringRequired:trueExecution 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:stringRequired:trueThe service's error code.
- o:errorDetails
- 
            
            Type:objecterrorDetailsAdditional Properties Allowed:
- o:errorPath
- 
            
            
Type:stringRequired:trueThe relative point in the API path where the error occurred.
- status
- 
            
            
Type:integer(int64)Required:trueHTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details.
- title
- 
            
            
Type:stringRequired:trueSummary of the problem.
- type
- 
            
            
Type:stringRequired:trueThe URI to the link that provides details about the HTTP status code.
Nested Schema : errorDetails
Type: 
object- detail
- 
            
            
Type:stringRequired:true
- o:errorDetails
- 
            
            Type:objecterrorDetailsAdditional Properties Allowed:
- title
- 
            
            
Type:stringRequired:trueSummary of the problem.
- type
- 
            
            
Type:stringRequired:trueThe URI to the link that provides details about the HTTP status code.
Examples
The following example shows how to associate an API with a backend using cURL. For more information about cURL, see Use cURL.
curl -i -X PUT -H "Content-Type: application/json; charset=utf-8" -H "Authorization: Bearer $TOKEN" "$BASE_URL/mobile/tools/1.0/mobilebackends/2ec3d6d7-4cbe-4785-8303-6b4221602c8b/apis/3f89c1e2-a6bc-4afc-a575-801475825b3f"Example of Response Header
The following shows an example of the response headers:
204 NO CONTENT Content-Length: 0 Date: Thu, 05 Oct 2017 01:54:49 GMT Etag: "2,2"