Organizations
Summary
The Organizations REST API provides organization management to the API Manager's client registry
Description
With the Organization API, it is possible to create, delete, and manage organization registration in the Portal
Resources
GET /api/portal/v1.3/organizations
Summary
List all organizations
Description
Get the list of organizations that are visible to the authenticated user. Only API Administrators may list all organizations, all other users will see their organization. The list of organizations can be filtered using the expression: field=__field__&op=__op__&value=__value__. Optionally, you can add a logical operation for all expressions, using the form: &lop=AND|OR. By default, the logical operation is AND. Multiple expression filters can be used, specifying field, op, and value for each filter. The field is one of:
- apiid
- Matches the organization if the organization is using the API, specified by ID
- description
- The organization's description
- The organization's contact email address
- enabled
- The enabled state of the organization, one of: enabled, disabled
- createdOn
- The date the organization was created on, time in ms, e.g.: 1372755998542
- name
- The name of the organization
- phone
- The organization's contact phone
The op is an operation and is one of:
- eq
- Equal
- ne
- Not equal
- gt
- Greater than
- lt
- Less than
- ge
- Greater than or equal
- le
- Less than or equal
- like
- Like
- gete
- Greater than or equal to, and less than or equal to; the value should be a lower-minimum and upper-maximum separated by comma, e.g: value=5,10
The value will be compared against the field, according to the supplied op.
Parameters
none
Status Codes
| HTTP Status Code | Reason |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 500 | Internal Server Error |
Returns Array
[ Organization ]
Example
GET https://localhost:8075/api/portal/v1.3/organizations?field=name&op=eq&value=Acme%20Corporation&field=enabled&op=eq&value=disabled
ResponseHTTP 1.1 200 OK
[ {
"id" : "3e21b76a-defa-49ab-9682-a9cd60387e37",
"name" : "Acme Corporation",
"description" : "Acme Corporation is a fictional corporation in Road Runner/Wile E. Coyote cartoons",
"email" : "support@acmecorp.com",
"image" : "resources/photo.jpg",
"restricted" : false,
"virtualHost" : "acme.api.axway.com",
"phone" : "+1 877-564-7700",
"enabled" : false,
"development" : false,
"dn" : null,
"createdOn" : 1364287486876,
"startTrialDate" : 1364287486876,
"endTrialDate" : 1364287486876,
"trialDuration" : 365,
"isTrial" : true,
"skypeId" : "any_user"
} ]
POST /api/portal/v1.3/organizations
Summary
Creates a new organization
Description
Creates a new organization. Only API Administrators may create organizations.
Parameters
| Parameter | Description | Data Type | Location | Required | Multiple |
|---|---|---|---|---|---|
- |
API Manager organization | Organization | body | Required |
Status Codes
| HTTP Status Code | Reason |
|---|---|
| 201 | Created |
| 400 | Bad Request |
| 413 | Request Entity Too Large |
| 500 | Internal Server Error |
Returns Class
Example
POST https://localhost:8075/api/portal/v1.3/organizations
Request
{"name" : "Acme Corporation","description" : "Acme Corporation is a fictional corporation in Road Runner/Wile E. Coyote cartoons","email" : "support@acmecorp.com","phone" : "+1 877-564-7700","enabled" : false}Response
HTTP 1.1 201 Created{
"id" : "3e21b76a-defa-49ab-9682-a9cd60387e37",
"name" : "Acme Corporation",
"description" : "Acme Corporation is a fictional corporation in Road Runner/Wile E. Coyote cartoons",
"email" : "support@acmecorp.com",
"image" : "resources/photo.jpg",
"restricted" : false,
"virtualHost" : "acme.api.axway.com",
"phone" : "+1 877-564-7700",
"enabled" : false,
"development" : false,
"dn" : null,
"createdOn" : 1364287486876,
"startTrialDate" : 1364287486876,
"endTrialDate" : 1364287486876,
"trialDuration" : 365,
"isTrial" : true,
"skypeId" : "any_user"
}
GET /api/portal/v1.3/organizations/{id}
Summary
Get an organization
Description
Retrieves the details of an organization.
Parameters
| Parameter | Description | Data Type | Location | Required | Multiple |
|---|---|---|---|---|---|
id |
The organization ID to be returned. | String | path | Required |
Status Codes
| HTTP Status Code | Reason |
|---|---|
| 200 | OK |
| 404 | Not Found |
| 500 | Internal Server Error |
Returns Class
Example
GET https://localhost:8075/api/portal/v1.3/organizations/{id}
ResponseHTTP 1.1 200 OK
{
"id" : "3e21b76a-defa-49ab-9682-a9cd60387e37",
"name" : "Acme Corporation",
"description" : "Acme Corporation is a fictional corporation in Road Runner/Wile E. Coyote cartoons",
"email" : "support@acmecorp.com",
"image" : "resources/photo.jpg",
"restricted" : false,
"virtualHost" : "acme.api.axway.com",
"phone" : "+1 877-564-7700",
"enabled" : false,
"development" : false,
"dn" : null,
"createdOn" : 1364287486876,
"startTrialDate" : 1364287486876,
"endTrialDate" : 1364287486876,
"trialDuration" : 365,
"isTrial" : true,
"skypeId" : "any_user"
}
DELETE /api/portal/v1.3/organizations/{id}
Summary
Delete an organization
Description
Deletes an organization. Deleting an organization will result in all users and associated applications being deleted
Parameters
| Parameter | Description | Data Type | Location | Required | Multiple |
|---|---|---|---|---|---|
id |
The organization ID to delete. | String | path | Required |
Status Codes
| HTTP Status Code | Reason |
|---|---|
| 204 | No Content |
| 404 | Not Found |
| 500 | Internal Server Error |
PUT /api/portal/v1.3/organizations/{id}
Summary
Update the details of an organization
Description
Updates an organization.
Parameters
| Parameter | Description | Data Type | Location | Required | Multiple |
|---|---|---|---|---|---|
id |
The organization ID to update. | String | path | Required | |
- |
API Manager organization | Organization | body | Required |
Status Codes
| HTTP Status Code | Reason |
|---|---|
| 200 | OK |
| 500 | Internal Server Error |
Returns Class
Example
PUT https://localhost:8075/api/portal/v1.3/organizations/{id}
Request
{"name" : "Acme Corporation","description" : "Acme Corporation is a fictional corporation in Road Runner/Wile E. Coyote cartoons","email" : "support@acmecorp.com","phone" : "+1 877-564-7700","enabled" : false}Response
HTTP 1.1 200 OK{
"id" : "3e21b76a-defa-49ab-9682-a9cd60387e37",
"name" : "Acme Corporation",
"description" : "Acme Corporation is a fictional corporation in Road Runner/Wile E. Coyote cartoons",
"email" : "support@acmecorp.com",
"image" : "resources/photo.jpg",
"restricted" : false,
"virtualHost" : "acme.api.axway.com",
"phone" : "+1 877-564-7700",
"enabled" : false,
"development" : false,
"dn" : null,
"createdOn" : 1364287486876,
"startTrialDate" : 1364287486876,
"endTrialDate" : 1364287486876,
"trialDuration" : 365,
"isTrial" : true,
"skypeId" : "any_user"
}
GET /api/portal/v1.3/organizations/{id}/apis
Summary
Get the list of approved APIs for the organization
Description
Get the list of aproved APIs for the organization
Parameters
| Parameter | Description | Data Type | Location | Required | Multiple |
|---|---|---|---|---|---|
id |
The organization ID who's approved APIs are required. | String | path | Required |
Status Codes
| HTTP Status Code | Reason |
|---|---|
| 200 | OK |
| 500 | Internal Server Error |
Returns Class
POST /api/portal/v1.3/organizations/{id}/apis
Summary
Grants access to an API for an organization.
Description
Grants access to an API for an organization. Only the API Admin may call this method.
Parameters
| Parameter | Description | Data Type | Location | Required | Multiple |
|---|---|---|---|---|---|
id |
The organization ID requesting access to an API. | String | path | Required | |
- |
API Access indicates whether access to an API is available | APIAccess | body | Required |
Status Codes
| HTTP Status Code | Reason |
|---|---|
| 201 | Created |
| 403 | Forbidden |
| 500 | Internal Server Error |
Returns Class
Example
POST https://localhost:8075/api/portal/v1.3/organizations/{id}/apis
Request
{"apiId" : "3a83e303-2bd5-49a4-b37c-f4a89979846f"}Response
HTTP 1.1 201 Created{
"id" : "19da5d5e-b18a-4217-abec-291033cd939c",
"apiId" : "c1c63d3b-5283-4755-ade7-e2377bd35049",
"createdBy" : "3e21b76a-defa-49ab-9682-a9cd60387e37",
"state" : "approved",
"createdOn" : 1364287486876,
"enabled" : true
}
PUT /api/portal/v1.3/organizations/{id}/apis/{apiAccessId}
Summary
Updates access to an API for an organization
Description
Updates access to an API for an organization. Only enabled may be modified, and disabling access will also disable access to all applications that may be using it.
Parameters
| Parameter | Description | Data Type | Location | Required | Multiple |
|---|---|---|---|---|---|
id |
The organization ID. | String | path | Required | |
apiAccessId |
The API access ID. | String | path | Required | |
- |
API Access indicates whether access to an API is available | APIAccess | body | Required |
Status Codes
| HTTP Status Code | Reason |
|---|---|
| 200 | OK |
| 404 | Not Found |
| 403 | Forbidden |
| 500 | Internal Server Error |
Returns Class
Example
PUT https://localhost:8075/api/portal/v1.3/organizations/{id}/apis/{apiAccessId}
Request
{"id" : "ecc2f2c5-1aa8-43e4-baf6-6a2158c44121","apiId" : "3a83e303-2bd5-49a4-b37c-f4a89979846f","createdBy" : "de077cd8-83b7-46d1-b06f-2eaaf1548898","state" : "approved","createdOn" : 1364403372805,"enabled" : false}Response
HTTP 1.1 201 Created{
"id" : "19da5d5e-b18a-4217-abec-291033cd939c",
"apiId" : "c1c63d3b-5283-4755-ade7-e2377bd35049",
"createdBy" : "3e21b76a-defa-49ab-9682-a9cd60387e37",
"state" : "approved",
"createdOn" : 1364287486876,
"enabled" : true
}
DELETE /api/portal/v1.3/organizations/{id}/apis/{apiAccessId}
Summary
Deletes access to an API for an organization
Description
Permanently deletes access to an API for an organization. Deleting API access will also delete API access to any application.
Parameters
| Parameter | Description | Data Type | Location | Required | Multiple |
|---|---|---|---|---|---|
id |
The organization ID. | String | path | Required | |
apiAccessId |
The API access ID. | String | path | Required |
Status Codes
| HTTP Status Code | Reason |
|---|---|
| 204 | No Content |
| 404 | Not Found |
| 403 | Forbidden |
| 500 | Internal Server Error |
Returns Class
Example
DELETE https://localhost:8075/api/portal/v1.3/organizations/{id}/apis/{apiAccessId}
Request
{"id" : "ecc2f2c5-1aa8-43e4-baf6-6a2158c44121","apiId" : "3a83e303-2bd5-49a4-b37c-f4a89979846f","createdBy" : "de077cd8-83b7-46d1-b06f-2eaaf1548898","state" : "approved","createdOn" : 1364403372805,"enabled" : false}Response
HTTP 1.1 201 Created{
"id" : "19da5d5e-b18a-4217-abec-291033cd939c",
"apiId" : "c1c63d3b-5283-4755-ade7-e2377bd35049",
"createdBy" : "3e21b76a-defa-49ab-9682-a9cd60387e37",
"state" : "approved",
"createdOn" : 1364287486876,
"enabled" : true
}
GET /api/portal/v1.3/organizations/{id}/image/
Summary
Get the image for an organization
Description
Returns the jpeg image associated with an organization.
Parameters
| Parameter | Description | Data Type | Location | Required | Multiple |
|---|---|---|---|---|---|
id |
The organization ID whos image is to be returned | String | path | Required |
Status Codes
| HTTP Status Code | Reason |
|---|---|
| 204 | No Content |
| 404 | Not Found |
| 500 | Internal Server Error |
POST /api/portal/v1.3/organizations/{id}/image/
Summary
Set the image for an organization
Description
Set the jpeg image to be associated with an organization.
Parameters
| Parameter | Description | Data Type | Location | Required | Multiple |
|---|---|---|---|---|---|
id |
The organization ID whos image is to be set | String | path | Required | |
file |
File | form | |||
type |
String | query |
Status Codes
| HTTP Status Code | Reason |
|---|---|
| 204 | No Content |
| 400 | Bad Request |
| 413 | Request Entity Too Large |
| 500 | Internal Server Error |
POST /api/portal/v1.3/organizations/{id}/tokens
Summary
Create a registration code
Description
Create a registration code for self service onboarding of users to the organization
Parameters
| Parameter | Description | Data Type | Location | Required | Multiple |
|---|---|---|---|---|---|
id |
The organization ID to be associated with the registration code. | String | path | Required | |
- |
Organization Registration Token. | RegistrationToken | body | Required |
Status Codes
| HTTP Status Code | Reason |
|---|---|
| 201 | Created |
| 500 | Internal Server Error |
Returns Class
Example
POST https://localhost:8075/api/portal/v1.3/organizations/{id}/tokens
Request
{"userQuota" : "15","expiry" : 1366930800000}Response
HTTP 1.1 201 Created{
"token" : "257690",
"organizationId" : "3e21b76a-defa-49ab-9682-a9cd60387e37",
"expiry" : 1366930800000,
"createdOn" : 1364407145121,
"createdBy" : "de077cd8-83b7-46d1-b06f-2eaaf1548898",
"userQuota" : 10,
"maxUsers" : 10,
"enabled" : true
}
GET /api/portal/v1.3/organizations/{id}/tokens/
Summary
Get registration codes for an organization
Description
Retrieves the registration codes for an organization.
Parameters
| Parameter | Description | Data Type | Location | Required | Multiple |
|---|---|---|---|---|---|
id |
The organization ID whos tokens are to be returned. | String | path | Required |
Status Codes
| HTTP Status Code | Reason |
|---|---|
| 200 | OK |
| 500 | Internal Server Error |
Returns Array
PUT /api/portal/v1.3/organizations/{id}/tokens/{token}
Summary
Update a registration code
Description
Update a registration code for self service onboarding of users to the organization
Parameters
| Parameter | Description | Data Type | Location | Required | Multiple |
|---|---|---|---|---|---|
id |
The organization ID to be associated with the registration code. | String | path | Required | |
token |
String | path | Required | ||
- |
Organization Registration Token. | RegistrationToken | body | Required |
Status Codes
| HTTP Status Code | Reason |
|---|---|
| 200 | OK |
| 404 | Not Found |
| 500 | Internal Server Error |
Returns Class
Example
PUT https://localhost:8075/api/portal/v1.3/organizations/{id}/tokens/{token}
Request
{"userQuota" : "15","expiry" : 1366930800000}Response
HTTP 1.1 200 OK{
"token" : "257690",
"organizationId" : "3e21b76a-defa-49ab-9682-a9cd60387e37",
"expiry" : 1366930800000,
"createdOn" : 1364407145121,
"createdBy" : "de077cd8-83b7-46d1-b06f-2eaaf1548898",
"userQuota" : 10,
"maxUsers" : 10,
"enabled" : true
}
DELETE /api/portal/v1.3/organizations/{id}/tokens/{token}
Summary
Delete the registration code
Description
Delete the registration code.
Parameters
| Parameter | Description | Data Type | Location | Required | Multiple |
|---|---|---|---|---|---|
id |
The organization ID associated with the registration code. | String | path | Required | |
token |
The registration code to be deleted. | String | path | Required |
Status Codes
| HTTP Status Code | Reason |
|---|---|
| 204 | No Content |
| 404 | Not Found |
| 500 | Internal Server Error |
GET /api/portal/v1.3/organizations/{id}/tokens/{token}
Summary
Get registration code
Description
Retrieves the registration code.
Parameters
| Parameter | Description | Data Type | Location | Required | Multiple |
|---|---|---|---|---|---|
id |
The organization ID associated with the registration code. | String | path | Required | |
token |
The registration code to be returned. | String | path | Required |
Status Codes
| HTTP Status Code | Reason |
|---|---|
| 200 | OK |
| 404 | Not Found |
| 500 | Internal Server Error |