azurecognitivebinder

2.0.1 • Public • Published

AzureCognitiveBinder

  1. A binder REST service for Azure Cognitive APIs.These Binder APIs can be called from both Mobile and Web applications using corresponding client libraries.
  2. Dockerfile is included which would help containerize the service and also can be used seamlessly with Azure Container Registry or Docker Cloud or running locally. This would help in local testing and then hosting in Azure as Web API (or any other hosting services)
  3. No need to send Storage account details as part of the request (although that option is open); these secured information can be in Azure Web API layer and service can read from process.env dictionary
  4. Server host address is kept at 0.0.0.0 - so that it can be accesses from containerized hosting solutions like Docker Swarm

API Endpoints:

Default

URL - https://<host_server_details>
GET request body - { }

FACE APIs

  1. URL - https://<host_server_details>/face//detect
    POST request body -

    {
      "faceURL" : <FACE_IMAGE_URL>, // OR, "imageData" : <BASE64_IMAGE_BYTES>
      "options": <OPTION>
    }
    
    
  2. URL - https://<host_server_details>/face/find
    POST request body -

    {
      "faceId" : <FACE_IDENTIFIER>,
      "options": <OPTION>
    }
    
    
  3. URL - https://<host_server_details>/face/group
    POST request body -

    {
      "faceIds" : [<FACE_IDENTIFIER>],
      "options": <OPTION>
    }
    
    
  4. URL - https://<host_server_details>/face/identify
    POST request body -

    {
      "faceIds" : [<FACE_IDENTIFIER>],
      "personGroupId" : [<PERSON_GROUP_IDENTIFIER>],
      "options": <OPTION>
    }
    
    
  5. URL - https://<host_server_details>/face/verify
    POST request body -

    {
      "faceId1" : <FACE_IDENTIFIER_1>,
      "faceId2" : <FACE_IDENTIFIER_2>,
      "options": <OPTION>
    }
    
    
  6. URL - https://<host_server_details>/face/verify/personGroup
    POST request body -

    {
      "faceId" : <FACE_IDENTIFIER>,
      "personGroupId" : <PERSON_GROUP_IDENTIFIER>,
      "personId" : <PERSON_IDENTIFIER>,
      "options": <OPTION>
    }
    
    
  7. URL - https://<host_server_details>/face/personGroup/create
    PUT request body -

    {
      "personGroupName" : <PERSON_GROUP_NAME>,
      "personGroupId" : <PERSON_GROUP_IDENTIFIER>,
      "options": <OPTION>
    }
    
    
  8. URL - https://<host_server_details>/face/personGroup/update
    POST request body -

    {
      "personGroupId" : <PERSON_GROUP_IDENTIFIER>,
      "options": <OPTION>
    }
    
    
  9. URL - https://<host_server_details>/face/personGroup/delete
    DELETE request body -

    {
      "personGroupId" : <PERSON_GROUP_IDENTIFIER>,
      "options": <OPTION>
    }
    
    
  10. URL - https://<host_server_details>/face/personGroup/fetch
    POST request body -

    {
      "personGroupId" : <PERSON_GROUP_IDENTIFIER>,
      "options": <OPTION>
    }
    
    
  11. URL - https://<host_server_details>/face/personGroup/list
    POST request body -

    {
      "options": <OPTION>
    }
    
    
  12. URL - https://<host_server_details>/face/personGroup/train
    POST request body -

    {
      "personGroupId" : <PERSON_GROUP_IDENTIFIER>,
      "options": <OPTION>
    }
    
    
  13. URL - https://<host_server_details>/face/personGroup/person/create
    PUT request body -

    {
      "personGroupId" : <PERSON_GROUP_IDENTIFIER>,
      "personName" : <PERSON_NAME>,
      "options": <OPTION>
    }
    
    
  14. URL - https://<host_server_details>/face/personGroup/person/update
    POST request body -

    {
      "personGroupId" : <PERSON_GROUP_IDENTIFIER>,
      "personId" : <PERSON_IDENTIFIER>,
      "options": <OPTION>
    }
    
    
  15. URL - https://<host_server_details>/face/personGroup/person/delete
    DELETE request body -

    {
      "personGroupId" : <PERSON_GROUP_IDENTIFIER>,
      "personId" : <PERSON_IDENTIFIER>,
      "options": <OPTION>
    }
    
    
  16. URL - https://<host_server_details>/face/personGroup/person/fetch
    POST request body -

    {
      "personGroupId" : <PERSON_GROUP_IDENTIFIER>,
      "personId" : <PERSON_IDENTIFIER>,
      "options": <OPTION>
    }
    
    
  17. URL - https://<host_server_details>/face/personGroup/person/list
    POST request body -

    {
      "personGroupId" : <PERSON_GROUP_IDENTIFIER>,
      "options": <OPTION>
    }
    
    
  18. URL - https://<host_server_details>/face/personGroup/person/add
    PUT request body -

    {
      "personGroupId" : <PERSON_GROUP_IDENTIFIER>,
      "personId" : <PERSON_IDENTIFIER>,
      "targetFace" : <TARGET_FACE_IDENTIFIER>,
      "imageData" : <BASE64_IMAGE_BYTES>,
      "options": <OPTION>
    }
    
    
  19. URL - https://<host_server_details>/face/add
    PUT request body -

    {
      "personGroupId" : <PERSON_GROUP_IDENTIFIER>,
      "personGroupName" : <PERSON_GROUP_NAME>,
      "options": <OPTION>
    }
    
    
  20. URL - https://<host_server_details>/face/update
    POST request body -

    {
      "personGroupId" : <PERSON_GROUP_IDENTIFIER>,
      "personId" : <PERSON_IDENTIFIER>,
      "persistedFaceId" : <PERSISTENT_FACE_IDENTIFIER>,
      "options": <OPTION>
    }
    
    
  21. URL - https://<host_server_details>/face/delete
    DELETE request body -

    {
      "personGroupId" : <PERSON_GROUP_IDENTIFIER>,
      "personId" : <PERSON_IDENTIFIER>,
      "persistedFaceId" : <PERSISTENT_FACE_IDENTIFIER>,
      "options": <OPTION>
    }
    
    
  22. URL - https://<host_server_details>/face/fetch
    POST request body -

    {
      "personGroupId" : <PERSON_GROUP_IDENTIFIER>,
      "personId" : <PERSON_IDENTIFIER>,
      "persistedFaceId" : <PERSISTENT_FACE_IDENTIFIER>,
      "options": <OPTION>
    }
    
    

