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: string
The identifier of the API.
-
id: string
The identifier of the backend.
Header Parameters
-
If-Match(optional): 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 `*`.
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.
Root Schema : error
Type:
Show Source
object
-
detail:
string
Message that provides the error details.
-
o:ecid:
string
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:
string
The service's error code.
-
o:errorDetails(optional):
object errorDetails
-
o:errorPath:
string
The relative point in the API path where the error occurred.
-
status:
integer(int64)
HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
Nested Schema : errorDetails
Type:
Show Source
object
-
detail:
string
-
o:errorDetails(optional):
object errorDetails
-
title:
string
Summary of the problem.
-
type:
string
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.
Root Schema : error
Type:
Show Source
object
-
detail:
string
Message that provides the error details.
-
o:ecid:
string
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:
string
The service's error code.
-
o:errorDetails(optional):
object errorDetails
-
o:errorPath:
string
The relative point in the API path where the error occurred.
-
status:
integer(int64)
HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
Nested Schema : errorDetails
Type:
Show Source
object
-
detail:
string
-
o:errorDetails(optional):
object errorDetails
-
title:
string
Summary of the problem.
-
type:
string
The 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"