WPCS API (v1)
Download OpenAPI specification:Download
An API that allows you to manage your WPCS Product.
Partner API Authorization works the same as authorization with an Product Specific API key. When making use of a Partner API Key a query string parameter needs to be specified when calling the following (Product specific) endpoints:
- Tenant
- Version
- Snapshot
The ProductId is passed by supplying it in the querystring as so:
$ curl \
-H "Authorization: Basic MTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtMTExMTExMTExMTExOnNvbWUtZ2VuZXJhdGVkLXNlY3JldAo=" \
https://api.us1.wpcs.io/v1/tenants?productId=68c6b25c-74ef-4401-acbe-0b1d560d8647
v1/tenants
Gets tenants for a product. Use the ExternalId or TenantId of a tenant to filter the list to a specific tenant
Authorizations:
query Parameters
tenantId | string <uuid> Specify a tenantId to filter to a specific tenant. |
externalId | string Specify an ExternalId to filter to a specific tenant. |
Responses
Request samples
- cURL
$ curl \ -H "Authorization: Basic MTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtMTExMTExMTExMTExOnNvbWUtZ2VuZXJhdGVkLXNlY3JldAo=" \ https://api.us1.wpcs.io/v1/tenants
Response samples
- 200
[- {
- "tenantId": "68c6b25c-74ef-4401-acbe-0b1d560d8647",
- "id": "68c6b25c-74ef-4401-acbe-0b1d560d8647",
- "externalId": "T001",
- "name": "First-Tenant",
- "versionId": "aebceb97-1296-49fc-81bc-b9e86aefe011",
- "versionName": "V1.1",
- "basedOnSnapshotId": "7395de9a-bfc3-45cd-8dfd-92f760d5aee7",
- "snapshotName": "V2: Added french",
- "snapshotGroupName": "language-school-template",
- "dateCreated": "2021-12-01T12:27:34.891662+00:00",
- "dateChanged": "2021-12-02T12:27:34.891662+00:00",
- "domainName": "my-domain.com",
- "redirectDomains": [
- "T001.staging.my-site.com",
- "www.my-domain.com"
], - "statusCode": 1,
- "statusName": "Done"
}
]
v1/tenants
Schedule the creation of a new tenant
Authorizations:
Request Body schema: application/json
versionId | string <uuid> The Id of the version you want to add the Tenant to. If omitted the Production version is used. |
snapshotId | string <uuid> The Id of the Snapshot you want to base the Tenant on. If omitted the latest snapshot in the 'GroupName' is used or, in case GroupName is omitted, the latest snapshot of the target version is used. |
groupName | string The GroupName of the Snapshot you want to base this Tenant on. See tenant snapshots |
externalId | string An Id for reference to other systems you might use. ExternalIds cannot contain spaces or special characters other than '-'. |
name required | string The name of the Tenant as shown in the WPCS Console. Tenant name cannot be longer than 30 characters and must start and end on an alpha numeric character. |
customDomainName | string A custom domain name. This can be a staging domain name that you use for clients or the production domain name. |
tenantName | string Deprecated The name of the user that will be created in the Tenant. |
tenantUserRole | string Deprecated The Role of the user that will be created in the Tenant. |
tenantEmail | string Deprecated The e-mail address of the user that will be created in the Tenant. |
tenantPassword | string Deprecated The password for the user that will be created in the Tenant. |
wordPressUserName | string The name of the user that will be created in the Tenant. |
wordPressUserRole | string The Role of the user that will be created in the Tenant. |
wordPressUserEmail | string The e-mail address of the user that will be created in the Tenant. |
wordPressUserPassword | string The password for the user that will be created in the Tenant. |
uploadCustomSnapshot | boolean Whether to use a custom Snapshot when creating this Tenant. If true an UploadURL will be specified in the response to wich a Gzipped Tar can be uploaded, containing files and a database export. |
asZip | boolean Whether you want to upload a snapshot as a ZIP file. This flag can only be used when UploadCustomSnapshot is true. |
object or null A collection of key value pairs that will be used to initialize WordPress options; Use the key as option name. The value will be set as is. | |
object or null A collection of key value pairs with an additional boolean value to obfuscate the value in the Console
Use the key as PHP Constant name. The value will be set as |
Responses
Request samples
- Payload
- cURL
- tenant-data.json
{- "versionId": "14707576-2549-4848-82ed-f68f8a1b47c7",
- "snapshotId": "09520abc-01e6-4da1-8fa5-f10e3883c861",
- "groupName": null,
- "externalId": "T001",
- "name": "My awesome Tenant",
- "customDomainName": "awesome-tenant.my-waas.io",
- "tenantName": "TenantUser",
- "tenantUserRole": "author",
- "tenantEmail": "example@gmail.com",
- "tenantPassword": "oneV3rryStr0ngP@ss",
- "wordPressUserName": "TenantUser",
- "wordPressUserRole": "author",
- "wordPressUserEmail": "example@gmail.com",
- "wordPressUserPassword": "oneV3rryStr0ngP@ss",
- "uploadCustomSnapshot": true,
- "asZip": true,
- "wpOptions": {
- "important_option": "initialValue"
}, - "phpConstants": {
- "property1": {
- "value": "string",
- "isPrivate": true
}, - "property2": {
- "value": "string",
- "isPrivate": true
}
}
}
Response samples
- 200
- 400
{- "id": "90b97b83-b320-4006-aaa8-dacb0639325c",
- "externalId": "T001",
- "customDomain": "my-domain.com",
}
v1/tenants
Schedule an update of a Tenant specifically for WP Options or PHP Constants
Authorizations:
query Parameters
tenantId | string <uuid> Specify a tenantId to filter to a specific tenant. |
externalId | string Specify an ExternalId to filter to a specific tenant. |
Request Body schema: application/json
object or null A collection of key value pairs that will be used to initialize WordPress options; Use the key as option name. The value will be set as is. | |
object or null A collection of key value pairs with an additional boolean value to obfuscate the value in the Console
Use the key as PHP Constant name. The value will be set as |
Responses
Request samples
- Payload
- cURL
- tenant-data.json
{- "wpOptions": {
- "important_option": "initialValue"
}, - "phpConstants": {
- "property1": {
- "value": "string",
- "isPrivate": true
}, - "property2": {
- "value": "string",
- "isPrivate": true
}
}
}
Response samples
- 200
- 400
{- "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
- "externalId": "string"
}
v1/tenants
Remove the tenant
Authorizations:
query Parameters
tenantId | string <uuid> The Id of the Tenant to delete (required if externalId is omitted) |
externalId | string The Id of the Tenant to delete (required if tenantId is omitted) |
Responses
Request samples
- cURL
$ curl -X DELETE \ -H "Authorization: Basic MTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtMTExMTExMTExMTExOnNvbWUtZ2VuZXJhdGVkLXNlY3JldAo=" \ -H "Content-Type: application/json" \ https://api.us1.wpcs.io/v1/tenants?externalId=my-own-identifier
Response samples
- 400
{- "statusCode": 400,
- "message": "Validation error occured: Property xxx cannot be null"
}
v1/tenants/domain Deprecated
Schedule the addition of a domain to the tenant. For more info see our domains section
Authorizations:
query Parameters
tenantId | string <uuid> The Id of the Tenant to which to add a domain (required if externalId is omitted) |
externalId | string The Id of the Tenant to which to add a domain (required if tenantId is omitted) |
Request Body schema: application/json
domainName required | string The domain name to be added to the tenant. |
setAsMainDomain | boolean When set to true the domain name will be set as the primary domain name of the tenant. |
Responses
Request samples
- Payload
- cURL
- tenant-data.json
{- "domainName": "my-new-domain.io",
- "setAsMainDomain": true
}
Response samples
- 200
- 400
{- "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
- "externalId": "T001",
- "domain": "my-awesome-domain.com",
- "setAsMainDomain": true
}
v1/tenants/version
Move the tenant identified by the tenantId or externalId to a target version
Authorizations:
query Parameters
tenantId | string <uuid> The Id of the Tenant to which to add a domain (required if externalId is omitted) |
externalId | string The Id of the Tenant to which to add a domain (required if tenantId is omitted) |
Request Body schema: application/json
targetVersionId required | string <uuid> The Id of the Version that you are moving the tenant to |
Responses
Request samples
- Payload
- cURL
- tenant-data.json
{- "targetVersionId": "24ab3137-a5ce-4b73-b8b6-ff8efc329093"
}
Response samples
- 200
- 400
{- "targetVersionId": "f742de68-a400-4bdb-99fe-c999fd33981a",
- "tenantId": "59733291-9f60-46f9-acbc-6f73e8d6a8fb",
- "externalId": "T001"
}
Endpoint to manage Tenant Domains. For more info see our domains section
v1/tenants/domains
Get an overview of the domains of a Tenant
Authorizations:
query Parameters
tenantId | string <uuid> The Id of the Tenant to which to add a domain (required if externalId is omitted) |
externalId | string The Id of the Tenant to which to add a domain (required if tenantId is omitted) |
Responses
Request samples
- cURL
$ curl -H "Authorization: Basic MTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtMTExMTExMTExMTExOnNvbWUtZ2VuZXJhdGVkLXNlY3JldAo=" \ -H "Content-Type: application/json" \ https://api.us1.wpcs.io/v1/tenants/domain?externalId=my-own-identifier
Response samples
- 200
- 400
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "domainName": "string",
- "isMainDomain": true,
- "isBaseDomain": true
}
]
v1/tenants/domains
Schedule the addition of a domain to the tenant. For more info see our domains section
Authorizations:
query Parameters
tenantId | string <uuid> The Id of the Tenant to which to add a domain (required if externalId is omitted) |
externalId | string The Id of the Tenant to which to add a domain (required if tenantId is omitted) |
Request Body schema: application/json
domainName required | string The domain name to be added to the tenant. |
setAsMainDomain | boolean When set to true the domain name will be set as the primary domain name of the tenant. |
Responses
Request samples
- Payload
- cURL
- tenant-domain-data.json
{- "domainName": "my-new-domain.io",
- "setAsMainDomain": true
}
Response samples
- 200
- 400
{- "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
- "externalId": "T001",
- "domain": "my-awesome-domain.com",
- "setAsMainDomain": true
}
v1/tenants/domains
Schedule the removal of a domain of the tenant. Specify the domain either through the domainName or domainId query parameter.
Note: you cannot remove the Main domain as it acts as SiteUrl and Home in your WordPress deploy. Note: you cannot remove the domain that has IsBaseDomain set to true.
Authorizations:
query Parameters
tenantId | string <uuid> The Id of the Tenant to which to add a domain (required if externalId is omitted) |
externalId | string The ExternalId of the Tenant to which to add a domain (required if tenantId is omitted) |
domainId | string <uuid> The Id of the Tenant Domain you want to remove (required if the domainName is omitted) |
domainName | string The domain name that you want to remove (required if domainId is omitted) |
Responses
Request samples
- cURL
$ curl -X DELETE \ -H "Authorization: Basic MTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtMTExMTExMTExMTExOnNvbWUtZ2VuZXJhdGVkLXNlY3JldAo=" \ -H "Content-Type: application/json" \ https://api.us1.wpcs.io/v1/tenants/domain?externalId=my-own-identifier
Response samples
- 200
- 400
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "domainName": "string"
}
v1/tenants/domains/main
Schedule setting an existing domain as main domain of the tenant.
Note: To add a new domain as main domain use the add domain Post and set setAsMainDomain to true.
Authorizations:
query Parameters
tenantId | string <uuid> The Id of the Tenant to which to add a domain (required if externalId is omitted) |
externalId | string The Id of the Tenant to which to add a domain (required if tenantId is omitted) |
Request Body schema: application/json
domainName | string The domain name to be set as Main domain. Required if DomainId is not set. |
domainId | string <uuid> The id of the domain name to be set as Main domain. Required if DomainName is not set. |
Responses
Request samples
- Payload
- cURL
- tenant-domain-data.json
{- "domainName": "my-new-domain.io",
- "domainId": "my-new-domain.io"
}
Response samples
- 200
- 400
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "domainName": "string"
}
v1/tenants/domains/available
See if a domain is available for a tenant at this point in time
Authorizations:
query Parameters
domain | string The Id of the Tenant to which to add a domain (required if tenantId is omitted) |
Responses
Request samples
- cURL
$ curl -H "Authorization: Basic MTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtMTExMTExMTExMTExOnNvbWUtZ2VuZXJhdGVkLXNlY3JldAo=" \ -H "Content-Type: application/json" \ https://api.us1.wpcs.io/v1/tenants/domain/available?domain=my-domain.example.com
Response samples
- 200
- 400
{- "available": true
}
v1/versions
Gets a list of versions. Use the VersionName or VersionId of a version to filter the list to a specific version.
Authorizations:
query Parameters
versionId | string <uuid> Specify a versionId to filter to a specific version. |
versionName | string Specify a versionName to filter to a specific version. |
Responses
Request samples
- cURL
$ curl \ -H "Authorization: Basic MTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtMTExMTExMTExMTExOnNvbWUtZ2VuZXJhdGVkLXNlY3JldAo=" \ https://api.us1.wpcs.io/v1/versions
Response samples
- 200
[- {
- "id": "745e1ebd-d00e-4b6b-b6bc-bffd450c0942",
- "isProduction": true,
- "name": "v2.4",
- "dateChanged": "2021-11-20T15:47:40.17337+00:00",
- "dateCreated": "2021-11-18T15:47:40.17337+00:00",
- "statusCode": 1,
- "statusName": "Done",
- "domain": "v2-5ea23421dba24a99e4a583c5dea4397f.snapshots.us1.wpcs.io"
}
]
v1/versions
Create a version based on an existing snapshot in the product or upload a custom snapshot to work with.
Note either a valid snapshotId is required or the useCustomUpload parameter must be true and a custom snapshot uploaded using a single PUT to the returned uploadUrl with a maximum of 4GB.
Valid snapshotIds are either valid snapshots in the product (see snapshots)[#tag/Snapshot] or a System snapshotId needs to be supplied (Partner API Keys only).
Authorizations:
Request Body schema: application/json
snapshotId | string <uuid> Base your version on a specific snapshot. Be sure that the Snapshot exists within your product |
snapshotIdsToCopy | Array of strings or null <uuid> List of snapshots you want to copy to the new version |
wordPressVersion required | string The WordPress version you want your version to run. |
phpVersion required | string The PHP version you want your version to run. |
name required | string The name of the version. The version name cannot be longer than 30 characters and can only contain alpha numeric characters, dashes and dots |
useCustomUpload | boolean Whether you want to upload a Gzipped Tar to act as the the basis of your version. When using this option the return value will contain an UploadUrl to which a Gzipped Tar must be send to with a PUT (max 4GB). |
asZip | boolean Whether you want to upload a snapshot as a ZIP file. This flag can only be used when UseCustomUpload is true. |
Responses
Request samples
- Payload
- cURL
- version-data.json
{- "snapshotId": "09520abc-01e6-4da1-8fa5-f10e3883c861",
- "snapshotIdsToCopy": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "wordPressVersion": "5.8.2",
- "phpVersion": "7.4",
- "name": "V3.5",
- "useCustomUpload": true,
- "asZip": true
}
Response samples
- 200
- 400
{- "id": "f742de68-a400-4bdb-99fe-c999fd33981a",
- "domainName": "v2-5ea23421dba24a99e4a583c5dea4397f.snapshots.us1.wpcs.io",
- "name": "v2-5ea23421dba24a99e4a583c5dea4397f.snapshots.us1.wpcs.io",
- "wordPressVersion": "5.8.2",
- "phpVersion": "7.4",
}
v1/versions
Remove a non-production version
Authorizations:
query Parameters
versionId | string <uuid> The Id of the Version to delete |
Responses
Request samples
- cURL
$ curl -X DELETE \ -H "Authorization: Basic MTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtMTExMTExMTExMTExOnNvbWUtZ2VuZXJhdGVkLXNlY3JldAo=" \ -H "Content-Type: application/json" \ https://api.us1.wpcs.io/v1/versions?id=53418033-c35a-4641-baf1-7794e3618351
Response samples
- 400
{- "statusCode": 400,
- "message": "Validation error occured: Property xxx cannot be null"
}
v1/versions/production
Sets a Version to Production
Authorizations:
Request Body schema: application/json
versionId | string <uuid> Id of the version that should be the Production version |
Responses
Request samples
- Payload
- cURL
- version-data.json
{- "versionId": "14707576-2549-4848-82ed-f68f8a1b47c7"
}
Response samples
- 200
- 400
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
v1/snapshots
Gets a list of snapshots. Use the versionId
to filter the list for the snapshots for a specific version. Use the snapshotId
, snapshotName
or groupName
to filter the list on specific snapshots or groups of snapshots.
Authorizations:
query Parameters
versionId | string <uuid> Specify a |
snapshotId | string <uuid> Specify a |
snapshotName | string Specify a |
groupName | string Specify a |
Responses
Request samples
- cURL
$ curl \ -H "Authorization: Basic MTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtMTExMTExMTExMTExOnNvbWUtZ2VuZXJhdGVkLXNlY3JldAo=" \ https://api.us1.wpcs.io/v1/snapshots?versionId=ed142f0f-cae8-441d-ac8d-dbb22c88caa6
Response samples
- 200
- 400
{- "id": "347b6a3b-4b68-4888-acc5-d5d546a33d86",
- "versionId": "94d6406e-56d5-481a-a9eb-323152ff4724",
- "dateCreated": "2021-11-18T15:47:40.17337+00:00",
- "name": "v2-addition-woo-commerce",
- "groupName": "language-school-template",
- "isCustomSnapshot": false,
- "isTenantSnapshot": false,
- "statusCode": 1,
- "statusName": "Done"
}
v1/snapshots/download
Download a snapshot
Authorizations:
query Parameters
snapshotId | string <uuid> The id of the snapshot you want to download |
Responses
Request samples
- cURL
$ curl \ -H "Authorization: Basic MTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtMTExMTExMTExMTExOnNvbWUtZ2VuZXJhdGVkLXNlY3JldAo=" \ https://api.us1.wpcs.io/v1/snapshots/download?snapshotId=ed142f0f-cae8-441d-ac8d-dbb22c88caa6
Response samples
- 200
- 400
v1/subscriptions
Returns a list of Subscriptions, optionally filtered by name or subscriptionId
Authorizations:
query Parameters
name | string Specify a Name of Subscription to filter to a specific subscription. |
subscriptionId | string <uuid> Specify a subscriptionId to filter to a specific subscription. |
Responses
Request samples
- cURL
$ curl \ -H "Authorization: Basic MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwOkhlbGxvV29ybGQ=" \ https://api.us1.wpcs.io/v1/subscriptions
Response samples
- 200
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string"
}
]
v1/subscriptions
Schedule the creation of a new product.
When creating a subscription, a product can be immediately added. The product will be created if the Subscription was succesfully created. When defining a product to create for the subscription a version can also be defined. Note that for the version either a valid System snapshotId is required or the useCustomUpload parameter must be true and a custom snapshot uploaded using a single PUT to the returned uploadUrl.
Authorizations:
Request Body schema: application/json
name required | string The name of the subscription |
object (Create Product parameters) | |
object (User Parameters) |
Responses
Request samples
- Payload
- cURL
- subscription-data.json
{- "name": "Johns-Sub",
- "product": {
- "name": "My Product",
- "version": {
- "snapshotId": "09520abc-01e6-4da1-8fa5-f10e3883c861",
- "snapshotIdsToCopy": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "wordPressVersion": "5.8.2",
- "phpVersion": "7.4",
- "name": "V3.5",
- "useCustomUpload": true,
- "asZip": true
}
}, - "user": {
- "name": "John",
- "lastName": "Doe",
- "emailAddress": "john@doe.io"
}
}
Response samples
- 200
- 400
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "product": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "version": {
- "id": "f742de68-a400-4bdb-99fe-c999fd33981a",
- "domainName": "v2-5ea23421dba24a99e4a583c5dea4397f.snapshots.us1.wpcs.io",
- "wordPressVersion": "5.8.2",
- "phpVersion": "7.4",
}
}
}
v1/subscriptions
Removes a subscription including underlying products
Authorizations:
query Parameters
subscriptionId required | string <uuid> The Id of the Subscription that should be deleted |
Responses
Request samples
- cURL
$ curl -X DELETE \ -H "Authorization: Basic MTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtMTExMTExMTExMTExOnNvbWUtZ2VuZXJhdGVkLXNlY3JldAo=" \ -H "Content-Type: application/json" \ https://api.us1.wpcs.io/v1/subscriptions?subscriptionId=
v1/subscriptions/usage
Gets the usage in terms of product, version and tenant hours of a certain subscription between the specified start- and enddate
Authorizations:
query Parameters
subscriptionId required | string <uuid> The id of the Subscription to get usage for |
startDate required | string <date-time> The startdate of the period in ISO 8601 format to measure usage |
endDate required | string <date-time> The enddate of the period in ISO 8601 format to measure usage |
Responses
Request samples
- cURL
$ curl -X GET \ -H "Authorization: Basic MTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtMTExMTExMTExMTExOnNvbWUtZ2VuZXJhdGVkLXNlY3JldAo=" \ -H "Content-Type: application/json" \ https://api.us1.wpcs.io/v1/subscriptions/usage?subscriptionId=5ab7917a-840b-4091-a205-602c7ea8cb7b&startDate=2022-03-01T00%3A00%3A00.000%2B02%3A00&endDate=2022-03-30T00%3A00%3A00.000%2B02%3A00
Response samples
- 200
{- "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f",
- "productHours": 0,
- "versionHours": 0,
- "tenantHours": 0
}
v1/products
Gets a list of Products. Use the ProductName, ProductId or SubscriptionId to filter the list to specific products.
Authorizations:
query Parameters
subscriptionId | string <uuid> Specify a Subscription to filter to specific products. |
productId | string <uuid> Specify a productId to filter to a specific product. |
productName | string Specify a productName to filter to a specific product. |
Responses
Request samples
- cURL
$ curl \ -H "Authorization: Basic MTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtMTExMTExMTExMTExOnNvbWUtZ2VuZXJhdGVkLXNlY3JldAo=" \ https://api.us1.wpcs.io/v1/products
Response samples
- 200
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "subscriptionId": "1f3ea976-d862-499d-8be2-b99c1aef21a9",
- "subscriptionName": "WPCS Inc",
- "statusCode": 1,
- "statusName": "Done"
}
]
v1/products
Schedule the creation of a new product
When creating a product, a version can also be defined. Note that for the version either a valid System snapshotId is required or the useCustomUpload parameter must be true and a custom snapshot uploaded using a single PUT to the returned uploadUrl.
Authorizations:
query Parameters
subscriptionId required | string <uuid> Specify the Id of the Subscription the product should be added to |
Request Body schema: application/json
name required | string The name of the product |
object (Create Version Params) |
Responses
Request samples
- Payload
- cURL
- product-data.json
{- "name": "string",
- "version": {
- "snapshotId": "09520abc-01e6-4da1-8fa5-f10e3883c861",
- "snapshotIdsToCopy": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "wordPressVersion": "5.8.2",
- "phpVersion": "7.4",
- "name": "V3.5",
- "useCustomUpload": true,
- "asZip": true
}
}
Response samples
- 200
- 400
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "version": {
- "id": "f742de68-a400-4bdb-99fe-c999fd33981a",
- "domainName": "v2-5ea23421dba24a99e4a583c5dea4397f.snapshots.us1.wpcs.io",
- "wordPressVersion": "5.8.2",
- "phpVersion": "7.4",
}
}
v1/products
Removes a Product.
Authorizations:
query Parameters
productId | string <uuid> Specify a productId to filter to a specific product. |
Responses
Request samples
- cURL
$ curl -X DELETE \\ -H "Authorization: Basic MTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtMTExMTExMTExMTExOnNvbWUtZ2VuZXJhdGVkLXNlY3JldAo=" \ https://api.us1.wpcs.io/v1/products?productId=37ad43a6-c083-452c-8909-f261d0c36771
Response samples
- 200
{- "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113"
}
v1/products/usage
Gets the usage in terms of product, version and tenant hours of a certain product between the specified start- and enddate
Authorizations:
query Parameters
productId required | string <uuid> The id of the Product to get usage for |
startDate required | string <date-time> The startdate of the period in ISO 8601 format to measure usage |
endDate required | string <date-time> The enddate of the period in ISO 8601 format to measure usage |
Responses
Request samples
- cURL
$ curl -X GET \ -H "Authorization: Basic MTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtMTExMTExMTExMTExOnNvbWUtZ2VuZXJhdGVkLXNlY3JldAo=" \ -H "Content-Type: application/json" \ https://api.us1.wpcs.io/v1/products/usage?productId=5ab7917a-840b-4091-a205-602c7ea8cb7b&startDate=2022-03-01T00%3A00%3A00.000%2B02%3A00&endDate=2022-03-30T00%3A00%3A00.000%2B02%3A00
Response samples
- 200
{- "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
- "productHours": 0,
- "versionHours": 0,
- "tenantHours": 0
}
v1/basesnapshots
Returns a list of BaseSnapshots
Authorizations:
query Parameters
baseSnapshotId | string <uuid> Specify a BaseSnapshotId to filter to a specific BaseSnapshots. |
name | string Specify the Name of a BaseSnapshot to filter to specific BaseSnapshots. |
groupName | string Specify a GroupName to filter to a specific BaseSnapshots. |
onlyPartnerSpecific | boolean Only show BaseSnapshots created through your Partner API Key. |
Responses
Request samples
- cURL
$ curl \ -H "Authorization: Basic MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwOkhlbGxvV29ybGQ=" \ https://api.us1.wpcs.io/v1/basesnapshots
Response samples
- 200
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "comment": "string",
- "uri": "string",
- "isDefault": true,
- "isTenantSnapshot": true,
- "groupName": "string",
- "showAsBaseSnapshot": true
}
]
v1/basesnapshots
Creates a BaseSnapshot to use as a snapshot to base initial versions on or to define tenant snapshots that can be added to a version to function.
Authorizations:
Request Body schema:
name required | string The name of the BaseSnapshot that is between 5 and 50 characters. It may only contain alphanumeric characters, spaces and dashes. |
comment required | string A comment or description of what is in the snapshot |
isTenantSnapshot | boolean Whether this snapshot should be available as a tenant snapshot. |
groupName | string The groupName of the snapshot in the case of a tenant snapshot. GroupName cannot be filled out when trying to upload a BaseSnapshot that is not a tenant snapshot. |
showInConsole | boolean Whether this snapshot is available in the Version creation dropdown in the console (only for the first version within a product). When false, the snapshot will still show up in Get queries of this API and can be used as a snapshot for new version, however, only from the API. |
Responses
Request samples
- Payload
- cURL
- base-snapshot-data.json
{- "name": "string",
- "comment": "string",
- "isTenantSnapshot": true,
- "groupName": "string",
- "showInConsole": true
}
Response samples
- 200
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "comment": "string",
- "showInConsole": true,
}
v1/basesnapshots
Removes a BaseSnapshot
Authorizations:
query Parameters
id required | string <uuid> Specify a BaseSnapshotId to filter to a specific BaseSnapshots. |
Responses
Request samples
- cURL
$ curl -x DELETE \ -H "Authorization: Basic MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwOkhlbGxvV29ybGQ=" \ https://api.us1.wpcs.io/v1/basesnapshots?id=193463fd-ce54-43d9-ba61-304ceef2885e
Response samples
- 200
{- "baseSnapshotId": "50c8a023-0702-481c-b991-7f02a2c9d036"
}