...
Tip |
---|
Examples calling the API defined below with the Unix utility "curl" can be found here |
DuraStore
...
All Applications
Panel |
---|
title | Security Initialization REST Methods |
---|
|
Initialize StoresSecurity Users- Purpose: Allows the initialization of storage provider accountsauthorized users
- Request: stores
- Request Body: XML similar to: Request Body: XML similar to:
Code Block |
---|
|
<storageProviderAccounts>
<storageAcct ownerId='0' isPrimary='true'>
<id>1</id><?xml version="1.0" encoding="UTF-8"?>
<dur:security-users schemaVersion="0.2" xmlns:dur="duracloud.org">
<security-user>
<storageProviderType>AMAZON_S3</storageProviderType><username>username-0</username>
<storageProviderCredential><password>password-0</password>
<enabled>true</enabled>
<username>username< <accountNonExpired>true</username>accountNonExpired>
<password>password<<credentialsNonExpired>true</password>credentialsNonExpired>
<<accountNonLocked>true</storageProviderCredential>accountNonLocked>
</storageAcct>
</storageProviderAccounts>
|
- Response Code: 200 (on success)
- Response Body: "Initialization Successful" (on success)
<grantedAuthorities>ROLE_USER</grantedAuthorities>
</security-user>
<security-user>
<username>username-1</username>
<password>password-1</password>
<enabled>false</enabled>
<accountNonExpired>false</accountNonExpired>
<credentialsNonExpired>false</credentialsNonExpired>
<accountNonLocked>false</accountNonLocked>
<grantedAuthorities>ROLE_USER ROLE_ADMIN</grantedAuthorities>
</security-user>
</dur:security-users>
|
- Response Code: 200 (on success)
- Response Body: "Initialization Successful" (on success)
|
DuraStore
Purpose: DuraStore is the application through which DuraCloud manages storage. The DuraStore REST API provides access to storage by mediating the underlying storage provider APIs to allow access to multiple cloud storage options through a single API.
Panel |
---|
title | Initialization REST Methods |
---|
|
Initialize Stores- Purpose: Allows the initialization of storage provider accounts
- Request: POST https://host:port/durastore/stores
Image Added - Request Body: XML similar to:
Code Block |
---|
|
<storageProviderAccounts>
<storageAcct ownerId='0' isPrimary='true'>
<id>1</id>
<storageProviderType>AMAZON_S3</storageProviderType>
<storageProviderCredential>
<username>username</username>
<password>password</password>
</storageProviderCredential>
</storageAcct>
</storageProviderAccounts> |
Initialize Security Users- Purpose: Allows the initialization of authorized users
- Request: POST https://host:port/durastore/security
Image Removed - Request Body: XML similar to:
Code Block |
---|
xml | xml |
<?xml version="1.0" encoding="UTF-8"?>
<dur:security-users schemaVersion="0.2" xmlns:dur="duracloud.org">
<security-user>
<username>username-0</username>
<password>password-0</password>
<enabled>true</enabled>
<accountNonExpired>true</accountNonExpired>
<credentialsNonExpired>true</credentialsNonExpired>
<accountNonLocked>true</accountNonLocked>
<grantedAuthorities>ROLE_USER</grantedAuthorities>
</security-user>
<security-user>
<username>username-1</username>
<password>password-1</password>
<enabled>false</enabled>
<accountNonExpired>false</accountNonExpired>
<credentialsNonExpired>false</credentialsNonExpired>
<accountNonLocked>false</accountNonLocked>
<grantedAuthorities>ROLE_USER ROLE_ADMIN</grantedAuthorities>
</security-user>
</dur:security-users>
|
- Response Code: 200 (on success)
- Response Body: "Initialization Successful" (on success)
|
...
Panel |
---|
title | Initialization REST Methods |
---|
|
Initialize Services- Purpose: Initializes the DuraService application
- Request: POST https://host:port/duraservice/services
![](/images/icons/linkext7.gif) - Request Body: XML similar to:
Code Block |
---|
|
<servicesConfig>
<primaryServiceInstance>
<host>[PRIMARY-SERVICE-INSTANCE-HOST]</host>
<servicesAdminPort>[PRIMARY-SERVICES-ADMIN-PORT]</servicesAdminPort>
<servicesAdminContext>[PRIMARY-SERVICES-ADMIN-CONTEXT]</servicesAdminContext>
</primaryServiceInstance>
<userStorage>
<host>[USER-STORAGE-HOST-NAME]</host>
<port>[USER-STORAGE-PORT]</port>
<context>[USER-STORAGE-CONTEXT]</context>
<msgBrokerUrl>[USER-STORAGE-MSG-BROKER-URL]</msgBrokerUrl>
</userStorage>
<serviceStorage>
<host>[SERVICES-STORAGE-HOST-NAME]</host>
<port>[SERVICES-STORAGE-PORT]</port>
<context>[SERVICES-STORAGE-CONTEXT]</context>
<spaceId>[SERVICES-STORAGE-SPACE-ID]</spaceId>
</serviceStorage>
<serviceCompute>
<type>AMAZON_EC2</type>
<imageId>[MACHINE-IMAGE-ID]</imageId>
<computeProviderCredential>
<username>[USERNAME]</username>
<password>[PASSWORD]</password>
</computeProviderCredential>
</serviceCompute>
</servicesConfig>
|
- Response Code: 200 (on success)
- Response Body: "Initialization Successful" (on success)
Initialize Security Users |
Panel |
---|
title | Service REST Methods |
---|
|
Get Services- Purpose: Allows the initialization of authorized usersRetrieves a listing of services, along with their configuration options
- Request: POST GET https://host:port/duraservice/securityservices
Image Modified ? (show) - Parameter options for show (optional)
- available (default) - Includes only services which have not been deployed but are available for deployment
- deployed - Includes only services which have been deployed and started
- Response Code: 200 (on success)
- Response Body: XML list of services (see service config xsd)
Get Service- Purpose: Retrieves information about a particular service including description, configuration options, and all deployments
- Request: GET https://host:port/duraservice/serviceID
Image Added - Response Code: 200 (on success)
- Response Body: XML service (see service config xsd)
Get Deployed Service- Purpose: Retrieves information about a deployed service including description, configuration options, and a single deployment indicating the configuration options in use
- Request: GET https://host:port/duraservice/serviceID/deploymentID
Image Added - Response Code: 200 (on success)
- Response Body: XML service (see service config xsd)
Get Deployed Service Properties- Purpose: Retrieves the runtime properties of a deployed service
- Request: GET https://host:port/duraservice/serviceID/deploymentID/properties
Image AddedRequest Body: XML similar to: Code Block |
---|
xml | xml |
<?xml version="1.0" encoding="UTF-8"?>
<dur:security-users schemaVersion="0.2" xmlns:dur="duracloud.org">
<security-user>
<username>username-0</username>
<password>password-0</password>
<enabled>true</enabled>
<accountNonExpired>true</accountNonExpired>
<credentialsNonExpired>true</credentialsNonExpired>
<accountNonLocked>true</accountNonLocked>
<grantedAuthorities>ROLE_USER</grantedAuthorities>
</security-user>
<security-user>
<username>username-1</username>
<password>password-1</password>
<enabled>false</enabled>
<accountNonExpired>false</accountNonExpired>
<credentialsNonExpired>false</credentialsNonExpired>
<accountNonLocked>false</accountNonLocked>
<grantedAuthorities>ROLE_USER ROLE_ADMIN</grantedAuthorities>
</security-user>
</dur:security-users>
- Response Code: 200 (on success)
- Response Body: "Initialization Successful" (on success)
|
Panel |
---|
title | Service REST Methods |
---|
|
- XML service (simple xml Map serialization)
Deploy Service- Purpose: Deploys and starts an available service
- Request: PUT
Get Services- Purpose: Retrieves a listing of services, along with their configuration options
- Request: GET https://host:port/duraservice/servicesserviceID
Image Modified ? (showserviceHost) - Parameter options value for show serviceHost (optional)
- available (default) - Includes only services which have not been deployed but are available for deployment
- deployed - Includes only services which have been deployed and started
should indicate the services host on which the service should be deployed. Default is the primary customer host.
- Request Body: XML user configuration indicating the config selections for the service (see user config portion of service config xsd)
- Response Code: 201 Response Code: 200 (on success)
- Response Body: XML list of services (see service config xsd)
Get Service- Purpose: Retrieves information about a particular service including description, configuration options, and all deployments
- Request: GET https://host:port/duraservice/serviceID
Image Removed - Response Code: 200 (on success)
- Response Body: XML service (see service config xsd)
Get Deployed Service- Purpose: Retrieves information about a deployed service including description, configuration options, and a single deployment indicating the configuration options in use
- Request: GET https://host:port/duraservice/serviceID/deploymentID
Image Removed - Response Code: 200 (on success)
- Response Body: XML service (see service config xsd)
Get Deployed Service PropertiesDeploy Service- Purpose: Deploys and starts an available service
- Request: PUT https://host:port/duraservice/serviceID
Image Removed ? (serviceHost) - Parameter value for serviceHost (optional) should indicate the services host on which the service should be deployed. Default is the primary customer host.
- Request Body: XML user configuration indicating the config selections for the service (see user config portion of service config xsd)
- Response Code: 201 (on success)
- Response Header: Location header indicates the URL at which information about the deployed service can be retrieved (the URL for a get deployed service call) which includes the deploymentID
Update Service ConfigurationUnDeploy Service |
DurAdmin
Purpose: DurAdmin is the user-facing application through which DuraCloud exposes DuraStore and DuraService functionality. The DurAdmin REST API provides the means by which DurAdmin is initialized.
- Header: Location header indicates the URL at which information about the deployed service can be retrieved (the URL for a get deployed service call) which includes the deploymentID
Update Service Configuration |
Panel |
---|
title | Initialization REST Methods |
---|
|
Initialize ApplicationPurpose: Allows the initialization of duradminRequest: POST https://host:port/duradmin/init Image RemovedRequest Body: XML similar to: Code Block |
---|
| xml | xml |
<duradminConfig>
<durastoreHost>[host]</durastoreHost>
<durastorePort>8080</durastorePort>
<durastoreContext>durastore</durastoreContext>
<duraserviceHost>[host]</duraserviceHost>
<duraservicePort>8080</duraservicePort>
<duraserviceContext>duraservice</duraserviceContext>
</duradminConfig>
|
Response Code: 200 (on success)Response Body: "Initialization Successful" (on success)Initialize Security Users
- Purpose: Allows the initialization of authorized users
- Request: POST https://host:port/duradmin/security
Image Removed - Request Body: XML similar to:
Code Block |
---|
xml | xml |
<?xml version="1.0" encoding="UTF-8"?>
<dur:security-users schemaVersion="0.2" xmlns:dur="duracloud.org">
<security-user>
<username>username-0</username>
<password>password-0</password>
<enabled>true</enabled>
<accountNonExpired>true</accountNonExpired>
<credentialsNonExpired>true</credentialsNonExpired>
<accountNonLocked>true</accountNonLocked>
<grantedAuthorities>ROLE_USER</grantedAuthorities>
</security-user>
<security-user>
<username>username-1</username>
<password>password-1</password>
<enabled>false</enabled>
<accountNonExpired>false</accountNonExpired>
<credentialsNonExpired>false</credentialsNonExpired>
<accountNonLocked>false</accountNonLocked>
<grantedAuthorities>ROLE_USER ROLE_ADMIN</grantedAuthorities>
</security-user>
</dur:security-users>
- Response Code: 200 (on success)
UnDeploy Service
...
DurAdmin
Purpose: DuraReport generates reports relating to the status of your DuraCloud instance, and provides a simple interface for accessing those reportsDurAdmin is the user-facing application through which DuraCloud exposes DuraStore and DuraService functionality. The DurAdmin REST API provides the means by which DurAdmin is initialized.
Panel |
---|
title | Initialization REST Methods |
---|
|
Initialize Application- Purpose: Allows the initialization of durareportduradmin
- Request: POST https://host:port/durareportduradmin/reportsinit
Image Modified - Request Body: XML similar to:
Code Block |
---|
|
<durareportConfig><duradminConfig>
<durastoreHost>[host]</durastoreHost>
<durastorePort>8080</durastorePort>
<durastoreContext>durastore</durastoreContext>
<duraserviceHost>[host]</duraserviceHost>
<duraservicePort>8080</duraservicePort>
<duraserviceContext>duraservice</duraserviceContext>
</durareportConfig>duradminConfig>
|
- Response Code: 200 (on success)
- Response Body: "Initialization Successful" (on success)
Initialize Security Users |
DuraReport
Purpose: DuraReport generates reports relating to the status of your DuraCloud instance, and provides a simple interface for accessing those reports.
Panel |
---|
title | Initialization REST Methods |
---|
|
Initialize Application- Purpose: Allows the initialization of durareport
- Request: POST https://host:port/durareport/reports
Image Added - Request Body: XML similar to:
Code Block |
---|
|
<durareportConfig>
<durastoreHost>[host]</durastoreHost>
<durastorePort>8080</durastorePort>
<durastoreContext>durastore</durastoreContext>
<duraserviceHost>[host]</duraserviceHost>
<duraservicePort>8080</duraservicePort>
<duraserviceContext>duraservice</duraserviceContext>
</durareportConfig> |
Allows the initialization of authorized users- Request: POST https://host:port/durareport/security
Image Removed - Request Body: XML similar to:
Code Block |
---|
xml | xml |
<?xml version="1.0" encoding="UTF-8"?>
<dur:security-users schemaVersion="0.2" xmlns:dur="duracloud.org">
<security-user>
<username>username-0</username>
<password>password-0</password>
<enabled>true</enabled>
<accountNonExpired>true</accountNonExpired>
<credentialsNonExpired>true</credentialsNonExpired>
<accountNonLocked>true</accountNonLocked>
<grantedAuthorities>ROLE_USER</grantedAuthorities>
</security-user>
<security-user>
<username>username-1</username>
<password>password-1</password>
<enabled>false</enabled>
<accountNonExpired>false</accountNonExpired>
<credentialsNonExpired>false</credentialsNonExpired>
<accountNonLocked>false</accountNonLocked>
<grantedAuthorities>ROLE_USER ROLE_ADMIN</grantedAuthorities>
</security-user>
</dur:security-users>
|
- Response Code: 200 (on success)
- Response Body: "Initialization Successful" (on success)
|