Applications - REST API

Create Application Resource
List Applications
Upload Application
View Application

Create Application Resource

Using POST /app/, you can create an application resource that does not have a binary associated with it. To run an assessment you must upload a binary with the same package name and platform, see the Upload Application section for further details.

POST https://lab-api.nowsecure.com/app/
curl -H "Authorization: Bearer ${API_TOKEN}" -X POST https://lab-api.nowsecure.com/app/ -d '{"platform": "android", "package": "com.example.app", "group": "363df3a1-0e8b-4960-bb6e-cc09aced37a1"}'

Header 

Field Type Description
Authorization String  Send header with value Bearer: ${API_TOKEN} to authenticate

 

Body

Field Type Description
platform String The platform associated with application Allowed values: "ios", "android"
package String The package identifier of application
group  String The uuid group ref to associate application with (only optional if user belongs to exactly one group)

List Applications

You can list all of the applications associated with an account using GET /app/.

GET https://lab-api.nowsecure.com/app/
curl -H "Authorization: Bearer ${API_TOKEN}" -X GET https://lab-api.nowsecure.com/app/

Header 

Field Type Description
Authorization String  Send header with value Bearer: ${API_TOKEN} to authenticate

 


Upload Application

Use POST /build/, with a request body of the app binary, to trigger an assessment. This will create a new application record if one does not already exist in specified group. If application record does it exist, this will use any previously specified configuration options. If it is the first time an application has been uploaded, the assessment will start with the default configuration options.

POST https://lab-api.nowsecure.com/build/
curl -H “Authorization: Bearer $TOKEN” -X POST “https://lab-api.nowsecure.com/build/?group=$GROUPREF” --http1.1 --data-binary @$APPNAME.apk

Header 

Field Type Description
Authorization String  Send header with value Bearer: ${API_TOKEN} to authenticate

 

Query

Field Type Description
group  String The application group to use for the assessment (only optional if user belongs to exactly one group)

View Application

Using the GET /app/{platform}/{package} endpoint will allow the user to view a specific application package.

GET https://lab-api.nowsecure.com/app/:platform/:package
curl -H "Authorization: Bearer ${API_TOKEN}" -X GET https://lab-api.nowsecure.com/app/android/com.sample.android.testdpc?group=838929c6-73c8-11e8-a19d-27d57188d0f9

Header 

Field Type Description
Authorization String  Send header with value Bearer: ${API_TOKEN} to authenticate

 

Route

Field Type Description
platform String  The platform associated with application. Allowed values: "ios", "android"
package String  The package identifier of application

 

Query

Field Type Description
group  String The uuid group ref of application (only optional if user belongs to exactly one group)

Comments

0 comments

Article is closed for comments.