(metadata())
REST APIs for managing Version Metadata entities
Delete metadata for a particular apiID and versionID.
package hello.world;
import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.operations.DeleteVersionMetadataRequest;
import dev.speakeasyapi.javaclientsdk.models.operations.DeleteVersionMetadataResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
RyanTest sdk = RyanTest.builder()
.security(Security.builder()
.apiKey("<YOUR_API_KEY_HERE>")
.build())
.build();
DeleteVersionMetadataRequest req = DeleteVersionMetadataRequest.builder()
.apiID("<id>")
.metaKey("<value>")
.metaValue("<value>")
.versionID("<id>")
.build();
DeleteVersionMetadataResponse res = sdk.metadata().deleteVersionMetadata()
.request(req)
.call();
// handle response
}
}
DeleteVersionMetadataResponse
Error Type |
Status Code |
Content Type |
models/errors/SDKError |
4XX, 5XX |
*/* |
Get all metadata for a particular apiID and versionID.
package hello.world;
import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.operations.GetVersionMetadataRequest;
import dev.speakeasyapi.javaclientsdk.models.operations.GetVersionMetadataResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
RyanTest sdk = RyanTest.builder()
.security(Security.builder()
.apiKey("<YOUR_API_KEY_HERE>")
.build())
.build();
GetVersionMetadataRequest req = GetVersionMetadataRequest.builder()
.apiID("<id>")
.versionID("<id>")
.build();
GetVersionMetadataResponse res = sdk.metadata().getVersionMetadata()
.request(req)
.call();
if (res.versionMetadata().isPresent()) {
// handle response
}
}
}
GetVersionMetadataResponse
Error Type |
Status Code |
Content Type |
models/errors/SDKError |
4XX, 5XX |
*/* |
Insert metadata for a particular apiID and versionID.
package hello.world;
import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.operations.InsertVersionMetadataRequest;
import dev.speakeasyapi.javaclientsdk.models.operations.InsertVersionMetadataResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import dev.speakeasyapi.javaclientsdk.models.shared.VersionMetadataInput;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
RyanTest sdk = RyanTest.builder()
.security(Security.builder()
.apiKey("<YOUR_API_KEY_HERE>")
.build())
.build();
InsertVersionMetadataRequest req = InsertVersionMetadataRequest.builder()
.versionMetadata(VersionMetadataInput.builder()
.metaKey("<value>")
.metaValue("<value>")
.build())
.apiID("<id>")
.versionID("<id>")
.build();
InsertVersionMetadataResponse res = sdk.metadata().insertVersionMetadata()
.request(req)
.call();
if (res.versionMetadata().isPresent()) {
// handle response
}
}
}
InsertVersionMetadataResponse
Error Type |
Status Code |
Content Type |
models/errors/SDKError |
4XX, 5XX |
*/* |