Authentification
Cette API prend en charge l'authentification JWT et l'authentification de base. L'authentification de base est plus facile à mettre en œuvre, mais elle ne prend pas en charge les fonctions avancées telles que les listes de contrôle d'accès.
Vous pouvez utiliser l'authentification JWT ou l'authentification de base, mais pas les deux en même temps.
| Clé | Description | Où | Exemple |
|---|---|---|---|
| Authorization | Votre jeton web JSON. | Headers | Bearer <JWT> |
| Authorization | Clé et secret de l'API encodés en Base64 et reliés par deux points. | Headers | Basic <base64> |
Demande de renseignements Paramètres
descendingascendingThe order of search results.
ascendingdescending1Which page to retrieve in pagination
2050How many items at most per page
1 week ago2020-01-01T14:00:00.000ZRetrieve results created on or after this timestap.
2020-01-01T14:00:00.000ZRetrieve results created on or before this timestamp.
20The amount of records returned in this response.
The page_index used in your request.
/v3/media?page_size=20&account_id=abcd1234&order=descending/v3/media?page_size=20&account_id=abcd1234&order=descending/v3/media?page_size=20&account_id=abcd1234&order=descending1The total number of records returned by your request.
A collection of media items. See retrieve a media item for a description of the returned fields
aaaaaaaa-bbbb-cccc-dddd-0123456789abA UUID representing the object.
test.wavThe filename of the object as it was originally uploaded.
audio/vnd.waveThe IETF MIME type of the file.
abcd1234The ID of your Nexmo account. This is the same as your API key.
s3An internal identifier of how the file is stored.
The maximum number of times the file may be downloaded.
1The number of times the file has been downloaded.
aaaaaaaabbbbccccdddd0123456789abAn identifier for the content. This will change if the content of the file has been changed (i.e. if you upload a new version of the file). For more information see Wikipedia: HTTP ETag
1234567The size of the file in bytes
2020-01-01T14:00:00.000ZA timestamp for the time that the file was created
2020-01-01T14:00:00.000ZA timestamp for the time that the file was last modified
Whether the item is available for download without authentication.
A user set string containing metadata about the media file.
A user set string containing further metadata about the media file.
Exemple Réponse
{
"page_size": 20,
"page_index": 0,
"_links": {
"self": {
"href": "/v3/media?page_size=20&account_id=abcd1234&order=descending"
},
"first": {
"href": "/v3/media?page_size=20&account_id=abcd1234&order=descending"
},
"last": {
"href": "/v3/media?page_size=20&account_id=abcd1234&order=descending"
}
},
"count": 1,
"_embedded": {
"media": [
{
"id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
"original_file_name": "test.wav",
"mime_type": "audio/vnd.wave",
"account_id": "abcd1234",
"store_id": "s3",
"max_downloads_allowed": 0,
"times_downloaded": 1,
"etag": "aaaaaaaabbbbccccdddd0123456789ab",
"media_size": 1234567,
"time_created": "2020-01-01T14:00:00.000Z",
"time_last_updated": "2020-01-01T14:00:00.000Z",
"public": false,
"metadata_primary": "string",
"metadata_secondary": "string"
}
]
}
}Authentification
Cette API prend en charge l'authentification JWT et l'authentification de base. L'authentification de base est plus facile à mettre en œuvre, mais elle ne prend pas en charge les fonctions avancées telles que les listes de contrôle d'accès.
Vous pouvez utiliser l'authentification JWT ou l'authentification de base, mais pas les deux en même temps.
| Clé | Description | Où | Exemple |
|---|---|---|---|
| Authorization | Votre jeton web JSON. | Headers | Bearer <JWT> |
| Authorization | Clé et secret de l'API encodés en Base64 et reliés par deux points. | Headers | Basic <base64> |
aaaaaaaa-bbbb-cccc-dddd-0123456789abA UUID representing the object.
test.wavThe filename of the object as it was originally uploaded.
audio/vnd.waveThe IETF MIME type of the file.
abcd1234The ID of your Nexmo account. This is the same as your API key.
s3An internal identifier of how the file is stored.
The maximum number of times the file may be downloaded.
1The number of times the file has been downloaded.
aaaaaaaabbbbccccdddd0123456789abAn identifier for the content. This will change if the content of the file has been changed (i.e. if you upload a new version of the file). For more information see Wikipedia: HTTP ETag
1234567The size of the file in bytes
2020-01-01T14:00:00.000ZA timestamp for the time that the file was created
2020-01-01T14:00:00.000ZA timestamp for the time that the file was last modified
Whether the item is available for download without authentication.
A user set string containing metadata about the media file.
A user set string containing further metadata about the media file.
Exemple Réponse
{
"id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
"original_file_name": "test.wav",
"mime_type": "audio/vnd.wave",
"account_id": "abcd1234",
"store_id": "s3",
"max_downloads_allowed": 0,
"times_downloaded": 1,
"etag": "aaaaaaaabbbbccccdddd0123456789ab",
"media_size": 1234567,
"time_created": "2020-01-01T14:00:00.000Z",
"time_last_updated": "2020-01-01T14:00:00.000Z",
"public": false,
"metadata_primary": "string",
"metadata_secondary": "string"
}Authentification
Cette API prend en charge l'authentification JWT et l'authentification de base. L'authentification de base est plus facile à mettre en œuvre, mais elle ne prend pas en charge les fonctions avancées telles que les listes de contrôle d'accès.
Vous pouvez utiliser l'authentification JWT ou l'authentification de base, mais pas les deux en même temps.
| Clé | Description | Où | Exemple |
|---|---|---|---|
| Authorization | Votre jeton web JSON. | Headers | Bearer <JWT> |
| Authorization | Clé et secret de l'API encodés en Base64 et reliés par deux points. | Headers | Basic <base64> |
trueWhether the item is publicly available without authentication.
foo,barA string containing metadata about the media file.
123A string containing further metadata about the media file.
Very important recordingA string containing a title for the media file.
This is a very important recording. Do not delete.A description of the media file.
audio/vnd.waveThe MIME type of the media file.
100The maximum number of times the file may be downloaded. Unlimited when not provided.
Exemple Demande
POST /v3/media/:id/info HTTP/1.1
Host: api.nexmo.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 204
public=true&metadata_primary=foo,bar&metadata_secondary=123&title=Very+important+recording&description=This+is+a+very+important+recording.+Do+not+delete.&mime_type=audio/vnd.wave&max_downloads_allowed=100POST /v3/media/:id/info HTTP/1.1
Host: api.nexmo.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 204
public=true&metadata_primary=foo,bar&metadata_secondary=123&title=Very+important+recording&description=This+is+a+very+important+recording.+Do+not+delete.&mime_type=audio/vnd.wave&max_downloads_allowed=100Authentification
Cette API prend en charge l'authentification JWT et l'authentification de base. L'authentification de base est plus facile à mettre en œuvre, mais elle ne prend pas en charge les fonctions avancées telles que les listes de contrôle d'accès.
Vous pouvez utiliser l'authentification JWT ou l'authentification de base, mais pas les deux en même temps.
| Clé | Description | Où | Exemple |
|---|---|---|---|
| Authorization | Votre jeton web JSON. | Headers | Bearer <JWT> |
| Authorization | Clé et secret de l'API encodés en Base64 et reliés par deux points. | Headers | Basic <base64> |
Authentification
Cette API prend en charge l'authentification JWT et l'authentification de base. L'authentification de base est plus facile à mettre en œuvre, mais elle ne prend pas en charge les fonctions avancées telles que les listes de contrôle d'accès.
Vous pouvez utiliser l'authentification JWT ou l'authentification de base, mais pas les deux en même temps.
| Clé | Description | Où | Exemple |
|---|---|---|---|
| Authorization | Votre jeton web JSON. | Headers | Bearer <JWT> |
| Authorization | Clé et secret de l'API encodés en Base64 et reliés par deux points. | Headers | Basic <base64> |