Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Current »

Applications can be accessed through this API using the GET service.

Authentication - Use Basic Authentication for this API.

GET

There are two implementations of GET. One will find an Application with the given Id and return the JSON representation of the Application. The other will find a list of Applications matching the parameters supplied to it.

GET (Using Id)

This GET service will find an Application by Id and return a JSON representation of it.

API URLs

http://host:port/flexdeploy/rest/v1/application/{id}

Request

Parameter
Required
Type
Description
idYesURLThis is a URL path parameter for the id which is used to find an Application.

Response

AttributesTypeDescription
applicationNameStringThis is the name of the Application.
applicationIdStringThis is the Id of the Application.
parentapplicationIdLongThis is the Id of the parent Folder of this Application.
applicationNameStringThis is the Name used to identify this Application.
descriptionStringThis is a description of this Application.
isActiveBooleanThis Boolean indicates whether or not this Application is marked as active.
projectIdsList<Long>This List contains the Id's of the active Projects in this Application.

Response Codes

HTTP CodeDescription
200Application found and returned
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
404Application not found
500Unexpected internal server error

Example

If we had a Application in our database with the following attributes:

Application - "Application1"
{
      "applicationId": 10001,
      "parentFolderId": 99,
      "applicationName": "Application1",
      "isActive": true,
      "projectIds":       [
         11202,
         11204,
         12701
      ],
      "description": null
}

When we run a GET request at the following URL:

http://{host:port}/flexdeploy/rest/v1/application/10001

The GET request would return the  following JSON Application object

GET JSON Response
{
      "applicationId": 10001,
      "parentFolderId": 99,
      "applicationName": "ProjectApp1",
      "isActive": true,
      "projectIds":       [
         11202,
         11204,
         12701
      ],
      "description": null
}

Get(Using Query Parameters)

This GET service will search for Applications by querying based by Application name and return the JSON representations of the objects satisfying the query. If no query parameters are given this request will return all Applications.

API URLs

http://host:port/flexdeploy/rest/v1/application?

Append the following character sequences to the above URL to specify Query parameters.
Use '&' between successive query parameters: 

applicationName={name}

Examples:
To search by name only:

http://host:port/flexdeploy/rest/v1/application?applicationName={name}

To search for all Applications:

http://host:port/flexdeploy/rest/v1/application

The query parameters are not case sensitive. Searching by applicationName=NAME is the same as searching by applicationName=name.

Request

Parameter
Required
Type
Description
applicationNameNoQuery - String

This is a URL query parameter for the name which is used to query Applications with.

Contains ignore type search for application name. Application is special type of folder, but this API will only return folders that are applications.

Response

AttributesTypeDescription
applicationNameStringThis is the name of the Application.
applicationIdStringThis is the Id of the Application.
parentapplicationIdLongThis is the Id of the parent Folder of this Application.
applicationNameStringThis is the Name used to identify this Application.
descriptionStringThis is a description of this Application.
isActiveBooleanThis Boolean indicates whether or not this Application is marked as active.
projectIdsList<Long>This List contains the Id's of the active Projects in this Application.

Response Codes

HTTP Code
Description
200Applications were found and returned
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
500Unexpected internal server error

Example

If we had Applications in our database with the names 'Application1' and 'Application2' and the following attributes:

Application - "Application1"
{
      "applicationId": 10001,
      "parentFolderId": 99,
      "applicationName": "Application1",
      "isActive": true,
      "projectIds":       [
         11202,
         11204,
         12701
      ],
      "description": "This is another Application"
   }
Application - "Application2"
{
      "applicationId": 10002,
      "parentFolderId": 99,
      "applicationName": "Application2",
      "isActive": true,
      "projectIds":       [
         11212,
         11213,
         11214
      ],
      "description": "This is another Application"
   }

When we run a GET request at the following URL

http://host:port/flexdeploy/rest/v1/application?applicationName=Application1

The GET request would return the  following JSON workflow object

Search By applicationName=application1
[ 
 {
      "applicationId": 10001,
      "parentFolderId": 99,
      "applicationName": "Application1",
      "isActive": true,
      "projectIds":       [
         11202,
         11204,
         12701
      ],
      "description": "This is another Application"
   }
]
  • No labels