COMPUTERVISION APIs

  1. URL - https://<host_server_details>/computerVision/ocr
    POST request body -

    {
      "detectOrientation" : <TRUE/FALSE>,      
      "imageURL" : <IMAGE_URL>, // OR "imageData" : <BASE64_IMAGE_BYTES>     
      "options": <OPTION>
    }
    
    
  2. URL - https://<host_server_details>/computerVision/text
    POST request body -

    {
      "imageURL" : <IMAGE_URL>, // OR "imageData" : <BASE64_IMAGE_BYTES>     
      "options": <OPTION>
    }
    
    
  3. URL - https://<host_server_details>/computerVision/tags
    POST request body -

    {
      "imageURL" : <IMAGE_URL>, // OR "imageData" : <BASE64_IMAGE_BYTES>     
      "options": <OPTION>
    }
    
    
  4. URL - https://<host_server_details>/computerVision/thumbnails
    POST request body -

    {
      "imageWidth" : <IMAGE_WIDTH>,
      "imageHeight" : <IMAGE_HEIGHT>,
      "imageURL" : <IMAGE_URL>, // OR "imageData" : <BASE64_IMAGE_BYTES>     
      "options": <OPTION>
    }
    
    
  5. URL - https://<host_server_details>/computerVision/describe
    POST request body -

    {
      "imageURL" : <IMAGE_URL>, // OR "imageData" : <BASE64_IMAGE_BYTES>     
      "options": <OPTION>
    }
    
    
  6. URL - https://<host_server_details>/computerVision/analyze
    POST request body -

    {
      "imageURL" : <IMAGE_URL>, // OR "imageData" : <BASE64_IMAGE_BYTES>     
      "options": <OPTION>
    }
    
    

TEXTANALYTICS APIs

  1. URL - https://<host_server_details>/textAnalytics/language
    POST request body -

    {
      "input" : <LANGUAGE_INPUT>,      
      "options": <OPTION>
    }
    
    
  2. URL - https://<host_server_details>/textAnalytics/keyphrases
    POST request body -

    {
      "input" : <KEYPHRASE_INPUT>,      
      "options": <OPTION>
    }
    
    
  3. URL - https://<host_server_details>/textAnalytics/sentiment
    POST request body -

    {
      "input" : <SENTIMENT_INPUT>,      
      "options": <OPTION>
    }
    
    

Readme

Keywords

Package Sidebar

Install

npm i azurecognitivebinder

Weekly Downloads

0

Version

2.0.1

License

MIT

Unpacked Size

171 kB

Total Files

25

Last publish

Collaborators

  • monojitnpm