For the latest stable version, please use Unifly Services v4.7!

Submit Permission Requests Example

Here’s a basic example of how to submit all permission requests for an operation using curl:

#!/bin/bash

# Base variables
API_KEY="your-api-key-here"
BASE_URL="https://portal.demo.unifly.tech/api/gcs"
OPERATION_ID="your-operation-id"

# Submit all permission requests
curl -X POST "${BASE_URL}/uasoperations/${OPERATION_ID}/permissionrequests/submitall" \
     -H "apikey: ${API_KEY}" \
     -H "Content-Type: application/json" \
     -v

The -v flag enables verbose output, showing the full HTTP request and response including headers.

  • Replace your-api-key-here and your-operation-id with your actual values

  • Operation must be in ACCEPTED state to submit permission requests

Example successful response:

{
  "permissionRequests": [
    {
      "permissionRequestId": "PR_123456",
      "submitStatus": "OK",
      "message": "Permission request submitted successfully"
    },
    {
      "permissionRequestId": "PR_123457",
      "submitStatus": "OK",
      "message": "Permission request submitted successfully"
    }
  ]
}

Possible response codes:

  • 200: All permission requests of the operation were successfully submitted

  • 401: The API key is missing

  • 403: The API key was not recognized or you’re not allowed to submit permission requests for this operation

  • 409: The submission of permission requests is not allowed

If you receive a 409 response, the response body will include a message explaining why:

{
  "message": "The submission of permission requests is not allowed due to [specific reason]"
}