Claim an environment as a user.

Details

Claim an environment as a user.

If a user claims an environment, they can control Edge devices in that environment. This endpoint associates the user represented by the token with the Edge device given. The claim code is the Edge ID the user wishes to control. The claim type, for now, must be “edgeId.”

A user token may be used to run this endpoint.

Parameters

body

  • claimCode (required): The The ID of the Edge server.
  • claimType (required): The claim code type. For now, this must be “edgeId.”

Responses

200

400

  • Body Parameters Missing: The standard error structure defines this error as invalid parameters, and contains all required body parameters. If this error occurs when the JSON structure of the body parameters is syntactically correct, this means that the “content-type” header is incorrectly specified. The content-type header should be “application/json.”
  • No Query String Allowed: The standard error structure defines this error as invalid parameters, with additional parameters in the query string. In this context, it means that no query string is allowed at all when calling this endpoint.
  • Claim Type Invalid: This error means that the claim type given was not valid. Since the claim codes are Edge IDs, the claim type must be “edgeId.”

404

  • Claim Not Found: This error means that a claim with the given ID was not found.

Examples

HTTP

POST https://ioe.droplit.io/api/environments/claim HTTP/1.1
authorization: TOKEN
content-type: application/json
{
    "claimCode": "CLAIM-CODE",
    "claimType": "CLAIM-TYPE"
}

Droplit Console

This functionality does not exist in the Droplit console.
Language
Authorization
Header
Click Try It! to start a request and see the response here!