PUT catalog/…
Updates the details of a single catalog.
Subscription termination
Individual user's access to the catalog are more generically called subscriptions.
Subscriptions can be ended automatically. There are a few different ways to define when the subscriptions will end.
- One-off a single date is set, at which all subscriptions that exist at that moment will end.
- Annual a date is set, and every year all subscriptions that exist at that moment will end.
- Monthly a day of the month is set, and every month all subscriptions that exist at that moment will end.
- Duration a duration is set, and every subscription that exists for this duration will end.
How to configure this is explained in detail in the subscription
parameters below.
Resource URL
https://www.drillster.com/api/2.1.1/catalog/{catalog_id}
Parameters
Field | Type | Description |
---|---|---|
name optional |
String | The human-readable name of the catalog. |
description optional |
String | The description of the catalog. |
subscriptionEndYear optional |
Integer | The (4-digit) year to end the subscriptions. Required for one-off terminations. To remove any previously configured subscription termination settings, submit 0 . |
subscriptionEndMonth optional |
Integer | The month to end the subscriptions (1 to 12 ). Required for one-off and annual terminations. |
subscriptionEndDay optional |
Integer | The day of the month to end the subscriptions. Required for one-off, annual and monthly terminations. For monthly terminations, up to 28 can be specified, or 0 to indicate the last day of the month. For annual terminations, specifying leap day (29 February) is not allowed. |
subscriptionEndTime optional |
String | The time of the day to end the subscriptions. Can be specified for one-off, annual and monthly terminations. Format: HH:MM , using 24-hour notation. If omitted, midnight (00:00 ) is used.Example value: 18:30 |
subscriptionEndTimeZone optional |
String | The time zone of the configured subscription end date/time. Can be specified for one-off, annual and monthly terminations. Values are as defined by the 🔗 IANA Time Zone Database. This document provides a full list of time zone IDs. If omitted, the time zone of the account making the request is used. If the account has no configured time zone, the time zone of the account's organization is used. If the organization has no configured time zone, UTC is used. |
subscriptionDuration optional |
String | The maximum duration of the subscriptions. The subscription is terminated when it exists for this duration. The duration is specified in 🔗 ISO-8601 format, but without a time component. Example value: P6M (6 months) |
If a PUT request has no body (i.e. the body is empty), it is still mandatory to include a Content-Length header (i.e.
Content-Length: 0
). Not all HTTP clients do this automatically. For more information, please see RFC 2616.
Response
A 2.1.1 UserCatalog object including the key.
Error responses
The following error situations are possible:
ID | Response code | Description |
---|---|---|
not_authorized |
400 (Bad request) | The calling user must have PUBLISH_TO_CATALOG permission. |
catalog_id_missing |
400 (Bad request) | No catalog ID was specified. |
catalog_not_found |
404 (Not found) | The specified catalog was not found. |
not_linked_to_organization |
401 (Unauthorized) | Caller is not linked to an organization. |
not_permitted |
403 (Forbidden) | Only the own organization is accessible. |
invalid_subscription_end_day |
400 (Bad request) | Invalid subscription end day specified |
invalid_subscription_end_month |
400 (Bad request) | Invalid subscription end month specified |
invalid_subscription_end_year |
400 (Bad request) | Invalid subscription end year specified |
invalid_subscription_end_date |
400 (Bad request) | Invalid subscription end date specified |
invalid_subscription_end_time |
400 (Bad request) | Invalid subscription end time specified |
invalid_time_zone |
400 (Bad request) | Invalid subscription end time zone specified |
invalid_subscription_duration |
400 (Bad request) | Invalid subscription duration specified |
invalid_subscription_end_configuration |
400 (Bad request) | Invalid combination of subscription duration and date fields specified |
Last updated on